![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
struct i2c_msg - an I2C transaction segment beginning with START @addr: Slave address, either seven or ten bits. More...
#include <i2c.h>
Data Fields | |
uint16_t | flags |
uint16_t | slave |
uint16_t | len |
uint8_t * | buf |
struct i2c_msg - an I2C transaction segment beginning with START @addr: Slave address, either seven or ten bits.
When this is a ten bit address, I2C_M_TEN must be set in @flags. @flags: I2C_M_RD is handled by all adapters. @len: Number of data bytes in @buf being read from or written to the I2C slave address. For read transactions where I2C_M_RECV_LEN is set, the caller guarantees that this buffer can hold up to 32 bytes in addition to the initial length byte sent by the slave (plus, if used, the SMBus PEC). @buf: The buffer into which data is read, or from which it's written.
An i2c_msg is the low level representation of one segment of an I2C transaction. It is visible to drivers in the @i2c_transfer() procedure.
All I2C adapters implement the standard rules for I2C transactions. Each transaction begins with a START. That is followed by the slave address, and a bit encoding read versus write. Then follow all the data bytes, possibly including a byte with SMBus PEC. The transfer terminates with a NAK, or when all those bytes have been transferred and ACKed. If this is the last message in a group, it is followed by a STOP. Otherwise it is followed by the next @i2c_msg transaction segment, beginning with a (repeated) START.
uint8_t* i2c_msg::buf |
Definition at line 40 of file i2c.h.
Referenced by bdk_twsix_read_ia(), bdk_twsix_write_ia(), eeprom_random_read(), hsi2c_segment(), i2c_2ba_read_bytes(), i2c_do_xfer(), i2c_read(), i2c_read_bytes(), i2c_readb(), i2c_write(), i2c_writeb(), kempld_i2c_process(), ledc_read(), ledc_transfer(), ledc_write(), mtk_i2c_transfer(), platform_i2c_transfer(), and software_i2c_transfer().
uint16_t i2c_msg::flags |
Definition at line 33 of file i2c.h.
Referenced by bdk_twsix_read_ia(), bdk_twsix_write_ia(), eeprom_random_read(), hsi2c_segment(), i2c_2ba_read_bytes(), i2c_dev_read_at16(), i2c_dev_readb(), i2c_dev_readb_at(), i2c_dev_writeb(), i2c_dev_writeb_at(), i2c_do_xfer(), i2c_read_bytes(), i2c_read_raw(), i2c_readb(), i2c_write_raw(), i2c_writeb(), iic_tpm_read(), kempld_i2c_process(), ledc_read(), ledc_write(), platform_i2c_transfer(), and software_i2c_transfer().
uint16_t i2c_msg::len |
Definition at line 39 of file i2c.h.
Referenced by bdk_twsix_read_ia(), bdk_twsix_write_ia(), eeprom_random_read(), hsi2c_segment(), i2c_2ba_read_bytes(), i2c_dev_read_at16(), i2c_do_xfer(), i2c_read(), i2c_read_bytes(), i2c_read_raw(), i2c_readb(), i2c_write(), i2c_write_raw(), i2c_writeb(), iic_tpm_read(), iic_tpm_write(), iic_tpm_write_generic(), iic_tpm_write_long(), kempld_i2c_process(), ledc_read(), ledc_write(), mtk_i2c_transfer(), platform_i2c_transfer(), software_i2c_transfer(), and tpm_tis_i2c_send().
uint16_t i2c_msg::slave |
Definition at line 38 of file i2c.h.
Referenced by bdk_twsix_read_ia(), bdk_twsix_write_ia(), eeprom_random_read(), hsi2c_segment(), i2c_2ba_read_bytes(), i2c_read(), i2c_read_bytes(), i2c_readb(), i2c_write(), i2c_writeb(), kempld_i2c_process(), ledc_read(), ledc_transfer(), ledc_write(), mtk_i2c_transfer(), platform_i2c_transfer(), and software_i2c_transfer().