]> git.proxmox.com Git - mirror_edk2.git/blame - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430I2c.h
OptionRomPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430I2c.h
CommitLineData
1cc799c5
HT
1/** @file\r
2 I2c Bus byte read/write functions.\r
3\r
4 Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>\r
96ae5934 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
1cc799c5 6\r
9f354310 7**/\r
8\r
9#ifndef _CIRRUS_LOGIC_I2C_H_\r
10#define _CIRRUS_LOGIC_I2C_H_\r
11\r
12#include <Protocol/PciIo.h>\r
13\r
14/**\r
15 Read one byte data on I2C Bus.\r
16\r
17 Read one byte data from the slave device connectet to I2C Bus.\r
18 If Data is NULL, then ASSERT().\r
19\r
20 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
21 @param DeviceAddress Slave device's address.\r
22 @param RegisterAddress The register address on slave device.\r
23 @param Data The pointer to returned data if EFI_SUCCESS returned.\r
24\r
25 @retval EFI_DEVICE_ERROR\r
26 @retval EFI_SUCCESS\r
27\r
28**/\r
29EFI_STATUS\r
30EFIAPI\r
31I2cReadByte (\r
32 EFI_PCI_IO_PROTOCOL *PciIo,\r
33 UINT8 DeviceAddress,\r
34 UINT8 RegisterAddress,\r
35 UINT8 *Data\r
36 );\r
37\r
38/**\r
39 Write one byte data onto I2C Bus.\r
40\r
41 Write one byte data to the slave device connectet to I2C Bus.\r
42 If Data is NULL, then ASSERT().\r
43\r
44 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
45 @param DeviceAddress Slave device's address.\r
46 @param RegisterAddress The register address on slave device.\r
47 @param Data The pointer to write data.\r
48\r
49 @retval EFI_DEVICE_ERROR\r
50 @retval EFI_SUCCESS\r
51\r
52**/\r
53EFI_STATUS\r
54EFIAPI\r
55I2cWriteByte (\r
56 EFI_PCI_IO_PROTOCOL *PciIo,\r
57 UINT8 DeviceAddress,\r
58 UINT8 RegisterAddress,\r
59 UINT8 *Data\r
60 );\r
61\r
62#endif\r