]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Include/Library/I2CLib.h
2 Interface Definitions for I2C Lib.
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/IoLib.h>
13 #ifndef I2C_LIB_HEADER_H
14 #define I2C_LIB_HEADER_H
18 Reads a Byte from I2C Device.
20 @param I2cControllerIndex I2C Bus no to which the I2C device has been connected
21 @param SlaveAddress Device Address from which the byte value has to be read
22 @param Offset Offset from which the data has to be read
23 @param ReadBytes Number of bytes to be read
24 @param *ReadBuffer Address to which the value read has to be stored
26 @return EFI_SUCCESS If the byte value has been successfully read
27 @return EFI_DEVICE_ERROR Operation Failed, Device Error
32 IN UINT8 SlaveAddress
,
39 Writes a Byte to I2C Device.
41 @param I2cControllerIndex I2C Bus no to which the I2C device has been connected
42 @param SlaveAddress Device Address from which the byte value has to be written
43 @param Offset Offset from which the data has to be written
44 @param WriteBytes Number of bytes to be written
45 @param *Byte Address to which the value written is stored
47 @return EFI_SUCCESS If the byte value has been successfully read
48 @return EFI_DEVICE_ERROR Operation Failed, Device Error
50 EFI_STATUS
ByteWriteI2C(
52 IN UINT8 SlaveAddress
,