Time.Month = RtcRead (RTC_ADDRESS_MONTH);\r
Time.Year = RtcRead (RTC_ADDRESS_YEAR);\r
\r
- Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));\r
-\r
+ Century = RtcRead (RTC_ADDRESS_CENTURY);\r
+ Time.Year = (UINT16) (Century * 100 + Time.Year);\r
+ \r
//\r
// Set RTC configuration after get original time\r
// The value of bit AIE should be reserved.\r
Time->Month = RtcRead (RTC_ADDRESS_MONTH);\r
Time->Year = RtcRead (RTC_ADDRESS_YEAR);\r
\r
- Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));\r
-\r
+ Century = RtcRead (RTC_ADDRESS_CENTURY);\r
+ Time->Year = (UINT16) (Century * 100 + Time->Year);\r
+ \r
//\r
// Release RTC Lock.\r
//\r
Time->Year = RtcRead (RTC_ADDRESS_YEAR);\r
}\r
\r
- Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));\r
-\r
+ Century = RtcRead (RTC_ADDRESS_CENTURY);\r
+ Time->Year = (UINT16) (Century * 100 + Time->Year);\r
+ \r
//\r
// Release RTC Lock.\r
//\r