Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Functions to sync with TCPIP thread. More...
Go to the source code of this file.
Typedefs | |
| typedef void(* | tcpip_init_done_fn )(void *arg) |
| Function prototype for the init_done function passed to tcpip_init. | |
| typedef void(* | tcpip_callback_fn )(void *ctx) |
| Function prototype for functions passed to tcpip_callback() | |
Functions | |
| void | tcpip_init (tcpip_init_done_fn tcpip_init_done, void *arg) |
Initialize this module:
| |
| err_t | tcpip_inpkt (struct pbuf *p, struct netif *inp, netif_input_fn input_fn) |
| Pass a received packet to tcpip_thread for input processing. | |
| err_t | tcpip_input (struct pbuf *p, struct netif *inp) |
| Pass a received packet to tcpip_thread for input processing with ethernet_input or ip_input. | |
| err_t | tcpip_try_callback (tcpip_callback_fn function, void *ctx) |
| Call a specific function in the thread context of tcpip_thread for easy access synchronization. | |
| err_t | tcpip_callback (tcpip_callback_fn function, void *ctx) |
| Call a specific function in the thread context of tcpip_thread for easy access synchronization. | |
| struct tcpip_callback_msg * | tcpip_callbackmsg_new (tcpip_callback_fn function, void *ctx) |
| Allocate a structure for a static callback message and initialize it. | |
| void | tcpip_callbackmsg_delete (struct tcpip_callback_msg *msg) |
| Free a callback message allocated by tcpip_callbackmsg_new(). | |
| err_t | tcpip_callbackmsg_trycallback (struct tcpip_callback_msg *msg) |
| Try to post a callback-message to the tcpip_thread tcpip_mbox. | |
| err_t | tcpip_callbackmsg_trycallback_fromisr (struct tcpip_callback_msg *msg) |
| Try to post a callback-message to the tcpip_thread mbox. | |
| err_t | pbuf_free_callback (struct pbuf *p) |
| A simple wrapper function that allows you to free a pbuf from interrupt context. | |
| err_t | mem_free_callback (void *m) |
| A simple wrapper function that allows you to free heap memory from interrupt context. | |
| err_t | tcpip_timeout (u32_t msecs, sys_timeout_handler h, void *arg) |
| call sys_timeout in tcpip_thread | |
| err_t | tcpip_untimeout (sys_timeout_handler h, void *arg) |
| call sys_untimeout in tcpip_thread | |
| int | tcpip_thread_poll_one (void) |
| Work on queued items in single-threaded test mode. | |
Variables | |
| sys_mutex_t | lock_tcpip_core |
| The global semaphore to lock the stack. | |
Detailed Description
Functions to sync with TCPIP thread.
Definition in file tcpip.h.
Typedef Documentation
| typedef void(* tcpip_callback_fn)(void *ctx) |
Function prototype for functions passed to tcpip_callback()
| typedef void(* tcpip_init_done_fn)(void *arg) |
Function Documentation
| err_t mem_free_callback | ( | void * | m ) |
A simple wrapper function that allows you to free heap memory from interrupt context.
- Parameters:
-
m the heap memory to free
- Returns:
- ERR_OK if callback could be enqueued, an err_t if not
Definition at line 653 of file lwip_tcpip.c.
A simple wrapper function that allows you to free a pbuf from interrupt context.
- Parameters:
-
p The pbuf (chain) to be dereferenced.
- Returns:
- ERR_OK if callback could be enqueued, an err_t if not
Definition at line 640 of file lwip_tcpip.c.
| err_t tcpip_inpkt | ( | struct pbuf * | p, |
| struct netif * | inp, | ||
| netif_input_fn | input_fn | ||
| ) |
Pass a received packet to tcpip_thread for input processing.
- Parameters:
-
p the received packet inp the network interface on which the packet was received input_fn input function to call
Definition at line 240 of file lwip_tcpip.c.
| int tcpip_thread_poll_one | ( | void | ) |
Work on queued items in single-threaded test mode.
Definition at line 215 of file lwip_tcpip.c.
| err_t tcpip_timeout | ( | u32_t | msecs, |
| sys_timeout_handler | h, | ||
| void * | arg | ||
| ) |
call sys_timeout in tcpip_thread
- Parameters:
-
msecs time in milliseconds for timeout h function to be called on timeout arg argument to pass to timeout function h
- Returns:
- ERR_MEM on memory error, ERR_OK otherwise
Definition at line 377 of file lwip_tcpip.c.
| err_t tcpip_untimeout | ( | sys_timeout_handler | h, |
| void * | arg | ||
| ) |
call sys_untimeout in tcpip_thread
- Parameters:
-
h function to be called on timeout arg argument to pass to timeout function h
- Returns:
- ERR_MEM on memory error, ERR_OK otherwise
Definition at line 404 of file lwip_tcpip.c.
Variable Documentation
| sys_mutex_t lock_tcpip_core |
The global semaphore to lock the stack.
Definition at line 65 of file lwip_tcpip.c.
Generated on Tue Jul 12 2022 13:55:19 by
1.7.2