]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/InternalSmbusLib.h
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkPkg / Library / PeiSmbusLibSmbusPpi / InternalSmbusLib.h
CommitLineData
a67d1f18 1/** @file\r
b2cefd7c 2 Internal header file for Smbus library.\r
a67d1f18 3\r
1c2f052d 4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
22a69a5e 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
a67d1f18 6\r
a67d1f18 7**/\r
8\r
4ebb0d9e 9#ifndef _INTERNAL_SMBUS_LIB_H_\r
10#define _INTERNAL_SMBUS_LIB_H_\r
a67d1f18 11\r
ed7748fe 12\r
a67d1f18 13#include <FrameworkPei.h>\r
ed7748fe 14\r
a67d1f18 15#include <Ppi/Smbus.h>\r
ed7748fe 16\r
a67d1f18 17#include <Library/SmbusLib.h>\r
18#include <Library/DebugLib.h>\r
22936e95 19#include <Library/PeiServicesLib.h>\r
a67d1f18 20#include <Library/BaseMemoryLib.h>\r
c6ad4aa6 21#include <Library/PeiServicesTablePointerLib.h>\r
a67d1f18 22\r
a67d1f18 23//\r
24// Declaration for internal functions\r
25//\r
26\r
27/**\r
28 Gets Smbus PPIs.\r
29\r
30 This internal function retrieves Smbus PPI from PPI database.\r
31\r
22936e95 32 @param VOID\r
a67d1f18 33\r
34 @return The pointer to Smbus PPI.\r
35\r
36**/\r
37EFI_PEI_SMBUS_PPI *\r
38InternalGetSmbusPpi (\r
22936e95 39 VOID\r
a67d1f18 40 );\r
41\r
42/**\r
1c2f052d 43 Executes an SMBus operation to an SMBus controller.\r
a67d1f18 44\r
45 This function provides a standard way to execute Smbus script\r
46 as defined in the SmBus Specification. The data can either be of\r
47 the Length byte, word, or a block of data.\r
48\r
49 @param SmbusOperation Signifies which particular SMBus hardware protocol instance that it will use to\r
50 execute the SMBus transactions.\r
51 @param SmBusAddress Address that encodes the SMBUS Slave Address,\r
52 SMBUS Command, SMBUS Data Length, and PEC.\r
53 @param Length Signifies the number of bytes that this operation will do. The maximum number of\r
54 bytes can be revision specific and operation specific.\r
55 @param Buffer Contains the value of data to execute to the SMBus slave device. Not all operations\r
56 require this argument. The length of this buffer is identified by Length.\r
57 @param Status Return status for the executed command.\r
58 This is an optional parameter and may be NULL.\r
59\r
60 @return The actual number of bytes that are executed for this operation.\r
61\r
62**/\r
63UINTN\r
64InternalSmBusExec (\r
65 IN EFI_SMBUS_OPERATION SmbusOperation,\r
66 IN UINTN SmBusAddress,\r
67 IN UINTN Length,\r
68 IN OUT VOID *Buffer,\r
69 OUT RETURN_STATUS *Status OPTIONAL\r
70 );\r
71\r
72#endif\r