]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Metronome/Metronome.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / Metronome / Metronome.h
CommitLineData
92733d45 1/** @file\r
2 Include file of Metronome driver.\r
3\r
d1102dba 4Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
92733d45 6\r
7**/\r
8\r
9#ifndef _METRONOME_H_\r
10#define _METRONOME_H_\r
11\r
12#include <PiDxe.h>\r
13#include <Protocol/Metronome.h>\r
14#include <Library/UefiBootServicesTableLib.h>\r
15#include <Library/TimerLib.h>\r
16#include <Library/DebugLib.h>\r
32610f38 17#include <Library/UefiDriverEntryPoint.h>\r
92733d45 18\r
19/**\r
20 Waits for the specified number of ticks.\r
d1102dba 21\r
92733d45 22 This function implements EFI_METRONOME_ARCH_PROTOCOL.WaitForTick().\r
d1102dba
LG
23 The WaitForTick() function waits for the number of ticks specified by\r
24 TickNumber from a known time source in the platform. If TickNumber of\r
25 ticks are detected, then EFI_SUCCESS is returned. The actual time passed\r
26 between entry of this function and the first tick is between 0 and\r
27 TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod\r
28 time has elapsed, wait for two ticks. This function waits for a hardware\r
29 event to determine when a tick occurs. It is possible for interrupt\r
30 processing, or exception processing to interrupt the execution of the\r
31 WaitForTick() function. Depending on the hardware source for the ticks, it\r
32 is possible for a tick to be missed. This function cannot guarantee that\r
33 ticks will not be missed. If a timeout occurs waiting for the specified\r
92733d45 34 number of ticks, then EFI_TIMEOUT is returned.\r
35\r
36 @param This The EFI_METRONOME_ARCH_PROTOCOL instance.\r
37 @param TickNumber Number of ticks to wait.\r
38\r
39 @retval EFI_SUCCESS The wait for the number of ticks specified by TickNumber\r
40 succeeded.\r
41 @retval EFI_TIMEOUT A timeout occurred waiting for the specified number of ticks.\r
42\r
43**/\r
44EFI_STATUS\r
45EFIAPI\r
46WaitForTick (\r
47 IN EFI_METRONOME_ARCH_PROTOCOL *This,\r
48 IN UINT32 TickNumber\r
49 );\r
50\r
51#endif\r