5.13.0.0R1
Software Development Kit
RTOS timers

Functions

wiced_result_t wiced_rtos_deinit_timer (wiced_timer_t *timer)
 
wiced_result_t wiced_rtos_init_timer (wiced_timer_t *timer, uint32_t time_ms, timer_handler_t function, void *arg)
 
wiced_result_t wiced_rtos_is_timer_running (wiced_timer_t *timer)
 
wiced_result_t wiced_rtos_start_timer (wiced_timer_t *timer)
 
wiced_result_t wiced_rtos_stop_timer (wiced_timer_t *timer)
 

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_result_t wiced_rtos_deinit_timer ( wiced_timer_t *  timer)

De-initialize a RTOS timer

Deletes a RTOS timer created with wiced_rtos_init_timer

Parameters
[in]timer: A pointer to the RTOS timer handle
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred
wiced_result_t wiced_rtos_init_timer ( wiced_timer_t *  timer,
uint32_t  time_ms,
timer_handler_t  function,
void *  arg 
)

Initializes a RTOS timer

Timer does not start running until wiced_rtos_start_timer is called

Parameters
[in]timer: A pointer to the timer handle to be initialized
[in]time_ms: Timer period in milliseconds
[in]function: The callback handler function that is called each time the timer expires
[in]arg: An argument that will be passed to the callback function
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred
wiced_result_t wiced_rtos_is_timer_running ( wiced_timer_t *  timer)

Check if an RTOS timer is running

Parameters
[in]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_timer_t *  timer)

Starts a RTOS timer

Timer must have been previously initialized with wiced_rtos_init_timer

Parameters
[in]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_timer_t *  timer)

Stops a running RTOS timer

Timer must have been previously started with wiced_rtos_start_timer

Parameters
[in]timer: A pointer to the timer handle to stop
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred