InPlay API
Counter Timer driver

HAL_CNT_TIMER. More...

Functions

void * hal_cnt_timer_open (int id, int prio, void *arg, void(*tmr_cb)(void *))
 Open counter timer. More...
 
void hal_cnt_timer_close (void *hdl)
 Open counter timer. More...
 
int hal_cnt_timer_start (void *hdl, uint32_t count, int reload)
 Run Timer periodic function. More...
 
int hal_cnt_timer_stop (void *hdl)
 Stop Timer periodic function. More...
 

Detailed Description

HAL_CNT_TIMER.

Function Documentation

◆ hal_cnt_timer_close()

void hal_cnt_timer_close ( void *  hdl)

Open counter timer.

Parameters
[in]hdlCounter timer device handle.
Returns
None.

◆ hal_cnt_timer_open()

void* hal_cnt_timer_open ( int  id,
int  prio,
void *  arg,
void(*)(void *)  tmr_cb 
)

Open counter timer.

Parameters
[in]idTimer id
See also
enum cnt_timer_id_t.
Parameters
[in]prioInterrupt priority.
[in]argPointer to user's own context to be passed back to user.
[in]tmr_cbPointer to user's provided call back function. This function is called in ISR context.
Returns
Counter timer device handle, NULL if failed.

◆ hal_cnt_timer_start()

int hal_cnt_timer_start ( void *  hdl,
uint32_t  count,
int  reload 
)

Run Timer periodic function.

Parameters
[in]hdlCounter timer device handle.
[in]usecmicrosecond duration.
Returns
See also
enum cnt_tim_err

◆ hal_cnt_timer_stop()

int hal_cnt_timer_stop ( void *  hdl)

Stop Timer periodic function.

Parameters
[in]hdlCounter timer device handle.
Returns
See also
enum tim_err