36 #ifndef __OS_HAL_GPT_H__
37 #define __OS_HAL_GPT_H__
219 unsigned int count_val,
235 unsigned char speed_32us,
void mtk_os_hal_gpt_register_irq(void)
Register GPT irq.
Use GPT4 as timer.
Definition: os_hal_gpt.h:135
void mtk_os_hal_gpt_init(void)
Init GPT device.
int mtk_os_hal_gpt_config(enum gpt_num timer_id, unsigned char speed_32us, struct os_gpt_int *gpt_int)
Config GPT timer.
void * gpt_cb_data
The pointer of GPT interrupt callback data, which will be passed into user interrupt handle...
Definition: os_hal_gpt.h:158
int mtk_os_hal_gpt_start(enum gpt_num timer_id)
Start GPT timer count.
The maximum GPT number (invalid)
Definition: os_hal_gpt.h:137
int mtk_os_hal_gpt_stop(enum gpt_num timer_id)
Stop GPT timer count.
Use GPT3 as timer.
Definition: os_hal_gpt.h:133
int mtk_os_hal_gpt_reset_timer(enum gpt_num timer_id, unsigned int count_val, bool auto_repeat)
Reset GPT timer mode (only works for interrupt-based timer).
gpt_num
GPT timer ID enum definition.
Definition: mhal_gpt.h:157
unsigned int mtk_os_hal_gpt_get_cur_count(enum gpt_num timer_id)
Get GPT timer counter value.
Definition: os_hal_gpt.h:152
void(* gpt_cb_hdl)(void *)
The user interrupt handle of GPT.
Definition: os_hal_gpt.h:154
Use GPT0 as timer.
Definition: os_hal_gpt.h:127
Use GPT1 as timer.
Definition: os_hal_gpt.h:129
GPT_ID
Definition: os_hal_gpt.h:125
int mtk_os_hal_gpt_restart(enum gpt_num timer_id)
Restart GPT timer count.
Use GPT2 as timer.
Definition: os_hal_gpt.h:131