Function gx_rtc_set_prescaler¶
-
int gx_rtc_set_prescaler(unsigned int prescaler)¶
设置硬件 CPSR 分频系数
仅在 cpsr_enable = 1 时有效,须在 gx_rtc_init() 之前调用。 CCVR 计数频率 tick_hz = pclk / prescaler,prescaler 取值范围 1 ~ 0xffff。 prescaler 为 0 时,init 内部默认设为 pclk(1Hz)。
- 参数
prescaler -- CPSR 分频系数
- Returns 0
成功
- Returns -1
失败
- 返回
int 是否成功