21#define SYS_TIME_NTP_SERVER_KEY1 "ro.time.ntp1"
22#define SYS_TIME_NTP_SERVER_KEY2 "ro.time.ntp2"
23#define SYS_TIME_NTP_SERVER_KEY3 "ro.time.ntp3"
24#define SYS_TIME_NTP_SERVER_DFT_VAL1 "ntp.shu.edu.cn"
25#define SYS_TIME_NTP_SERVER_DFT_VAL2 "ntp1.aliyun.com"
26#define SYS_TIME_NTP_SERVER_DFT_VAL3 "ntp2.aliyun.com"
27#define SYS_TIME_NTP_SERVER_ID_1 "ntp1"
28#define SYS_TIME_NTP_SERVER_ID_2 "ntp2"
29#define SYS_TIME_NTP_SERVER_ID_3 "ntp3"
30#define SYS_TIME_ZONE_KEY "ro.time.timezone"
31#define SYS_TIME_ZONE_DEFAULT "+08:00"
32#define SYS_TIME_ZONE_LEN 16
37 SYS_TIME_TYPE_MCU_CALC,
38 SYS_TIME_TYPE_GPS_CALC,
39 SYS_TIME_TYPE_NTP_CALC,
40 SYS_TIME_TYPE_TSP_CALC,
41} sys_time_calc_type_t;
53 char zone_time[SYS_TIME_ZONE_LEN];
58typedef void (*sys_time_cb_t)(
tbox_time_info_t* time_info_t, sys_time_calc_type_t type);
void sys_time_create_oneshot(void)
创建一次性校时任务
void sys_time_mcu_rtc(const uint8_t *data, uint32_t len)
处理MCU RTC时间回调
void sys_time_set_by_tsp(time_t ts)
TSP 时间源设置系统时间