Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2023. All rights reserved.
Description: Provides timer port
History:
2022-06-06, Create file.
◆ HAL_TCXO_TICKS_PER_SECOND
| #define HAL_TCXO_TICKS_PER_SECOND 24000000 |
◆ MS_PER_S
◆ TIMER_1_CYCLE
◆ TIMER_2_CYCLE
◆ TIMER_COMPENSAT_1_CYCLE_BY_TCXO
◆ TIMER_COMPENSAT_2_CYCLE_BY_TCXO
◆ TIMER_COMPENSAT_3_CYCLE_BY_TCXO
◆ US_PER_MS
◆ timer_index_t [1/2]
Definiton of the index of timers.
◆ timer_index_t [2/2]
Definiton of the index of timers.
◆ timer_index [1/2]
Definiton of the index of timers.
| 枚举值 |
|---|
| TIMER_INDEX_0 | Timer0 index.
|
| TIMER_INDEX_1 | Timer1 index.
|
| TIMER_INDEX_2 | Timer2 index.
|
| TIMER_MAX_NUM | |
◆ timer_index [2/2]
Definiton of the index of timers.
| 枚举值 |
|---|
| TIMER_INDEX_0 | Timer0 index.
|
| TIMER_INDEX_1 | Timer1 index.
|
| TIMER_INDEX_2 | Timer2 index.
|
| TIMER_MAX_NUM | |
◆ timer_port_register_hal_funcs()
将hal funcs对象注册到hal_timer模块中。
◆ timer_port_register_irq()
| void timer_port_register_irq |
( |
timer_index_t |
index, |
|
|
uint32_t |
id, |
|
|
uint16_t |
priority |
|
) |
| |
◆ timer_port_unregister_hal_funcs()
从hal_timer模块注销hal funcs对象。
◆ timer_port_unregister_irq()
| void timer_port_unregister_irq |
( |
timer_index_t |
index, |
|
|
uint32_t |
id |
|
) |
| |
◆ timer_porting_base_addr_get()
◆ timer_porting_clock_value_get()
| uint32_t timer_porting_clock_value_get |
( |
void |
| ) |
|
◆ timer_porting_clock_value_set()
| void timer_porting_clock_value_set |
( |
uint32_t |
clock | ) |
|
更新timer的时钟频率值,此值应和真实输入时钟频率保持一致
◆ timer_porting_comm_addr_get()
| uintptr_t timer_porting_comm_addr_get |
( |
void |
| ) |
|
◆ timer_porting_compensat_by_tcxo()
◆ timer_porting_cycle_2_us()
| uint32_t timer_porting_cycle_2_us |
( |
uint64_t |
cycle | ) |
|
◆ timer_porting_us_2_cycle()
| uint64_t timer_porting_us_2_cycle |
( |
uint32_t |
us | ) |
|