+++ /dev/null
-/** @file\r
- Interface Definitions for I2C Lib.\r
- \r
- Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
- \r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
- \r
---*/\r
-\r
-#include <Uefi.h>\r
-#include <Library/IoLib.h>\r
-\r
-#ifndef I2C_LIB_HEADER_H\r
-#define I2C_LIB_HEADER_H\r
-\r
-\r
-/**\r
- Reads a Byte from I2C Device.\r
- \r
- @param I2cControllerIndex I2C Bus no to which the I2C device has been connected\r
- @param SlaveAddress Device Address from which the byte value has to be read\r
- @param Offset Offset from which the data has to be read\r
- @param ReadBytes Number of bytes to be read\r
- @param *ReadBuffer Address to which the value read has to be stored\r
- \r
- @return EFI_SUCCESS If the byte value has been successfully read\r
- @return EFI_DEVICE_ERROR Operation Failed, Device Error\r
-**/\r
-EFI_STATUS \r
-ByteReadI2C(\r
- IN UINT8 BusNo, \r
- IN UINT8 SlaveAddress, \r
- IN UINT8 Offset, \r
- IN UINTN ReadBytes,\r
- OUT UINT8 *ReadBuffer\r
- );\r
-\r
-/**\r
- Writes a Byte to I2C Device.\r
- \r
- @param I2cControllerIndex I2C Bus no to which the I2C device has been connected\r
- @param SlaveAddress Device Address from which the byte value has to be written\r
- @param Offset Offset from which the data has to be written\r
- @param WriteBytes Number of bytes to be written\r
- @param *Byte Address to which the value written is stored\r
- \r
- @return EFI_SUCCESS If the byte value has been successfully read\r
- @return EFI_DEVICE_ERROR Operation Failed, Device Error\r
-**/ \r
-EFI_STATUS ByteWriteI2C(\r
- IN UINT8 BusNo, \r
- IN UINT8 SlaveAddress,\r
- IN UINT8 Offset,\r
- IN UINTN WriteBytes,\r
- IN UINT8 *WriteBuffer\r
- );\r
-\r
-#endif\r