Files
SM-1000M/RTX5_20220316/Driver/DS3231/DS3231.h
2026-04-23 10:50:18 +08:00

28 lines
552 B
C

#include "sys.h"
#ifndef __DS3231_H__
#define __DS3231_H__
typedef struct
{
u8 hour;
u8 min;
u8 sec;
u32 w_year;
u8 w_month;
u8 w_date;
u8 week;
}_calendar_obj;
extern _calendar_obj calendar; //日历结构体
extern u8 const mon_table[12]; //月份日期数据表
u8 I2cByteRead(u8 addr);
void I2cByteWrite(u8 addr,u8 bytedata);
void DS3231_Init(void);
void get_show_time(void);
//u8 RTC_Get_Week(u16 year,u8 month,u8 day);
void DS3231_Set(u8 syear,u8 smon,u8 sday,u8 hour,u8 min,u8 sec);//设置时间
void DS3231_Get(void);
#endif