Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
RTOS timers

RTOS timer management functions These timers are based on the RTOS time-slice scheduling, so are not highly accurate. More...

Functions

wiced_rtos_timer_t * wiced_rtos_create_timer (void) DEPRECATE_RTOS_TIMER
 Creates a new instance of timer. More...
 
wiced_result_t wiced_rtos_init_timer (wiced_rtos_timer_t *timer, uint32_t time_ms, timer_handler_t function, void *arg) DEPRECATE_RTOS_TIMER
 Initialises a RTOS timer. More...
 
wiced_result_t wiced_rtos_start_timer (wiced_rtos_timer_t *timer) DEPRECATE_RTOS_TIMER
 Starts a RTOS timer running. More...
 
wiced_result_t wiced_rtos_stop_timer (wiced_rtos_timer_t *timer) DEPRECATE_RTOS_TIMER
 Stops a running RTOS timer. More...
 
wiced_result_t wiced_rtos_is_timer_running (wiced_rtos_timer_t *timer) DEPRECATE_RTOS_TIMER
 Check if an RTOS timer is running. More...
 

Detailed Description

RTOS timer management functions These timers are based on the RTOS time-slice scheduling, so are not highly accurate.

They are also affected by high loading on the processor.

Function Documentation

wiced_rtos_timer_t* wiced_rtos_create_timer ( void  )

Creates a new instance of timer.

Creates a new timer (Allocates memory for a new timer instance and returns the pointer)

Returns
valid pointer : on success.
NULL : if an error occurred
wiced_result_t wiced_rtos_init_timer ( wiced_rtos_timer_t *  timer,
uint32_t  time_ms,
timer_handler_t  function,
void *  arg 
)

Initialises a RTOS timer.

Initialises a RTOS timer Timer does not start running until wiced_rtos_start_timer is called

Parameters
timer: a pointer to the timer handle to be initialised
function: the callback handler function that is called each time the timer expires
arg: an argument that will be passed to the callback function
Returns
wiced_result_t wiced_rtos_is_timer_running ( wiced_rtos_timer_t *  timer)

Check if an RTOS timer is running.

Parameters
timer: a pointer to the RTOS timer handle
Returns
WICED_SUCCESS : if running.
WICED_ERROR : if not running
wiced_result_t wiced_rtos_start_timer ( wiced_rtos_timer_t *  timer)

Starts a RTOS timer running.

Starts a RTOS timer running. Timer must have been previously initialised with wiced_rtos_init_timer

Parameters
timer: a pointer to the timer handle to start
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred
wiced_result_t wiced_rtos_stop_timer ( wiced_rtos_timer_t *  timer)

Stops a running RTOS timer.

Stops a running RTOS timer. Timer must have been previously started with wiced_rtos_start_timer

Parameters
timer: a pointer to the timer handle to stop
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred