]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Metronome/Metronome.h
Code scrub for Metronome driver.
[mirror_edk2.git] / MdeModulePkg / Universal / Metronome / Metronome.h
1 /** @file
2 Include file of Metronome driver.
3
4 Copyright (c) 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _METRONOME_H_
16 #define _METRONOME_H_
17
18 #include <PiDxe.h>
19 #include <Protocol/Metronome.h>
20 #include <Library/UefiBootServicesTableLib.h>
21 #include <Library/TimerLib.h>
22 #include <Library/DebugLib.h>
23
24 /**
25 Waits for the specified number of ticks.
26
27 This function implements EFI_METRONOME_ARCH_PROTOCOL.WaitForTick().
28 The WaitForTick() function waits for the number of ticks specified by
29 TickNumber from a known time source in the platform. If TickNumber of
30 ticks are detected, then EFI_SUCCESS is returned. The actual time passed
31 between entry of this function and the first tick is between 0 and
32 TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod
33 time has elapsed, wait for two ticks. This function waits for a hardware
34 event to determine when a tick occurs. It is possible for interrupt
35 processing, or exception processing to interrupt the execution of the
36 WaitForTick() function. Depending on the hardware source for the ticks, it
37 is possible for a tick to be missed. This function cannot guarantee that
38 ticks will not be missed. If a timeout occurs waiting for the specified
39 number of ticks, then EFI_TIMEOUT is returned.
40
41 @param This The EFI_METRONOME_ARCH_PROTOCOL instance.
42 @param TickNumber Number of ticks to wait.
43
44 @retval EFI_SUCCESS The wait for the number of ticks specified by TickNumber
45 succeeded.
46 @retval EFI_TIMEOUT A timeout occurred waiting for the specified number of ticks.
47
48 **/
49 EFI_STATUS
50 EFIAPI
51 WaitForTick (
52 IN EFI_METRONOME_ARCH_PROTOCOL *This,
53 IN UINT32 TickNumber
54 );
55
56 #endif