/********************************************************************** * Copyright: (C)2023 LingYun IoT System Studio * Author: GuoWenxue QQ: 281143292 * Description: ISKBoard ISL1208 RTC chip Hardware Abstract Layer driver * * ChangeLog: * Version Date Author Description * V1.0.0 2023.04.3 GuoWenxue Release initial version ***********************************************************************/ #ifndef INC_ISL1208_H_ #define INC_ISL1208_H_ #include "i2c_bitbang.h" #define ISL1208_I2CBUS I2CBUS0 /* ISL1208 on GPIO I2C bus0 */ #define ISL1208_CHIPADDR 0x6F /* ISL1208 7-Bits Chip address */ typedef struct rtc_time_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 ] */ } rtc_time_t; extern const char *weekday[7]; extern int set_rtc_time(rtc_time_t tm); extern int get_rtc_time(rtc_time_t *tm); extern void print_rtc_time(void); #endif /* INC_ISL1208_H_ */