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