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.
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.


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

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:
i2c I2C interface
i2cdev I2C device
offset Starting offset within the device
data Data buffer
len Length of data buffer
Return values:
rc Return status code

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

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:
i2c I2C interface
i2cdev I2C device
offset Starting offset within the device
data Data buffer
len Length of data buffer
Return values:
rc Return status code

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:

Generated on Tue Apr 6 20:02:05 2010 for gPXE by  doxygen 1.5.7.1