Rtos API example

Embed: (wiki syntax)

« Back to documentation index

timeouts.h File Reference

timeouts.h File Reference

Timer implementations. More...

Go to the source code of this file.

Data Structures

struct  lwip_cyclic_timer
 This struct contains information about a stack-internal timer function that has to be called at a defined interval. More...

Typedefs

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.

Functions

void sys_timeouts_init (void)
 Initialize this module.
void sys_timeout_debug (u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name)
 Create a one-shot timer (aka timeout).

Variables

struct lwip_cyclic_timer lwip_cyclic_timers []
 This array contains all stack-internal cyclic timers.

Detailed Description

Timer implementations.

Definition in file timeouts.h.


Typedef Documentation

typedef void(* lwip_cyclic_timer_handler)(void)

Function prototype for a stack-internal timer function that has to be called at a defined interval.

Definition at line 61 of file timeouts.h.

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()

Definition at line 84 of file timeouts.h.


Function Documentation

void sys_timeout_debug ( u32_t  msecs,
sys_timeout_handler  handler,
void *  arg,
const char *  handler_name 
)

Create a one-shot timer (aka timeout).

Timeouts are processed in the following cases:

  • while waiting for a message using sys_timeouts_mbox_fetch()
  • by calling sys_check_timeouts() (NO_SYS==1 only)
Parameters:
msecstime in milliseconds after that the timer should expire
handlercallback function to call when msecs have elapsed
argargument to pass to the callback function
void sys_timeouts_init ( void   )

Initialize this module.

Definition at line 175 of file lwip_timeouts.c.


Variable Documentation

This array contains all stack-internal cyclic timers.

To get the number of timers, use LWIP_ARRAYSIZE()

Definition at line 71 of file lwip_timeouts.c.