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.
◆ wiced_rtos_deinit_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_rtos_init_timer()
| 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_rtos_is_timer_running()
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_rtos_start_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_rtos_stop_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