]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.h
Make RTC module pass build.
[mirror_edk2.git] / MdeModulePkg / Universal / PcatRealTimeClockRuntimeDxe / PcRtc.h
index 55ed7c3700e8fda07d99492df78ecd221eb02b78..6cb915886dc79119479d17628cabc0f6b4249695 100644 (file)
@@ -1,42 +1,27 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation. All rights reserved. \r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
-\r
+/** @file\r
+  Header file for real time clock driver.\r
 \r
-Module Name:\r
-  \r
-    PcRtc.h\r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
 \r
-Abstract:\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-    Include for real time clock driver\r
+**/\r
 \r
-Revision History\r
-\r
-\r
---*/\r
 \r
 #ifndef _RTC_H_\r
 #define _RTC_H_\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
+\r
 #include <PiDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
+\r
 #include <Protocol/RealTimeClock.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
+#include <Guid/GenericPlatformVariable.h>\r
+\r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiLib.h>\r
@@ -47,11 +32,12 @@ Revision History
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
 \r
 typedef struct {\r
   EFI_LOCK  RtcLock;\r
-  UINT16    SavedTimeZone;\r
+  INT16     SavedTimeZone;\r
   UINT8     Daylight;\r
 } PC_RTC_MODULE_GLOBALS;\r
 \r
@@ -413,27 +399,27 @@ Returns:
 --*/\r
 ;\r
 \r
-VOID\r
-ConvertRtcTimeToEfiTime (\r
-  IN EFI_TIME       *Time,\r
-  IN RTC_REGISTER_B RegisterB\r
-  )\r
-/*++\r
+/**\r
+  Converts time read from RTC to EFI_TIME format defined by UEFI spec.\r
 \r
-Routine Description:\r
-\r
-  GC_TODO: Add function description\r
+  This function converts raw time data read from RTC to the EFI_TIME format\r
+  defined by UEFI spec.\r
+  If data mode of RTC is BCD, then converts it to decimal,\r
+  If RTC is in 12-hour format, then converts it to 24-hour format.\r
 \r
-Arguments:\r
-\r
-  Time      - GC_TODO: add argument description\r
-  RegisterB - GC_TODO: add argument description\r
+  @param   Time       On input, the time data read from RTC to convert\r
+                      On output, the time converted to UEFI format\r
+  @param   Century    Value of century read from RTC.\r
+  @param   RegisterB  Value of Register B of RTC, indicating data mode\r
+                      and hour format.\r
 \r
-Returns:\r
-\r
-  GC_TODO: add return values\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+ConvertRtcTimeToEfiTime (\r
+  IN OUT EFI_TIME        *Time,\r
+  IN     UINT8           Century,\r
+  IN     RTC_REGISTER_B  RegisterB\r
+  )\r
 ;\r
 \r
 EFI_STATUS\r