📄 rtc.h.bak
字号:
typedef union
{ uint32 l_word;
struct
{
uint32 hour :8;
uint32 minute :8;
uint32 second :16;
}fields;
} type_RTC_time_rec;
typedef union
{ uint32 l_word;
struct
{
uint32 year :12;
uint32 week :4;
uint32 month :8;
uint32 day :8;
}fields;
} type_RTC_date_rec;
/******************************
**读取实时时钟时间
**返回时间,按 type_RTC_time_rec结构返回
******************************/
extern uint32 RTC_read_time(void);
/******************************
**设置实时时钟时间
**入口参数为type_RTC_time_rec结构时间
**返回-1则失败,其他则成功
******************************/
extern int16 RTC_set_time(uint32 time_rec);
/******************************
**读取实时时钟日期
**返回日期,按 type_RTC_date_rec结构返回
******************************/
extern uint32 RTC_read_date(void);
/******************************
**设置实时时钟日期
**入口参数为type_RTC_date_rec结构日期
**返回-1则失败,其他则成功
******************************/
extern int16 RTC_set_date(uint32 date_rec);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -