Intel® Quark™ Microcontroller Software Interface
1.4.0
Intel® Quark™ Microcontroller BSP
|
I2C transfer type. More...
#include <qm_i2c.h>
Data Fields | |
uint8_t * | tx |
Write data. More... | |
uint32_t | tx_len |
Write data length. More... | |
uint8_t * | rx |
Read data. More... | |
uint32_t | rx_len |
Read buffer length. More... | |
bool | stop |
Master: Generate STOP. More... | |
void(* | callback )(void *data, int rc, qm_i2c_status_t status, uint32_t len) |
Transfer callback. More... | |
void * | callback_data |
User callback data. More... | |
I2C transfer type.
Master mode:
void(* qm_i2c_transfer_t::callback)(void *data, int rc, qm_i2c_status_t status, uint32_t len) |
Transfer callback.
Called after all data is transmitted/received or if the driver detects an error during the I2C transfer.
In slave mode, qm_i2c_slave_irq_transfer_update shall be called from this callback to update transfer buffers when receiving a QM_I2C_RX_FULL or QM_I2C_TX_EMPTY status. If the update function is not called with these statuses, the driver will drop every new data received or send dummy data (0x00) for each byte until next bus start.
[in] | data | User defined data. |
[in] | rc | 0 on success. Negative errno for possible error codes. |
[in] | status | I2C status. |
[in] | len | Length of the transfer if successful, 0 otherwise. |
uint8_t* qm_i2c_transfer_t::rx |
uint32_t qm_i2c_transfer_t::rx_len |
Read buffer length.
Definition at line 134 of file qm_i2c.h.
Referenced by qm_i2c_master_dma_transfer(), and qm_i2c_master_irq_transfer().
bool qm_i2c_transfer_t::stop |
Master: Generate STOP.
Slave: stop at the end of transaction.
Definition at line 140 of file qm_i2c.h.
Referenced by qm_i2c_master_dma_transfer().
uint8_t* qm_i2c_transfer_t::tx |
uint32_t qm_i2c_transfer_t::tx_len |
Write data length.
Definition at line 132 of file qm_i2c.h.
Referenced by qm_i2c_master_dma_transfer().