|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include <stdint.h>

宏定义 | |
| #define | MS_PER_S 1000 |
| #define | US_PER_MS 1000 |
| #define | TIMER_1_CYCLE 1 |
| #define | TIMER_2_CYCLE 2 |
| #define | HAL_TCXO_TICKS_PER_SECOND 24000000 |
| #define | TIMER_COMPENSAT_1_CYCLE_BY_TCXO (HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE) |
| #define | TIMER_COMPENSAT_2_CYCLE_BY_TCXO (2 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE) |
| #define | TIMER_COMPENSAT_3_CYCLE_BY_TCXO (3 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_TIMER_CLOCK_VALUE) |
类型定义 | |
| typedef enum timer_index | timer_index_t |
| Definiton of the index of timers. | |
枚举 | |
| enum | timer_index { TIMER_INDEX_0 , TIMER_INDEX_1 , TIMER_INDEX_2 , TIMER_MAX_NUM } |
| Definiton of the index of timers. 更多... | |
函数 | |
| uintptr_t | timer_porting_comm_addr_get (void) |
| 获取硬件定时器公共寄存器的基地址。 | |
| uintptr_t | timer_porting_base_addr_get (timer_index_t index) |
| 获取指定的硬件定时器的基地址。 | |
| void | timer_port_register_irq (timer_index_t index, uint32_t id, uint16_t priority) |
| Timer注册中断。 | |
| void | timer_port_unregister_irq (timer_index_t index, uint32_t id) |
| Timer去注册中断。 | |
| void | timer_porting_clock_value_set (uint32_t clock) |
| 更新timer的时钟频率值,此值应和真实输入时钟频率保持一致 | |
| uint32_t | timer_porting_clock_value_get (void) |
| 获取timer时钟频率 | |
| uint64_t | timer_porting_us_2_cycle (uint32_t us) |
| 毫秒转换为计数 | |
| uint32_t | timer_porting_cycle_2_us (uint64_t cycle) |
| 毫秒转换为计数 | |
| uint64_t | timer_porting_compensat_by_tcxo (uint64_t diff) |