| | |
| | | #define _EXTERN_RTC_H_ |
| | | |
| | | #include "define_all.h" |
| | | |
| | | |
| | | //ÍⲿRTCÖжÏIO |
| | | #define EXT_RTC_INT_PORT GPIOD |
| | | #define EXT_RTC_INT_PIN GPIO_Pin_6 // P3.2 IIC SCA ÐźŠ|
| | | |
| | | |
| | | #include "rtc.h" |
| | | |
| | | // <<< Use Configuration Wizard in Context Menu >>> |
| | | |
| | |
| | | uint16_t year; |
| | | }CALENDAR_TIME_T;//BCD |
| | | |
| | | |
| | | |
| | | typedef struct |
| | | { |
| | | uint8_t year; //Ä꣬BCD Âë 00~99 |
| | | uint8_t month; //Ô£¬BCD Âë 01~12 |
| | | uint8_t day; //ÈÕ£¬BCD Âë 01~31 |
| | | uint8_t hour; //ʱ£¬BCD Âë 00~23 |
| | | uint8_t min; //·Ö£¬BCD Âë 00~59 |
| | | uint8_t sec; //Ã룬BCD Âë 00~59 |
| | | }sClockBCD; |
| | | |
| | | |
| | | |
| | | |
| | | #pragma pack() |
| | | |
| | | void RTC_GPIO_Init(void); |
| | | |
| | | void Set_Extern_Rtc_Time(uint16_t year,uint8_t month,uint8_t day,uint8_t week,uint8_t hour,uint8_t min,uint8_t sec); |
| | | ErrorStatus Get_Extern_Rtc_Time(__IO sClockBCD * calendar_p); |
| | | void Get_Extern_Rtc_Time(__IO CALENDAR_TIME_T * calendar_p); |
| | | |
| | | void Set_Rtc_UpdataInterrupt(void); |
| | | |
| | | extern __IO sClockBCD sys_clockBCD_g; |
| | | |
| | | |
| | | ErrorStatus TimeEffectJudgm(const sClockBCD TimeBCD); |
| | | //extern __IO CALENDAR_TIME_T calendar_g; |
| | | extern __IO CALENDAR_TIME_T calendar_test_g; |
| | | |
| | | #endif |
| | | |