iPXE
Data Fields
i2c_interface Struct Reference

An I2C interface. More...

#include <i2c.h>

Data Fields

int(* read )(struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, uint8_t *data, unsigned int len)
 Read data from I2C device. More...
 
int(* write )(struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, const uint8_t *data, unsigned int len)
 Write data to I2C device. More...
 

Detailed Description

An I2C interface.

An I2C interface provides access to an I2C bus, via which I2C devices may be reached.

Definition at line 57 of file i2c.h.

Field Documentation

◆ read

int( * i2c_interface::read) (struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, uint8_t *data, unsigned int len)

Read data from I2C device.

Parameters
i2cI2C interface
i2cdevI2C device
offsetStarting offset within the device
dataData buffer
lenLength of data buffer
Return values
rcReturn status code

Definition at line 68 of file i2c.h.

Referenced by exanic_fetch_mac(), init_i2c_bit_basher(), linda_read_eeprom(), qib7322_read_eeprom(), sfe4001_fini(), and sfe4001_init().

◆ write

int( * i2c_interface::write) (struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, const uint8_t *data, unsigned int len)

Write data to I2C device.

Parameters
i2cI2C interface
i2cdevI2C device
offsetStarting offset within the device
dataData buffer
lenLength of data buffer
Return values
rcReturn status code

Definition at line 81 of file i2c.h.

Referenced by i2c_check_presence(), init_i2c_bit_basher(), sfe4001_fini(), and sfe4001_init().


The documentation for this struct was generated from the following file: