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.
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
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
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
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