]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/I2CLibPei/I2CDelayPei.c
2 MicroSecondDelay implementation of ACPI Timer.
4 Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include "I2CAccess.h"
18 #include "I2CDelayPei.h"
19 #include <Library/DebugLib.h>
20 #include <Library/PeiServicesTablePointerLib.h>
21 #include <Ppi/Stall.h>
24 Stalls the CPU for at least the given number of microseconds.
25 Stalls the CPU for the number of microseconds specified by MicroSeconds.
27 @param MicroSeconds The minimum number of microseconds to delay.
39 EFI_PEI_STALL_PPI
*StallPpi
;
41 CONST EFI_PEI_SERVICES
**PeiServices
;
43 PeiServices
= GetPeiServicesTablePointer();
46 Status
= (**PeiServices
).LocatePpi (PeiServices
, &gEfiPeiStallPpiGuid
, 0, NULL
, &StallPpi
);
47 ASSERT(!EFI_ERROR(Status
));
49 StallPpi
->Stall (PeiServices
, StallPpi
, MicroSeconds
);