]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h
MdePkg: Apply uncrustify changes
[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
9344f092 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
dd51a993 6\r
7\r
8**/\r
9\r
42eedea9 10#ifndef __INTERNAL_SMBUS_LIB_H_\r
11#define __INTERNAL_SMBUS_LIB_H_\r
dd51a993 12\r
bad46384 13#include <PiDxe.h>\r
c892d846 14\r
bad46384 15#include <Protocol/SmbusHc.h>\r
c892d846 16\r
bad46384 17#include <Library/SmbusLib.h>\r
18#include <Library/DebugLib.h>\r
19#include <Library/UefiBootServicesTableLib.h>\r
20#include <Library/BaseMemoryLib.h>\r
21\r
a3589760 22#include <IndustryStandard/SmBus.h>\r
dd51a993 23\r
dd51a993 24//\r
25// Declaration for internal functions\r
26//\r
2f88bd3a 27\r
dd51a993 28/**\r
bad46384 29 Executes an SMBus operation to an SMBus controller.\r
dd51a993 30\r
31 This function provides a standard way to execute Smbus script\r
32 as defined in the SmBus Specification. The data can either be of\r
33 the Length byte, word, or a block of data.\r
34\r
9095d37b 35 @param SmbusOperation Signifies which particular SMBus hardware protocol instance\r
58380e9c 36 that it will use toexecute the SMBus transactions.\r
2fc59a00 37 @param SmBusAddress The address that encodes the SMBUS Slave Address,\r
dd51a993 38 SMBUS Command, SMBUS Data Length, and PEC.\r
9095d37b
LG
39 @param Length Signifies the number of bytes that this operation will\r
40 do. The maximum number of bytes can be revision specific\r
58380e9c 41 and operation specific.\r
42 @param Buffer Contains the value of data to execute to the SMBus slave\r
9095d37b 43 device. Not all operations require this argument. The\r
58380e9c 44 length of this buffer is identified by Length.\r
dd51a993 45 @param Status Return status for the executed command.\r
46 This is an optional parameter and may be NULL.\r
47\r
48 @return The actual number of bytes that are executed for this operation.\r
49\r
50**/\r
51UINTN\r
52InternalSmBusExec (\r
2f88bd3a
MK
53 IN EFI_SMBUS_OPERATION SmbusOperation,\r
54 IN UINTN SmBusAddress,\r
55 IN UINTN Length,\r
56 IN OUT VOID *Buffer,\r
57 OUT RETURN_STATUS *Status OPTIONAL\r
dd51a993 58 );\r
59\r
a73480f6 60/**\r
61 The constructor function caches the pointer to Smbus protocol.\r
62\r
63 The constructor function locates Smbus protocol from protocol database.\r
64 It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
65\r
66 @param ImageHandle The firmware allocated handle for the EFI image.\r
67 @param SystemTable A pointer to the EFI System Table.\r
68\r
69 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
70\r
71**/\r
72EFI_STATUS\r
73EFIAPI\r
74SmbusLibConstructor (\r
2f88bd3a
MK
75 IN EFI_HANDLE ImageHandle,\r
76 IN EFI_SYSTEM_TABLE *SystemTable\r
ed66e1bc 77 );\r
a73480f6 78\r
dd51a993 79#endif\r