iPXE
|
An I2C device. More...
#include <i2c.h>
Data Fields | |
unsigned int | dev_addr |
Address of this device. More... | |
unsigned int | dev_addr_len |
Device address length, in bytes. More... | |
unsigned int | word_addr_len |
Word adddress length, in bytes. More... | |
An I2C device.
An I2C device represents a specific slave device on an I2C bus. It is accessed via an I2C interface.
unsigned int i2c_device::dev_addr |
Address of this device.
The actual address sent on the bus will look like
<start> <device address>=""> <word address="" overflow>=""> <r/w>
The "word address overflow" is any excess bits from the word address, i.e. any portion that does not fit within the defined word address length.
Definition at line 31 of file i2c.h.
Referenced by i2c_bit_read(), i2c_bit_write(), i2c_select(), init_at24c11(), and init_i2c_eeprom().
unsigned int i2c_device::dev_addr_len |
Device address length, in bytes.
This is the number of bytes that comprise the device address, defined to be the portion that terminates with the read/write bit.
Definition at line 38 of file i2c.h.
Referenced by i2c_select(), init_at24c11(), and init_i2c_eeprom().
unsigned int i2c_device::word_addr_len |
Word adddress length, in bytes.
This is the number of bytes that comprise the word address, defined to be the portion that starts after the read/write bit and ends before the first data byte.
For some devices, this length will be zero (i.e. the word address is contained entirely within the "word address overflow").
Definition at line 49 of file i2c.h.
Referenced by i2c_select(), init_at24c11(), and init_i2c_eeprom().