Microchip® Advanced Software Framework

lwip/lwip-1.4.1/src/include/lwip/timers.h File Reference
#include "lwip/opt.h"
#include "lwip/err.h"
#include "lwip/sys.h"

Data Structures

struct  sys_timeo
 

Macros

#define LWIP_DEBUG_TIMERNAMES   0
 
#define LWIP_TIMERS   (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))
 

Typedefs

typedef void(* sys_timeout_handler )(void *arg)
 Function prototype for a timeout callback function. More...
 

Functions

void sys_timeout (u32_t msecs, sys_timeout_handler handler, void *arg)
 Create a one-shot timer (aka timeout). More...
 
void sys_timeouts_init (void)
 
void sys_timeouts_mbox_fetch (sys_mbox_t *mbox, void **msg)
 
void sys_untimeout (sys_timeout_handler handler, void *arg)
 Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet. More...
 

#define LWIP_DEBUG_TIMERNAMES   0
#define LWIP_TIMERS   (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))

typedef void(* sys_timeout_handler)(void *arg)

Function prototype for a timeout callback function.

Register such a function using sys_timeout().

Parameters
argAdditional argument to pass to the function - set up by sys_timeout()

void sys_timeout ( u32_t  msecs,
sys_timeout_handler  h,
void *  arg 
)

Create a one-shot timer (aka timeout).

Timeouts are processed in the following cases:

Parameters
msecstime in milliseconds after that the timer should expire
hcallback function to call when msecs have elapsed
argargument to pass to the callback function

Referenced by sys_sem_wait_timeout(), and tcpip_thread().

void sys_timeouts_init ( void  )

Referenced by lwip_init().

void sys_timeouts_mbox_fetch ( sys_mbox_t *  mbox,
void **  msg 
)

Referenced by tcpip_thread().

void sys_untimeout ( sys_timeout_handler  h,
void *  arg 
)

Go through timeout list (for this task only) and remove the first matching entry, even though the timeout has not triggered yet.

Note
This function only works as expected if there is only one timeout calling 'h' in the list of timeouts.
Parameters
hcallback function that would be called by the timeout
argcallback argument that would be passed to h

Referenced by sys_sem_wait_timeout(), and tcpip_thread().