InPlay API
|
HAL_TIM. More...
Enumerations | |
enum | tmr_id |
Timer Id. | |
enum | cap_id |
Timer Signal Capture Id. | |
enum | emit_id |
Timer Emit Id. | |
enum | tmr_err |
(Aon) Timer error code | |
Functions | |
int | hal_timer_busy (void) |
Check if any timer is active. More... | |
int | hal_timer_set_tmo_callback (int tmr_id, int prio, void *arg, void(*tmr_cb)(void *)) |
rigster Timer timeout callback function More... | |
int | hal_timer_start (int tmr_id, int reload, int manual, uint32_t tick) |
Run Timer periodic function. More... | |
int | hal_timer_stop (int tim_id) |
Stop Timer periodic function. More... | |
int | hal_timer_start_tick (int tim_id) |
start timer profile function More... | |
uint32_t | hal_timer_get_tick (int tim_id) |
timer get current tick function. More... | |
int | hal_timer_end_tick (int tim_id) |
timer tick stop function. More... | |
int | hal_timer_delay_us (int tim_id, uint32_t usec) |
timer delaye function More... | |
uint32_t | hal_timer_get_systick (void) |
Return the OS tick. More... | |
int | hal_timer_capture_signal_add (int tmr_id, int idx, uint8_t sig_id, int rise, int fall) |
Add HW signal to the timer's capture list. More... | |
int | hal_timer_capture_signal_rem (int tmr_id, int idx) |
Remove HW signal from the timer's capture list. More... | |
int | hal_timer_emit_set_callback (int tmr_id, int prio, void *arg, void(*callback)(void *parg, int emit_idx)) |
Set emit IRQ handler callback for the timer's emit. More... | |
int | hal_timer_emit_add (int tmr_id, int idx, uint32_t tick, tmr_emit_option_t *option) |
Add HW trigger to the timer's trigger list. More... | |
int | hal_timer_emit_rem (int tmr_id, int idx) |
Remove HW trigger from the timer's trigger list. More... | |
int | hal_timer_smem_emit_add (int tmr_id, uint32_t *ticks, uint32_t size, uint16_t empty_threshold, tmr_emit_option_t *option) |
Add HW trigger to the timer's trigger list. More... | |
int | hal_aon_timer_open (int id, int wup_en, int reload, int prio, void *arg, void(*isr_cb)(void *arg)) |
Open sleep timer. More... | |
int | hal_aon_timer_close (int id) |
Close sleep timer. More... | |
int | hal_aon_timer_start (int id, uint64_t time_us) |
Start sleep timer. More... | |
int | hal_aon_timer_stop (int id) |
Stop sleep timer. More... | |
uint64_t | hal_aon_timer_get_tick (int id) |
Get the current sleep timer tick. More... | |
uint64_t | hal_aon_timer_get_time (int id) |
Get the current sleep timer time in microsecond. More... | |
int | hal_aon_timer_emit_add (int emit_id, int auto_clr, int touch_clr, uint32_t time_us, int prio, void *arg, void(*callback)(void *)) |
Add HW trigger to the AON timer2's trigger list. More... | |
int | hal_aon_timer_emit_rem (int emit_id) |
Remove HW trigger from the AON timer2's trigger list. More... | |
int | hal_aon_timer_capture_add (int cap_id, uint8_t sig_id, int rise, int fall, int prio, void *arg, void(*callback)(void *, int, uint32_t)) |
Add HW trigger to the AON timer2's trigger list. More... | |
int | hal_aon_timer_capture_rem (int cap_id) |
Remove HW trigger from the AON timer2's trigger list. More... | |
HAL_TIM.
int hal_aon_timer_capture_add | ( | int | cap_id, |
uint8_t | sig_id, | ||
int | rise, | ||
int | fall, | ||
int | prio, | ||
void * | arg, | ||
void(*)(void *, int, uint32_t) | callback | ||
) |
Add HW trigger to the AON timer2's trigger list.
[in] | emit_id |
[in] | auto_clr | Clear the emit signal automatically |
[in] | touch_clr | Clear the emit signal by write to touch register |
[in] | time_us | Trigger happens on AON timer2's value (tick) |
[in] | arg | User provided argument for the emit callback |
[in] | callback | Pointer to user's provided call back function. |
int hal_aon_timer_capture_rem | ( | int | cap_id | ) |
Remove HW trigger from the AON timer2's trigger list.
[in] | emit_id |
int hal_aon_timer_close | ( | int | id | ) |
Close sleep timer.
[in] | id | AON timer Id, |
int hal_aon_timer_emit_add | ( | int | emit_id, |
int | auto_clr, | ||
int | touch_clr, | ||
uint32_t | time_us, | ||
int | prio, | ||
void * | arg, | ||
void(*)(void *) | callback | ||
) |
Add HW trigger to the AON timer2's trigger list.
[in] | emit_id |
[in] | auto_clr | Clear the emit signal automatically |
[in] | touch_clr | Clear the emit signal by write to touch register |
[in] | time_us | Trigger happens on AON timer2's value (tick) |
[in] | arg | User provided argument for the emit callback |
[in] | callback | Pointer to user's provided call back function. |
int hal_aon_timer_emit_rem | ( | int | emit_id | ) |
Remove HW trigger from the AON timer2's trigger list.
[in] | emit_id |
uint64_t hal_aon_timer_get_tick | ( | int | id | ) |
Get the current sleep timer tick.
[in] | id | AON timer Id, |
uint64_t hal_aon_timer_get_time | ( | int | id | ) |
Get the current sleep timer time in microsecond.
[in] | id | AON timer Id, |
int hal_aon_timer_open | ( | int | id, |
int | wup_en, | ||
int | reload, | ||
int | prio, | ||
void * | arg, | ||
void(*)(void *arg) | isr_cb | ||
) |
Open sleep timer.
[in] | id | AON timer Id, |
[in] | wup_en | 1: AON timer can wake up system; 0: Otherwise |
[in] | reload | 1: AON timer can reload initial value; 0: Otherwise |
[in] | prio | Interrupt priority |
[in] | arg | Call back function argument |
[in] | isr_cb | Times up call back (Note: from interrupt context) |
int hal_aon_timer_start | ( | int | id, |
uint64_t | time_us | ||
) |
Start sleep timer.
[in] | id | AON timer Id, |
[in] | time_us | Sleep time in micro second unit: a. Timer 0,1,and2 is oxffffffff (32 bits) b. Timer 3 is 0xffffffffffffff (64 bits) |
int hal_aon_timer_stop | ( | int | id | ) |
Stop sleep timer.
[in] | id | AON timer Id, |
int hal_timer_busy | ( | void | ) |
Check if any timer is active.
int hal_timer_capture_signal_add | ( | int | tmr_id, |
int | idx, | ||
uint8_t | sig_id, | ||
int | rise, | ||
int | fall | ||
) |
Add HW signal to the timer's capture list.
[in] | tim_id | Timer Id, |
[in] | idx | The index for the current capture, possible values are 0, 1, 2, 3 |
[in] | sig_id | The HW signal ID, |
[in] | rise | Capture on the HW signal's rising edge |
[in] | fall | Captuer on the HW signal's falling edge |
[in] | prio | Interrupt priority |
[in] | arg | User provided argument for the capture callback |
[in] | callback | Pointer to user's provided call back function. |
int hal_timer_capture_signal_rem | ( | int | tmr_id, |
int | idx | ||
) |
Remove HW signal from the timer's capture list.
[in] | tim_id | Timer Id, |
[in] | idx | The index for the current capture, possible values are 0, 1, 2, 3 |
int hal_timer_delay_us | ( | int | tim_id, |
uint32_t | usec | ||
) |
timer delaye function
[in] | tim_id | Timer Id, |
[in] | usec | Delay time in Microsecond. |
int hal_timer_emit_add | ( | int | tmr_id, |
int | idx, | ||
uint32_t | tick, | ||
tmr_emit_option_t * | option | ||
) |
Add HW trigger to the timer's trigger list.
[in] | tim_id | Timer Id, |
[in] | idx | The index for the current emit, possible values are 0, 1, 2, 3, 4, 5, 6, 7 |
[in] | tick | Trigger happens on this timer's tick(in timer clk tick unit) |
[in] | option | Option of emit. Use default config if it is NULL |
int hal_timer_emit_rem | ( | int | tmr_id, |
int | idx | ||
) |
Remove HW trigger from the timer's trigger list.
[in] | tim_id | Timer Id, |
[in] | idx | The index for the current emit, possible values are 0, 1, 2, 3, 4, 5, 6, 7 |
int hal_timer_emit_set_callback | ( | int | tmr_id, |
int | prio, | ||
void * | arg, | ||
void(*)(void *parg, int emit_idx) | callback | ||
) |
Set emit IRQ handler callback for the timer's emit.
[in] | tim_id | Timer Id, |
[in] | prio | Interrupt priority |
[in] | arg | User provided argument for the emit callback |
[in] | callback | Pointer to user's provided call back function. |
int hal_timer_end_tick | ( | int | tim_id | ) |
timer tick stop function.
[in] | tim_id | Timer Id, |
uint32_t hal_timer_get_systick | ( | void | ) |
Return the OS tick.
uint32_t hal_timer_get_tick | ( | int | tim_id | ) |
timer get current tick function.
[in] | tim_id | Timer Id, |
int hal_timer_set_tmo_callback | ( | int | tmr_id, |
int | prio, | ||
void * | arg, | ||
void(*)(void *) | tmr_cb | ||
) |
rigster Timer timeout callback function
[in] | tim_id | Timer Id, |
[in] | pri | Interrupt priority. |
[in] | arg | Pointer to user's own context to be passed back to user. |
[in] | tmr_cb | Pointer to user's provided call back function. |
int hal_timer_smem_emit_add | ( | int | tmr_id, |
uint32_t * | ticks, | ||
uint32_t | size, | ||
uint16_t | empty_threshold, | ||
tmr_emit_option_t * | option | ||
) |
Add HW trigger to the timer's trigger list.
[in] | tim_id | Timer Id, |
[in] | ticks | Trigger happens on one of timer's ticks(in timer clk tick unit). the ticks are stored in share memory. They're in order of precedence. |
[in] | size | Number of ticks |
[in] | empty_threshold | When the number of entries is smaller than this number, an interrupt will be generated. |
[in] | option | Option of emit. Use default config if it is NULL |
int hal_timer_start | ( | int | tmr_id, |
int | reload, | ||
int | manual, | ||
uint32_t | tick | ||
) |
Run Timer periodic function.
[in] | tim_id | Timer Id, |
[in] | reload | reload the initial value after time out |
[in] | manual | timers manual mode enable. 1 enable, 0 disable |
[in] | tick | Initial value of timer clock ticks |
int hal_timer_start_tick | ( | int | tim_id | ) |
start timer profile function
[in] | tim_id | Timer Id, |
int hal_timer_stop | ( | int | tim_id | ) |
Stop Timer periodic function.
[in] | tim_id | Timer Id, |