16 #ifndef BUS_MANAGEMENT_H
17 #define BUS_MANAGEMENT_H
29 #define MAX_BM_CALLBACKS (8)
35 #define MAX_BM_PERIOD_USEC (60 * 1000 * 1000) // 60 seconds => 0.0167 Hz
41 #define MIN_BM_PERIOD_USEC (100) // 100 usec => 10000 Hz
46 #define BM_TOKEN_VAL_MAX ((bm_callback_token_t)(1 << (MAX_BM_CALLBACKS-1)))
51 #define BM_TOKEN_VAL_ERROR ((bm_callback_token_t)(1 << ((sizeof(bm_callback_token_t)*8)-1))) // Set msb bit to indicate error
57 #define BM_ERROR BM_TOKEN_VAL_ERROR
62 #define BM_ALL_TOKENS ((bm_callback_token_t)((1 << MAX_BM_CALLBACKS)-1))
bm_callback_token_t bm_register_periodic_callback(isf_duration_t aPeriod, bm_callback_t *apCallback, void *apCbData)
This API schedules a callback at the specified period.
uint32 bm_get_num_callback(void)
This API returns the number of callbacks registered.
uint32 bm_callback_token_t
This type defines the Bus Manager token. Each callback registered with the Bus Manager receives a uni...
isf_status_t bm_unregister_callback(bm_callback_token_t aTokens)
This API unregisters one or more callbacks.
isf_status_t bm_start(boolean aSync, bm_callback_token_t aTokens)
This API sets one or more callback(s) to the active state.
isf_status_t bm_init(void)
This API initializes the Bus Manager.
isf_status_t bm_stop(bm_callback_token_t aTokens)
This API stops one or more callback(s) by setting them to the inactive state.
void isr_bm_callback_tmr(void *dummy)
uint32 isf_duration_t
ISF time duration in microseconds.
void( bm_callback_t)(void *)
Type for the prototype for a Bus Manager periodic callback function.
int32 isf_status_t
ISF return status type.