]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / PeiSmbusLibSmbus2Ppi / InternalSmbusLib.h
CommitLineData
dd51a993 1/** @file\r
2Internal header file for Smbus library.\r
3\r
19388d29
HT
4Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
bad46384 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
dd51a993 12\r
13\r
14**/\r
15\r
42eedea9 16#ifndef __INTERNAL_SMBUS_LIB_H_\r
17#define __INTERNAL_SMBUS_LIB_H_\r
dd51a993 18\r
c892d846 19\r
bad46384 20#include <PiPei.h>\r
c892d846 21\r
bad46384 22#include <Ppi/Smbus2.h>\r
c892d846 23\r
bad46384 24#include <Library/SmbusLib.h>\r
25#include <Library/DebugLib.h>\r
1c280088 26#include <Library/PeiServicesLib.h>\r
bad46384 27#include <Library/BaseMemoryLib.h>\r
28\r
dd51a993 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
1c280088 38 @param VOID\r
dd51a993 39\r
40 @return The pointer to Smbus PPI.\r
41\r
42**/\r
43EFI_PEI_SMBUS2_PPI *\r
44InternalGetSmbusPpi (\r
1c280088 45 VOID\r
dd51a993 46 );\r
47\r
48/**\r
bad46384 49 Executes an SMBus operation to an SMBus controller.\r
dd51a993 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