mirror of https://github.com/acidanthera/audk.git
Code Scrub:
MdeModulePkg\Universal\PcatRealTimeClockRuntimeDxe git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6468 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5754266570
commit
21176834e0
|
@ -750,7 +750,7 @@ ConvertRtcTimeToEfiTime (
|
||||||
{
|
{
|
||||||
BOOLEAN IsPM;
|
BOOLEAN IsPM;
|
||||||
|
|
||||||
if ((Time->Hour) & 0x80) {
|
if ((Time->Hour & 0x80) != 0) {
|
||||||
IsPM = TRUE;
|
IsPM = TRUE;
|
||||||
} else {
|
} else {
|
||||||
IsPM = FALSE;
|
IsPM = FALSE;
|
||||||
|
@ -863,7 +863,7 @@ RtcTimeFieldsValid (
|
||||||
Time->Second > 59 ||
|
Time->Second > 59 ||
|
||||||
Time->Nanosecond > 999999999 ||
|
Time->Nanosecond > 999999999 ||
|
||||||
(!(Time->TimeZone == EFI_UNSPECIFIED_TIMEZONE || (Time->TimeZone >= -1440 && Time->TimeZone <= 1440))) ||
|
(!(Time->TimeZone == EFI_UNSPECIFIED_TIMEZONE || (Time->TimeZone >= -1440 && Time->TimeZone <= 1440))) ||
|
||||||
(Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT)))
|
((Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT))) != 0)
|
||||||
) {
|
) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,8 +157,7 @@ typedef union {
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
PcRtcInit (
|
PcRtcInit (
|
||||||
IN PC_RTC_MODULE_GLOBALS *Global
|
IN PC_RTC_MODULE_GLOBALS *Global
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the current local time and date information.
|
Sets the current local time and date information.
|
||||||
|
@ -175,8 +174,7 @@ EFI_STATUS
|
||||||
PcRtcSetTime (
|
PcRtcSetTime (
|
||||||
IN EFI_TIME *Time,
|
IN EFI_TIME *Time,
|
||||||
IN PC_RTC_MODULE_GLOBALS *Global
|
IN PC_RTC_MODULE_GLOBALS *Global
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current time and date information, and the time-keeping capabilities
|
Returns the current time and date information, and the time-keeping capabilities
|
||||||
|
@ -197,8 +195,7 @@ PcRtcGetTime (
|
||||||
OUT EFI_TIME *Time,
|
OUT EFI_TIME *Time,
|
||||||
OUT EFI_TIME_CAPABILITIES *Capabilities, OPTIONAL
|
OUT EFI_TIME_CAPABILITIES *Capabilities, OPTIONAL
|
||||||
IN PC_RTC_MODULE_GLOBALS *Global
|
IN PC_RTC_MODULE_GLOBALS *Global
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the system wakeup alarm clock time.
|
Sets the system wakeup alarm clock time.
|
||||||
|
@ -220,8 +217,7 @@ PcRtcSetWakeupTime (
|
||||||
IN BOOLEAN Enable,
|
IN BOOLEAN Enable,
|
||||||
IN EFI_TIME *Time, OPTIONAL
|
IN EFI_TIME *Time, OPTIONAL
|
||||||
IN PC_RTC_MODULE_GLOBALS *Global
|
IN PC_RTC_MODULE_GLOBALS *Global
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current wakeup alarm clock setting.
|
Returns the current wakeup alarm clock setting.
|
||||||
|
@ -245,8 +241,7 @@ PcRtcGetWakeupTime (
|
||||||
OUT BOOLEAN *Pending,
|
OUT BOOLEAN *Pending,
|
||||||
OUT EFI_TIME *Time,
|
OUT EFI_TIME *Time,
|
||||||
IN PC_RTC_MODULE_GLOBALS *Global
|
IN PC_RTC_MODULE_GLOBALS *Global
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The user Entry Point for PcRTC module.
|
The user Entry Point for PcRTC module.
|
||||||
|
@ -266,8 +261,7 @@ EFIAPI
|
||||||
InitializePcRtc (
|
InitializePcRtc (
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See if all fields of a variable of EFI_TIME type is correct.
|
See if all fields of a variable of EFI_TIME type is correct.
|
||||||
|
@ -281,8 +275,7 @@ InitializePcRtc (
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
RtcTimeFieldsValid (
|
RtcTimeFieldsValid (
|
||||||
IN EFI_TIME *Time
|
IN EFI_TIME *Time
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts time from EFI_TIME format defined by UEFI spec to RTC's.
|
Converts time from EFI_TIME format defined by UEFI spec to RTC's.
|
||||||
|
@ -302,8 +295,7 @@ ConvertEfiTimeToRtcTime (
|
||||||
IN OUT EFI_TIME *Time,
|
IN OUT EFI_TIME *Time,
|
||||||
IN RTC_REGISTER_B RegisterB,
|
IN RTC_REGISTER_B RegisterB,
|
||||||
OUT UINT8 *Century
|
OUT UINT8 *Century
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See if centry register of RTC is valid.
|
See if centry register of RTC is valid.
|
||||||
|
@ -314,8 +306,7 @@ ConvertEfiTimeToRtcTime (
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
RtcTestCenturyRegister (
|
RtcTestCenturyRegister (
|
||||||
VOID
|
VOID
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts time read from RTC to EFI_TIME format defined by UEFI spec.
|
Converts time read from RTC to EFI_TIME format defined by UEFI spec.
|
||||||
|
@ -353,8 +344,7 @@ ConvertRtcTimeToEfiTime (
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
RtcWaitToUpdate (
|
RtcWaitToUpdate (
|
||||||
UINTN Timeout
|
UINTN Timeout
|
||||||
)
|
);
|
||||||
;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See if field Day of an EFI_TIME is correct.
|
See if field Day of an EFI_TIME is correct.
|
||||||
|
|
Loading…
Reference in New Issue