]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / DxeSmbusLib / InternalSmbusLib.h
CommitLineData
dd51a993 1/** @file\r
2Internal header file for Smbus library.\r
3\r
9095d37b 4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
19388d29 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
58380e9c 8http://opensource.org/licenses/bsd-license.php.\r
bad46384 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 <PiDxe.h>\r
c892d846 21\r
bad46384 22#include <Protocol/SmbusHc.h>\r
c892d846 23\r
bad46384 24#include <Library/SmbusLib.h>\r
25#include <Library/DebugLib.h>\r
26#include <Library/UefiBootServicesTableLib.h>\r
27#include <Library/BaseMemoryLib.h>\r
28\r
a3589760 29#include <IndustryStandard/SmBus.h>\r
dd51a993 30\r
dd51a993 31//\r
32// Declaration for internal functions\r
33//\r
34/**\r
bad46384 35 Executes an SMBus operation to an SMBus controller.\r
dd51a993 36\r
37 This function provides a standard way to execute Smbus script\r
38 as defined in the SmBus Specification. The data can either be of\r
39 the Length byte, word, or a block of data.\r
40\r
9095d37b 41 @param SmbusOperation Signifies which particular SMBus hardware protocol instance\r
58380e9c 42 that it will use toexecute the SMBus transactions.\r
2fc59a00 43 @param SmBusAddress The address that encodes the SMBUS Slave Address,\r
dd51a993 44 SMBUS Command, SMBUS Data Length, and PEC.\r
9095d37b
LG
45 @param Length Signifies the number of bytes that this operation will\r
46 do. The maximum number of bytes can be revision specific\r
58380e9c 47 and operation specific.\r
48 @param Buffer Contains the value of data to execute to the SMBus slave\r
9095d37b 49 device. Not all operations require this argument. The\r
58380e9c 50 length of this buffer is identified by Length.\r
dd51a993 51 @param Status Return status for the executed command.\r
52 This is an optional parameter and may be NULL.\r
53\r
54 @return The actual number of bytes that are executed for this operation.\r
55\r
56**/\r
57UINTN\r
58InternalSmBusExec (\r
59 IN EFI_SMBUS_OPERATION SmbusOperation,\r
60 IN UINTN SmBusAddress,\r
61 IN UINTN Length,\r
62 IN OUT VOID *Buffer,\r
63 OUT RETURN_STATUS *Status OPTIONAL\r
64 );\r
65\r
a73480f6 66/**\r
67 The constructor function caches the pointer to Smbus protocol.\r
68\r
69 The constructor function locates Smbus protocol from protocol database.\r
70 It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
71\r
72 @param ImageHandle The firmware allocated handle for the EFI image.\r
73 @param SystemTable A pointer to the EFI System Table.\r
74\r
75 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
76\r
77**/\r
78EFI_STATUS\r
79EFIAPI\r
80SmbusLibConstructor (\r
81 IN EFI_HANDLE ImageHandle,\r
82 IN EFI_SYSTEM_TABLE *SystemTable\r
ed66e1bc 83 );\r
a73480f6 84\r
dd51a993 85#endif\r