fix tcpip.c for LWIP_TIMERS==0

This commit is contained in:
sg
2016-08-25 21:15:26 +02:00
parent 2980a12373
commit 452f5d6296
3 changed files with 18 additions and 11 deletions

View File

@@ -112,10 +112,10 @@ enum tcpip_msg_type {
TCPIP_MSG_API,
TCPIP_MSG_API_CALL,
TCPIP_MSG_INPKT,
#if LWIP_TCPIP_TIMEOUT
#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS
TCPIP_MSG_TIMEOUT,
TCPIP_MSG_UNTIMEOUT,
#endif /* LWIP_TCPIP_TIMEOUT */
#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
TCPIP_MSG_CALLBACK,
TCPIP_MSG_CALLBACK_STATIC
};
@@ -141,13 +141,13 @@ struct tcpip_msg {
tcpip_callback_fn function;
void *ctx;
} cb;
#if LWIP_TCPIP_TIMEOUT
#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS
struct {
u32_t msecs;
sys_timeout_handler h;
void *arg;
} tmo;
#endif /* LWIP_TCPIP_TIMEOUT */
#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
} msg;
};

View File

@@ -90,10 +90,10 @@ err_t tcpip_trycallback(struct tcpip_callback_msg* msg);
err_t pbuf_free_callback(struct pbuf *p);
err_t mem_free_callback(void *m);
#if LWIP_TCPIP_TIMEOUT
#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS
err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
err_t tcpip_untimeout(sys_timeout_handler h, void *arg);
#endif /* LWIP_TCPIP_TIMEOUT */
#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */
#ifdef __cplusplus
}