/* * Copyright (c) 2022-2023 HPMicro * * SPDX-License-Identifier: BSD-3-Clause * */ #ifndef COMMON_LWIP_H #define COMMON_LWIP_H /* Includes ------------------------------------------------------------------*/ #include #include "common_cfg.h" #include "lwip/netif.h" #include "hpm_enet_phy_common.h" #if !NO_SYS #if defined(__ENABLE_FREERTOS) && __ENABLE_FREERTOS #include "FreeRTOS.h" #include "task.h" #include "semphr.h" #include "queue.h" #include "timers.h" #endif #endif /* !NO_SYS */ /* Exported Macros------------------------------------------------------------*/ #define IS_UUID_INVALID(UUID) (UUID[0] == 0 && \ UUID[1] == 0 && \ UUID[2] == 0 && \ UUID[3] == 0) #ifndef LWIP_APP_TIMER_INTERVAL #define LWIP_APP_TIMER_INTERVAL (2 * 1000U) /* 2 * 1000 ms */ #endif /* LWIP_APP_TIMER_INTERVAL */ #if defined __cplusplus extern "C" { #endif /* __cplusplus */ void enet_get_mac_address(uint8_t *mac); bool enet_get_link_status(void); void enet_self_adaptive_port_speed(void); void enet_services(struct netif *netif); void enet_common_handler(struct netif *netif); #if !NO_SYS #if defined(__ENABLE_FREERTOS) && __ENABLE_FREERTOS void timer_callback(TimerHandle_t xTimer); #else #endif #else void sys_timer_callback(void); #endif /* !NO_SYS */ #if defined __cplusplus } #endif /* __cplusplus */ #endif /* COMMON_LWIP_H */