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