28#define TIMER_1_CYCLE 1
29#define TIMER_2_CYCLE 2
30#define HAL_TCXO_TICKS_PER_SECOND 24000000
31#define TIMER_COMPENSAT_1_CYCLE_BY_TCXO (HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE)
32#define TIMER_COMPENSAT_2_CYCLE_BY_TCXO (2 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE)
33#define TIMER_COMPENSAT_3_CYCLE_BY_TCXO (3 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE)
uintptr_t timer_porting_base_addr_get(timer_index_t index)
获取指定的硬件定时器的基地址。
Definition timer_porting.c:28
void timer_port_register_irq(timer_index_t index, uint32_t id, uint16_t priority)
Timer注册中断。
Definition timer_porting.c:69
uint32_t timer_porting_cycle_2_us(uint64_t cycle)
毫秒转换为计数
Definition timer_porting.c:101
enum timer_index timer_index_t
Definiton of the index of timers.
uint64_t timer_porting_us_2_cycle(uint32_t us)
毫秒转换为计数
Definition timer_porting.c:95
uint32_t timer_porting_clock_value_get(void)
获取timer时钟频率
Definition timer_porting.c:90
uintptr_t timer_porting_comm_addr_get(void)
获取硬件定时器公共寄存器的基地址。
Definition timer_porting.c:23
uint64_t timer_porting_compensat_by_tcxo(uint64_t diff)
Definition timer_porting.c:107
void timer_port_unregister_irq(timer_index_t index, uint32_t id)
Timer去注册中断。
Definition timer_porting.c:77
timer_index
Definiton of the index of timers.
Definition timer_porting.h:38
void timer_porting_clock_value_set(uint32_t clock)
更新timer的时钟频率值,此值应和真实输入时钟频率保持一致
Definition timer_porting.c:85
@ TIMER_MAX_NUM
Definition timer_porting.h:33
@ TIMER_INDEX_2
Definition timer_porting.h:32
@ TIMER_INDEX_1
Definition timer_porting.h:31
@ TIMER_INDEX_0
Definition timer_porting.h:30
unsigned long long uint64_t
Definition osal_types.h:35
unsigned int uintptr_t
Definition td_type.h:65