Improve LWIP_EVENT_API compilation
This commit is contained in:
@@ -1325,6 +1325,13 @@
|
||||
#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__
|
||||
#define LWIP_EVENT_API 0
|
||||
#define LWIP_CALLBACK_API 1
|
||||
#else
|
||||
#ifndef LWIP_EVENT_API
|
||||
#define LWIP_EVENT_API 0
|
||||
#endif
|
||||
#ifndef LWIP_CALLBACK_API
|
||||
#define LWIP_CALLBACK_API 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1359,7 +1366,7 @@
|
||||
* Ethernet.
|
||||
*/
|
||||
#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__
|
||||
#if defined LWIP_HOOK_VLAN_SET
|
||||
#if defined LWIP_HOOK_VLAN_SET || defined __DOXYGEN__
|
||||
#define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE)
|
||||
#else /* LWIP_HOOK_VLAN_SET */
|
||||
#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
|
||||
|
||||
@@ -350,11 +350,13 @@ struct tcp_pcb * tcp_new (void);
|
||||
struct tcp_pcb * tcp_new_ip_type (u8_t type);
|
||||
|
||||
void tcp_arg (struct tcp_pcb *pcb, void *arg);
|
||||
void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept);
|
||||
#if LWIP_CALLBACK_API
|
||||
void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv);
|
||||
void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent);
|
||||
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
|
||||
void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err);
|
||||
void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept);
|
||||
#endif /* LWIP_CALLBACK_API */
|
||||
void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval);
|
||||
|
||||
#define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss)
|
||||
#define tcp_sndbuf(pcb) (TCPWND16((pcb)->snd_buf))
|
||||
|
||||
Reference in New Issue
Block a user