lwIP
2.1.0
Lightweight IP stack
|
Data Structures | |
struct | lwip_cyclic_timer |
Macros | |
#define | SYS_TIMEOUTS_SLEEPTIME_INFINITE 0xFFFFFFFF |
Typedefs | |
typedef void(* | lwip_cyclic_timer_handler) (void) |
typedef void(* | sys_timeout_handler) (void *arg) |
Functions | |
void | sys_timeouts_init (void) |
void | sys_timeout (u32_t msecs, sys_timeout_handler handler, void *arg) |
void | sys_untimeout (sys_timeout_handler handler, void *arg) |
void | sys_restart_timeouts (void) |
void | sys_check_timeouts (void) |
u32_t | sys_timeouts_sleeptime (void) |
Variables | |
const struct lwip_cyclic_timer | lwip_cyclic_timers [] |
const int | lwip_num_cyclic_timers |
Timer implementations
#define SYS_TIMEOUTS_SLEEPTIME_INFINITE 0xFFFFFFFF |
Returned by sys_timeouts_sleeptime() to indicate there is no timer, so we can sleep forever.
typedef void(* lwip_cyclic_timer_handler) (void) |
Function prototype for a stack-internal timer function that has to be called at a defined interval
typedef void(* sys_timeout_handler) (void *arg) |
Function prototype for a timeout callback function. Register such a function using sys_timeout().
arg | Additional argument to pass to the function - set up by sys_timeout() |
void sys_restart_timeouts | ( | void | ) |
Rebase the timeout times to the current time. This is necessary if sys_check_timeouts() hasn't been called for a long time (e.g. while saving energy) to prevent all timer functions of that period being called.
void sys_timeout | ( | u32_t | msecs, |
sys_timeout_handler | handler, | ||
void * | arg | ||
) |
Create a one-shot timer (aka timeout). Timeouts are processed in the following cases:
msecs | time in milliseconds after that the timer should expire |
handler | callback function to call when msecs have elapsed |
arg | argument to pass to the callback function |
void sys_timeouts_init | ( | void | ) |
Initialize this module
u32_t sys_timeouts_sleeptime | ( | void | ) |
Return the time left before the next timeout is due. If no timeouts are enqueued, returns 0xffffffff
void sys_untimeout | ( | sys_timeout_handler | handler, |
void * | arg | ||
) |
Go through timeout list (for this task only) and remove the first matching entry (subsequent entries remain untouched), even though the timeout has not triggered yet.
handler | callback function that would be called by the timeout |
arg | callback argument that would be passed to handler |
const struct lwip_cyclic_timer lwip_cyclic_timers[] |
This array contains all stack-internal cyclic timers. To get the number of timers, use lwip_num_cyclic_timers
This array contains all stack-internal cyclic timers. To get the number of timers, use LWIP_ARRAYSIZE()
const int lwip_num_cyclic_timers |
Array size of lwip_cyclic_timers[]