]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Include/Library/I2CLib.h
893d88519c8248c077d0eac100c2c04f9763dba0
2 Interface Definitions for I2C Lib.
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/IoLib.h>
19 #ifndef I2C_LIB_HEADER_H
20 #define I2C_LIB_HEADER_H
24 Reads a Byte from I2C Device.
26 @param I2cControllerIndex I2C Bus no to which the I2C device has been connected
27 @param SlaveAddress Device Address from which the byte value has to be read
28 @param Offset Offset from which the data has to be read
29 @param ReadBytes Number of bytes to be read
30 @param *ReadBuffer Address to which the value read has to be stored
32 @return EFI_SUCCESS If the byte value has been successfully read
33 @return EFI_DEVICE_ERROR Operation Failed, Device Error
38 IN UINT8 SlaveAddress
,
45 Writes a Byte to I2C Device.
47 @param I2cControllerIndex I2C Bus no to which the I2C device has been connected
48 @param SlaveAddress Device Address from which the byte value has to be written
49 @param Offset Offset from which the data has to be written
50 @param WriteBytes Number of bytes to be written
51 @param *Byte Address to which the value written is stored
53 @return EFI_SUCCESS If the byte value has been successfully read
54 @return EFI_DEVICE_ERROR Operation Failed, Device Error
56 EFI_STATUS
ByteWriteI2C(
58 IN UINT8 SlaveAddress
,