]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Timer.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / Timer.h
index cde312a3df09883138ae00fc01b88cdd63a9f16c..41b17dbf1fda9853387fa55a0739537c5d761277 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-  Timer Architectural Protocol as defined in the DXE CIS\r
+  Timer Architectural Protocol as defined in PI Specification VOLUME 2 DXE\r
 \r
   This code is used to provide the timer tick for the DXE core.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 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
   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
-  @par Revision Reference:\r
-  Version 0.91B.\r
-\r
 **/\r
 \r
 #ifndef __ARCH_PROTOCOL_TIMER_H__\r
 #define __ARCH_PROTOCOL_TIMER_H__\r
 \r
-//\r
-// Global ID for the Timer Architectural Protocol\r
-//\r
+///\r
+/// Global ID for the Timer Architectural Protocol\r
+///\r
 #define EFI_TIMER_ARCH_PROTOCOL_GUID \\r
   { 0x26baccb3, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }\r
 \r
-//\r
-// Declare forward reference for the Timer Architectural Protocol\r
-//\r
+///\r
+/// Declare forward reference for the Timer Architectural Protocol\r
+///\r
 typedef struct _EFI_TIMER_ARCH_PROTOCOL   EFI_TIMER_ARCH_PROTOCOL;\r
 \r
 /**\r
   This function of this type is called when a timer interrupt fires.  This \r
   function executes at TPL_HIGH_LEVEL.  The DXE Core will register a funtion\r
-  of tyis type to be called for the timer interrupt, so it can know how much \r
+  of this type to be called for the timer interrupt, so it can know how much \r
   time has passed.  This information is used to signal timer based events.  \r
 \r
-  @param  Time             Time since the last timer interrupt in 100 ns units. This will\r
-                           typically be TimerPeriod, but if a timer interrupt is missed, and the\r
-                           EFI_TIMER_ARCH_PROTOCOL driver can detect missed interrupts, then Time\r
-                           will contain the actual amount of time since the last interrupt.\r
+  @param  Time   Time since the last timer interrupt in 100 ns units. This will\r
+                 typically be TimerPeriod, but if a timer interrupt is missed, and the\r
+                 EFI_TIMER_ARCH_PROTOCOL driver can detect missed interrupts, then Time\r
+                 will contain the actual amount of time since the last interrupt.\r
 \r
   None.\r
 \r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_TIMER_NOTIFY) (\r
+(EFIAPI *EFI_TIMER_NOTIFY)(\r
   IN UINT64  Time\r
   );\r
 \r
@@ -82,7 +79,7 @@ VOID
 **/\r
 typedef \r
 EFI_STATUS\r
-(EFIAPI *EFI_TIMER_REGISTER_HANDLER) (\r
+(EFIAPI *EFI_TIMER_REGISTER_HANDLER)(\r
   IN EFI_TIMER_ARCH_PROTOCOL    *This,\r
   IN EFI_TIMER_NOTIFY           NotifyFunction\r
 );\r
@@ -115,7 +112,7 @@ EFI_STATUS
 **/\r
 typedef \r
 EFI_STATUS\r
-(EFIAPI *EFI_TIMER_SET_TIMER_PERIOD) (\r
+(EFIAPI *EFI_TIMER_SET_TIMER_PERIOD)(\r
   IN EFI_TIMER_ARCH_PROTOCOL    *This,\r
   IN UINT64                     TimerPeriod\r
   );\r
@@ -136,7 +133,7 @@ EFI_STATUS
 **/\r
 typedef \r
 EFI_STATUS\r
-(EFIAPI *EFI_TIMER_GET_TIMER_PERIOD) (\r
+(EFIAPI *EFI_TIMER_GET_TIMER_PERIOD)(\r
   IN EFI_TIMER_ARCH_PROTOCOL      *This,\r
   OUT UINT64                      *TimerPeriod\r
   );\r
@@ -150,7 +147,7 @@ EFI_STATUS
   registered handler should not be able to distinguish a hardware-generated timer \r
   interrupt from a software-generated timer interrupt.\r
 \r
-  @param  This             The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param  This                  The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS           The soft timer interrupt was generated.\r
   @retval EFI_UNSUPPORTEDT      The platform does not support the generation of soft timer interrupts.\r
@@ -158,45 +155,19 @@ EFI_STATUS
 **/\r
 typedef \r
 EFI_STATUS\r
-(EFIAPI *EFI_TIMER_GENERATE_SOFT_INTERRUPT) (\r
+(EFIAPI *EFI_TIMER_GENERATE_SOFT_INTERRUPT)(\r
   IN EFI_TIMER_ARCH_PROTOCOL    *This\r
   );\r
 \r
 \r
-/**\r
-  Interface stucture for the Timer Architectural Protocol.\r
-\r
-  @par Protocol Description:\r
-  This protocol provides the services to initialize a periodic timer \r
-  interrupt, and to register a handler that is called each time the timer\r
-  interrupt fires.  It may also provide a service to adjust the rate of the\r
-  periodic timer interrupt.  When a timer interrupt occurs, the handler is \r
-  passed the amount of time that has passed since the previous timer \r
-  interrupt.\r
-\r
-  @param RegisterHandler\r
-  Registers a handler that will be called each time the \r
-  timer interrupt fires.  TimerPeriod defines the minimum \r
-  time between timer interrupts, so TimerPeriod will also \r
-  be the minimum time between calls to the registered \r
-  handler.\r
-\r
-  @param SetTimerPeriod\r
-  Sets the period of the timer interrupt in 100 nS units.  \r
-  This function is optional, and may return EFI_UNSUPPORTED.  \r
-  If this function is supported, then the timer period will \r
-  be rounded up to the nearest supported timer period.\r
-\r
-  @param GetTimerPeriod\r
-  Retrieves the period of the timer interrupt in 100 nS units.\r
-\r
-  @param GenerateSoftInterrupt\r
-  Generates a soft timer interrupt that simulates the firing of \r
-  the timer interrupt. This service can be used to invoke the \r
-  registered handler if the timer interrupt has been masked for \r
-  a period of time.\r
-\r
-**/\r
+///\r
+/// This protocol provides the services to initialize a periodic timer \r
+/// interrupt, and to register a handler that is called each time the timer\r
+/// interrupt fires.  It may also provide a service to adjust the rate of the\r
+/// periodic timer interrupt.  When a timer interrupt occurs, the handler is \r
+/// passed the amount of time that has passed since the previous timer \r
+/// interrupt.\r
+///\r
 struct _EFI_TIMER_ARCH_PROTOCOL {\r
   EFI_TIMER_REGISTER_HANDLER          RegisterHandler;\r
   EFI_TIMER_SET_TIMER_PERIOD          SetTimerPeriod;\r