/********************************************************************** * Copyright: (C)2024 LingYun IoT System Studio * Author: GuoWenxue * * Description: ISL1208 RTC driver on ISKBoard * * ChangeLog: * Version Date Author Description * V1.0.0 2024.08.29 GuoWenxue Release initial version * ***********************************************************************/ #ifndef __ISL1208_H_ #define __ISL1208_H_ typedef struct hwclock_s { int tm_sec; /* [0 ~ 59/60 ] */ int tm_min; /* [0 ~ 59 ] */ int tm_hour; /* [0 ~ 23 ] */ int tm_mday; /* [1 ~ 31] */ int tm_mon; /* [1 ~ 12] */ int tm_year; /* [ 2000~2099 ] */ int tm_wday; /* [0 ~ 6 ] */ } hwclock_t; extern const char *weekday[7]; /* Set RTC time by struct $tm */ extern int set_hwclock(hwclock_t tm); /* Get RTC time by struct $tm */ extern int get_hwclock(hwclock_t *tm); /* Set RTC time by time string format: "2024-08-29 12:08:08" */ extern int set_rtctime(char *time); /* Get RTC time by time string format: "2024-08-29 12:08:08" */ extern int get_rtctime(char *buf, int size); /* Print RTC time by time string format: "2024-08-29 12:08:08" */ extern void print_rtctime(void); #endif /* __ISL1208_H_ */