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