Update for NetworkPkg.
[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
2b3687db
HT
4Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials \r
a67d1f18 6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
a67d1f18 13**/\r
14\r
4ebb0d9e 15#ifndef _INTERNAL_SMBUS_LIB_H_\r
16#define _INTERNAL_SMBUS_LIB_H_\r
a67d1f18 17\r
ed7748fe 18\r
a67d1f18 19#include <FrameworkPei.h>\r
ed7748fe 20\r
a67d1f18 21#include <Ppi/Smbus.h>\r
ed7748fe 22\r
a67d1f18 23#include <Library/SmbusLib.h>\r
24#include <Library/DebugLib.h>\r
22936e95 25#include <Library/PeiServicesLib.h>\r
a67d1f18 26#include <Library/BaseMemoryLib.h>\r
c6ad4aa6 27#include <Library/PeiServicesTablePointerLib.h>\r
a67d1f18 28\r
a67d1f18 29//\r
30// Declaration for internal functions\r
31//\r
32\r
33/**\r
34 Gets Smbus PPIs.\r
35\r
36 This internal function retrieves Smbus PPI from PPI database.\r
37\r
22936e95 38 @param VOID\r
a67d1f18 39\r
40 @return The pointer to Smbus PPI.\r
41\r
42**/\r
43EFI_PEI_SMBUS_PPI *\r
44InternalGetSmbusPpi (\r
22936e95 45 VOID\r
a67d1f18 46 );\r
47\r
48/**\r
49 Executes an SMBus operation to an SMBus controller. \r
50\r
51 This function provides a standard way to execute Smbus script\r
52 as defined in the SmBus Specification. The data can either be of\r
53 the Length byte, word, or a block of data.\r
54\r
55 @param SmbusOperation Signifies which particular SMBus hardware protocol instance that it will use to\r
56 execute the SMBus transactions.\r
57 @param SmBusAddress Address that encodes the SMBUS Slave Address,\r
58 SMBUS Command, SMBUS Data Length, and PEC.\r
59 @param Length Signifies the number of bytes that this operation will do. The maximum number of\r
60 bytes can be revision specific and operation specific.\r
61 @param Buffer Contains the value of data to execute to the SMBus slave device. Not all operations\r
62 require this argument. The length of this buffer is identified by Length.\r
63 @param Status Return status for the executed command.\r
64 This is an optional parameter and may be NULL.\r
65\r
66 @return The actual number of bytes that are executed for this operation.\r
67\r
68**/\r
69UINTN\r
70InternalSmBusExec (\r
71 IN EFI_SMBUS_OPERATION SmbusOperation,\r
72 IN UINTN SmBusAddress,\r
73 IN UINTN Length,\r
74 IN OUT VOID *Buffer,\r
75 OUT RETURN_STATUS *Status OPTIONAL\r
76 );\r
77\r
78#endif\r