blob: c62efc3c57d6a721c6f95c7ea82d7df167ff1040 [file] [log] [blame]
zongqiang.zhang0c6a0882019-08-07 14:48:21 +08001#ifndef __rtc_h__
2#define __rtc_h__
3
4#include "stm32f10x.h"
5
6//ϵͳʱ¼ä½á¹¹
7typedef struct
8{
9 uint8_t year; //Äê
10 uint8_t month; //ÔÂ
11 uint8_t day; //ÈÕ
12 uint8_t week; //ÐÇÆÚ
13 uint8_t hour; //ʱ
14 uint8_t minute; //·Ö
15 uint8_t second; //Ãë
16}_SystemTime ;
17
18//extern _SystemTime SystemTime,SystemTimeBak;
19
20extern void rtc_init(void);
21extern uint8_t rtc_set_time(_SystemTime* t);
22extern uint8_t rtc_get_time(_SystemTime* t);
23//extern uint32_t rtc_mk_time(_SystemTime* t);
24//extern uint32_t rtc_time_diff(void* t1, void* t2);
25//extern uint32_t rtc_get_counter(void);
26
27#endif