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