| | |
| | | #include "gpio.h" |
| | | #include "system_general_para.h" |
| | | |
| | | __IO sClockBCD sys_clockBCD_g = {24,1,1,0,0,0}; |
| | | __IO sClockBCD sys_clockBCD_g = {0x24,1,1,0,0,0}; |
| | | |
| | | |
| | | void RTC_GPIO_Init(void) |
| | |
| | | |
| | | //ÉèÖÃÍⲿRTCʱ¼ä |
| | | //²ÎÊý£ºBCD¸ñʽ |
| | | 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 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) |
| | | { |
| | | uint8_t rtc_time[7] = {0,0,0,0,1,1,0x15}; |
| | | sClockBCD calendar_l; |
| | |
| | | rtc_time[5] = month; |
| | | rtc_time[6] = year; |
| | | R8025T_Write(0,rtc_time,7); |
| | | return PASS; |
| | | } |
| | | |
| | | return FAIL; |
| | | } |
| | | |
| | | //»ñÈ¡ÍⲿRTCʱ¼ä |