WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
rtc_porting.h 文件参考
#include "tcxo_porting.h"
rtc_porting.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define RTC_CLOCK_MAX_NUM   4
 
#define MS_PER_S   1000
 
#define US_PER_MS   1000
 
#define MAX_UINT32   0xFFFFFFFF
 
#define MAX_UINT64   0xFFFFFFFFFFFFFFFFULL
 
#define RTC_MAX_MS   (MAX_UINT32 / CONFIG_RTC_CLOCK_VALUE * MS_PER_S - 1)
 
#define RTC_HW_MAX_MS   (MAX_UINT32 / CONFIG_RTC_CLOCK_VALUE * MS_PER_S - 1)
 
#define RTC_1_CYCLE   1
 
#define RTC_2_CYCLE   2
 
#define RTC_COMPENSAT_1_CYCLE_BY_TCXO   (HAL_TCXO_TICKS_PER_SECOND / CONFIG_RTC_CLOCK_VALUE)
 
#define RTC_COMPENSAT_2_CYCLE_BY_TCXO   (2 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_RTC_CLOCK_VALUE)
 
#define RTC_COMPENSAT_3_CYCLE_BY_TCXO   (3 * HAL_TCXO_TICKS_PER_SECOND / CONFIG_RTC_CLOCK_VALUE)
 

枚举

enum  rtc_index_t {
  RTC_0 , RTC_1 , RTC_2 , RTC_3 ,
  RTC_MAX_NUM = 4
}
 rtc索引的定义. 更多...
 

函数

uintptr_t rtc_porting_comm_addr_get (void)
 获取硬件定时器公共寄存器的基地址。
 
uintptr_t rtc_porting_base_addr_get (rtc_index_t index)
 获取指定rtc的基地址。
 
void rtc_port_register_irq (rtc_index_t index, uint32_t id, uint16_t priority)
 rtc注册中断。
 
void rtc_port_unregister_irq (rtc_index_t index, uint32_t id)
 rtc去注册中断。
 
void rtc_porting_clock_value_update (uint32_t clock)
 更新RTC的时钟频率值,此值应和真实输入时钟频率保持一致
 
uint32_t rtc_porting_clock_value_get (void)
 获取RTC时钟频率
 
uint64_t rtc_porting_ms_2_cycle (uint32_t ms)
 
uint64_t rtc_hw_porting_ms_2_cycle (uint64_t ms)
 
uint32_t rtc_porting_cycle_2_us (uint64_t cycle)
 
uint64_t rtc_porting_compensat_by_tcxo (uint64_t diff)