]> git.proxmox.com Git - mirror_edk2.git/blame - OptionRomPkg/Include/Library/DxeI2cLib.h
fixed overflow issue when reading BMP file.
[mirror_edk2.git] / OptionRomPkg / Include / Library / DxeI2cLib.h
CommitLineData
31f9e631 1/** @file
2 I2c Bus byte read/write functions.
3
4 Copyright (c) 2008, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/\r
14\r
15#include <Protocol/PciIo.h>\r
16\r
17/**\r
18 Read one byte data on I2C Bus.\r
19\r
20 Read one byte data from the slave device connectet to I2C Bus.\r
21 If Data is NULL, then ASSERT().\r
22\r
23 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
24 @param DeviceAddress Slave device's address.\r
25 @param RegisterAddress The register address on slave device.\r
26 @param Data The pointer to returned data if EFI_SUCCESS returned.\r
27\r
28 @retval EFI_DEVICE_ERROR\r
29 @retval EFI_SUCCESS\r
30\r
31**/\r
32EFI_STATUS\r
33EFIAPI\r
34I2cReadByte (\r
35 EFI_PCI_IO_PROTOCOL *PciIo,\r
36 UINT8 DeviceAddress,\r
37 UINT8 RegisterAddress,\r
38 UINT8 *Data\r
39 );\r
40\r
41/**\r
42 Write one byte data onto I2C Bus.\r
43\r
44 Write one byte data to the slave device connectet to I2C Bus.\r
45 If Data is NULL, then ASSERT().\r
46\r
47 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
48 @param DeviceAddress Slave device's address.\r
49 @param RegisterAddress The register address on slave device.\r
50 @param Data The pointer to write data.\r
51\r
52 @retval EFI_DEVICE_ERROR\r
53 @retval EFI_SUCCESS\r
54\r
55**/\r
56EFI_STATUS\r
57EFIAPI\r
58I2cWriteByte (\r
59 EFI_PCI_IO_PROTOCOL *PciIo,\r
60 UINT8 DeviceAddress,\r
61 UINT8 RegisterAddress,\r
62 UINT8 *Data\r
63 );\r
64\r