mirror of https://github.com/acidanthera/audk.git
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:
parent
d6321d6ef9
commit
9a1eee2339
|
@ -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.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue