HPM APP
HPMicro Application solution
common_lwip.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022-2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef COMMON_LWIP_H
9 #define COMMON_LWIP_H
10 
11 /* Includes ------------------------------------------------------------------*/
12 #include <stdbool.h>
13 #include "common_cfg.h"
14 #include "lwip/netif.h"
15 #include "hpm_enet_phy_common.h"
16 
17 #if !NO_SYS
18 #include "FreeRTOS.h"
19 #include "task.h"
20 #include "semphr.h"
21 #include "queue.h"
22 #include "timers.h"
23 #endif /* !NO_SYS */
24 
25 /* Exported Macros------------------------------------------------------------*/
26 #define IS_UUID_INVALID(UUID) (UUID[0] == 0 && \
27  UUID[1] == 0 && \
28  UUID[2] == 0 && \
29  UUID[3] == 0)
30 
31 #ifndef LWIP_APP_TIMER_INTERVAL
32 #define LWIP_APP_TIMER_INTERVAL (2 * 1000U) /* 2 * 1000 ms */
33 #endif /* LWIP_APP_TIMER_INTERVAL */
34 
35 #if defined __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38 
39 void enet_get_mac_address(uint8_t *mac);
40 bool enet_get_link_status(void);
42 void enet_services(struct netif *netif);
43 void enet_common_handler(struct netif *netif);
44 
45 #if !NO_SYS
46 void timer_callback(TimerHandle_t xTimer);
47 #endif /* !NO_SYS */
48 
49 #if defined __cplusplus
50 }
51 #endif /* __cplusplus */
52 
53 #endif /* COMMON_LWIP_H */
void enet_get_mac_address(uint8_t *mac)
Definition: common_lwip.c:96
void enet_services(struct netif *netif)
Definition: common_lwip.c:158
void timer_callback(TimerHandle_t xTimer)
Definition: common_lwip.c:23
void enet_common_handler(struct netif *netif)
Definition: common_lwip.c:165
bool enet_get_link_status(void)
Definition: common_lwip.c:117
void enet_self_adaptive_port_speed(void)
Definition: common_lwip.c:122
uint8_t mac[]
Definition: lwip.c:32