Defines the interfaces for Timer Management Services.
More...
|
typedef void(* | wiced_timer_callback_t )(uint32_t cb_params) |
|
|
enum | wiced_timer_type_t { WICED_SECONDS_TIMER = 1,
WICED_MILLI_SECONDS_TIMER,
WICED_SECONDS_PERIODIC_TIMER,
WICED_MILLI_SECONDS_PERIODIC_TIMER
} |
|
Defines the interfaces for Timer Management Services.
Deinitialize the timer instance and stops the timer if it is running.
- Parameters
-
[in] | p_timer | :Pointer to the timer |
- Returns
- None
wiced_result_t wiced_init_timer |
( |
wiced_timer_t * |
p_timer, |
|
|
wiced_timer_callback_t |
p_cb, |
|
|
uint32_t |
cb_param, |
|
|
wiced_timer_type_t |
timer_type |
|
) |
| |
Initializes the timer.
- Parameters
-
[in] | p_timer | :Pointer to the timer structure |
[in] | p_cb | :Timer callback function to be invoked on timer expiry |
[in] | cb_param | :Parameter to be passed to the timer callback function which gets invoked on timer expiry,if any |
[in] | timer_type | :Type of the timer |
- Returns
- wiced_result_t
Checks if the timer is in use.
- Parameters
-
[in] | p_timer | :Pointer to the timer structure |
- Returns
- 0 if the timer is not in use and non-zero value if the timer is in use
Starts the timer Timer should be initialized before starting the timer.
Running the timer interfere with the low power modes of the chip. Time to remain in the low power mode is dependent on the timeout values of the running timers, ie time to sleep is dependent on the time after which the next timer among the active timers expires.
- Parameters
-
[in] | p_timer | :Pointer to the timer structure |
[in] | timeout | :Timeout value, in seconds or in milliseconds depending on the timer type |
- Returns
- wiced_result_t
Stops the timer.
- Parameters
-
[in] | p_timer | :Pointer to the timer structure |
- Returns
- wiced_result_t