Fix date/time not work for the return value of RtcRead not need type convert.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8698 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
gikidy 2009-07-01 06:05:41 +00:00
parent d6321d6ef9
commit 9a1eee2339
1 changed files with 9 additions and 6 deletions

View File

@ -158,8 +158,9 @@ PcRtcInit (
Time.Month = RtcRead (RTC_ADDRESS_MONTH);
Time.Year = RtcRead (RTC_ADDRESS_YEAR);
Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));
Century = RtcRead (RTC_ADDRESS_CENTURY);
Time.Year = (UINT16) (Century * 100 + Time.Year);
//
// Set RTC configuration after get original time
// The value of bit AIE should be reserved.
@ -281,8 +282,9 @@ PcRtcGetTime (
Time->Month = RtcRead (RTC_ADDRESS_MONTH);
Time->Year = RtcRead (RTC_ADDRESS_YEAR);
Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));
Century = RtcRead (RTC_ADDRESS_CENTURY);
Time->Year = (UINT16) (Century * 100 + Time->Year);
//
// Release RTC Lock.
//
@ -508,8 +510,9 @@ PcRtcGetWakeupTime (
Time->Year = RtcRead (RTC_ADDRESS_YEAR);
}
Century = BcdToDecimal8 (RtcRead (RTC_ADDRESS_CENTURY));
Century = RtcRead (RTC_ADDRESS_CENTURY);
Time->Year = (UINT16) (Century * 100 + Time->Year);
//
// Release RTC Lock.
//