]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Metronome/Metronome.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Metronome / Metronome.c
index 4b33db93901f423d0f49713f3f98a5238793e33b..936beae1d57a66f850aa47a8431c03950291fd87 100644 (file)
@@ -1,19 +1,5 @@
-/*++\r
-\r
-Copyright (c) 2008, 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
-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
-Module Name:\r
-\r
-  Metronome.c\r
-\r
-Abstract:\r
+/** @file\r
+  Produces the Metronome Architectural Protocol on top of Timer Library.\r
 \r
   This is a generic implementation of the Metronome Architectural Protocol that\r
   layers on top of an instance of the Timer Library.  The Timer Library provides\r
@@ -23,25 +9,20 @@ Abstract:
   microsecond units.  If the number of ticks is small, then nanoseconds are used.\r
   If the number of ticks is large, then microseconds are used.  This prevents\r
   overflows that could occur for long delays if only nanoseconds were used and also\r
-  provides the greatest accuracy for small delays. \r
+  provides the greatest accuracy for small delays.\r
 \r
---*/\r
+Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+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
-#include <PiDxe.h>\r
-#include <Protocol/Metronome.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/TimerLib.h>\r
-#include <Library/DebugLib.h>\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
-//\r
-// Function Prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-WaitForTick (\r
-  IN EFI_METRONOME_ARCH_PROTOCOL  *This,\r
-  IN UINT32                       TickNumber\r
-  );\r
+**/\r
+\r
+#include "Metronome.h"\r
 \r
 //\r
 // Handle for the Metronome Architectural Protocol instance produced by this driver\r
@@ -53,21 +34,24 @@ EFI_HANDLE  mMetronomeHandle = NULL;
 //\r
 EFI_METRONOME_ARCH_PROTOCOL mMetronome = {\r
   WaitForTick,\r
-  1            // TickPeriod = 1*100 ns units\r
+  1  // TickPeriod = 1*100 ns units\r
 };\r
 \r
 /**\r
-  The WaitForTick() function waits for the number of ticks specified by \r
-  TickNumber from a known time source in the platform.  If TickNumber of \r
-  ticks are detected, then EFI_SUCCESS is returned.  The actual time passed \r
-  between entry of this function and the first tick is between 0 and \r
-  TickPeriod 100 nS units.  If you want to guarantee that at least TickPeriod \r
-  time has elapsed, wait for two ticks.  This function waits for a hardware \r
-  event to determine when a tick occurs.  It is possible for interrupt \r
-  processing, or exception processing to interrupt the execution of the \r
-  WaitForTick() function.  Depending on the hardware source for the ticks, it \r
-  is possible for a tick to be missed.  This function cannot guarantee that \r
-  ticks will not be missed.  If a timeout occurs waiting for the specified \r
+  Waits for the specified number of ticks.\r
+\r
+  This function implements EFI_METRONOME_ARCH_PROTOCOL.WaitForTick().\r
+  The WaitForTick() function waits for the number of ticks specified by\r
+  TickNumber from a known time source in the platform.  If TickNumber of\r
+  ticks are detected, then EFI_SUCCESS is returned.  The actual time passed\r
+  between entry of this function and the first tick is between 0 and\r
+  TickPeriod 100 nS units.  If you want to guarantee that at least TickPeriod\r
+  time has elapsed, wait for two ticks.  This function waits for a hardware\r
+  event to determine when a tick occurs.  It is possible for interrupt\r
+  processing, or exception processing to interrupt the execution of the\r
+  WaitForTick() function.  Depending on the hardware source for the ticks, it\r
+  is possible for a tick to be missed.  This function cannot guarantee that\r
+  ticks will not be missed.  If a timeout occurs waiting for the specified\r
   number of ticks, then EFI_TIMEOUT is returned.\r
 \r
   @param  This             The EFI_METRONOME_ARCH_PROTOCOL instance.\r
@@ -106,9 +90,9 @@ WaitForTick (
 /**\r
   The user Entry Point for module Metronome. The user code starts with this function.\r
 \r
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.  \r
+  @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable    A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS       The entry point is executed successfully.\r
   @retval other             Some error occurs when executing this entry point.\r
 \r