]> git.proxmox.com Git - mirror_edk2.git/blame - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430I2c.h
Updating ArmLib.h to add functions needed to turn on paging in CpuDxe. Also added...
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430I2c.h
CommitLineData
9f354310 1/** @file
2 I2c Bus byte read/write functions.
3
4 Copyright (c) 2008 - 2009, 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#ifndef _CIRRUS_LOGIC_I2C_H_\r
16#define _CIRRUS_LOGIC_I2C_H_\r
17\r
18#include <Protocol/PciIo.h>\r
19\r
20/**\r
21 Read one byte data on I2C Bus.\r
22\r
23 Read one byte data from the slave device connectet to I2C Bus.\r
24 If Data is NULL, then ASSERT().\r
25\r
26 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
27 @param DeviceAddress Slave device's address.\r
28 @param RegisterAddress The register address on slave device.\r
29 @param Data The pointer to returned data if EFI_SUCCESS returned.\r
30\r
31 @retval EFI_DEVICE_ERROR\r
32 @retval EFI_SUCCESS\r
33\r
34**/\r
35EFI_STATUS\r
36EFIAPI\r
37I2cReadByte (\r
38 EFI_PCI_IO_PROTOCOL *PciIo,\r
39 UINT8 DeviceAddress,\r
40 UINT8 RegisterAddress,\r
41 UINT8 *Data\r
42 );\r
43\r
44/**\r
45 Write one byte data onto I2C Bus.\r
46\r
47 Write one byte data to the slave device connectet to I2C Bus.\r
48 If Data is NULL, then ASSERT().\r
49\r
50 @param PciIo The pointer to PCI_IO_PROTOCOL.\r
51 @param DeviceAddress Slave device's address.\r
52 @param RegisterAddress The register address on slave device.\r
53 @param Data The pointer to write data.\r
54\r
55 @retval EFI_DEVICE_ERROR\r
56 @retval EFI_SUCCESS\r
57\r
58**/\r
59EFI_STATUS\r
60EFIAPI\r
61I2cWriteByte (\r
62 EFI_PCI_IO_PROTOCOL *PciIo,\r
63 UINT8 DeviceAddress,\r
64 UINT8 RegisterAddress,\r
65 UINT8 *Data\r
66 );\r
67\r
68#endif\r