Infineon Logo AIROC BTSDK v4.0 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Timer Management Services

Defines the interfaces for Timer Management Services. More...

Data Structures

struct  wiced_timer_t
 

Macros

#define WICED_TIMER_PARAM_TYPE   uint32_t
 
#define wiced_timer_callback_fp   wiced_timer_callback_t
 
#define WICED_TIMER_INSTANCE_SIZE_IN_WORDS   14
 Defines the wiced timer instance size.
 
#define QUICK_TIMER_MS_TO_US(tout)   tout*1000
 

Typedefs

typedef uint8_t wiced_timer_type_t
 
typedef void(* wiced_timer_callback_t )(WICED_TIMER_PARAM_TYPE cb_params)
 

Enumerations

enum  wiced_timer_type_e { WICED_SECONDS_TIMER = 1, WICED_MILLI_SECONDS_TIMER, WICED_SECONDS_PERIODIC_TIMER, WICED_MILLI_SECONDS_PERIODIC_TIMER }
 

Functions

wiced_result_t wiced_init_timer (wiced_timer_t *p_timer, wiced_timer_callback_t TimerCb, WICED_TIMER_PARAM_TYPE cBackparam, wiced_timer_type_t type)
 Initializes the timer. More...
 
wiced_result_t wiced_start_timer (wiced_timer_t *p_timer, uint32_t timeout)
 Starts the timer Timer should be initialized before starting the timer. More...
 
wiced_result_t wiced_stop_timer (wiced_timer_t *p_timer)
 Stops the timer. More...
 
wiced_bool_t wiced_is_timer_in_use (wiced_timer_t *p_timer)
 Checks if the timer is in use. More...
 
wiced_result_t wiced_deinit_timer (wiced_timer_t *p_timer)
 Deinitialize the timer instance and stops the timer if it is running. More...
 

Detailed Description

Defines the interfaces for Timer Management Services.

Function Documentation

wiced_result_t wiced_deinit_timer ( wiced_timer_t p_timer)

Deinitialize the timer instance and stops the timer if it is running.

Parameters
[in]p_timer:Pointer to the timer
Returns
wiced_result_t
wiced_result_t wiced_init_timer ( wiced_timer_t p_timer,
wiced_timer_callback_t  TimerCb,
WICED_TIMER_PARAM_TYPE  cBackparam,
wiced_timer_type_t  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
wiced_bool_t wiced_is_timer_in_use ( wiced_timer_t p_timer)

Checks if the timer is in use.

Parameters
[in]p_timer:Pointer to the timer structure
Returns
TRUE if the timer is in use and FALSE if the timer is not in use
wiced_result_t wiced_start_timer ( wiced_timer_t p_timer,
uint32_t  timeout 
)

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]wiced_timer_t::Pointer to the timer structure
Returns
wiced_result_t
wiced_result_t wiced_stop_timer ( wiced_timer_t p_timer)

Stops the timer.

Parameters
[in]wiced_timer_t:Pointer to the timer structure
Returns
wiced_result_t