rtc.h.bak

来自「MCU为LPC2220,FLASH为39FV1601(地址0x80000000)」· BAK 代码 · 共 45 行

BAK
45
字号
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 + =
减小字号Ctrl + -
显示快捷键?