I2C_TransferSeq_TypeDef Struct Reference
Master mode transfer message structure used to define a complete I2C transfer sequence (from start to stop).
#include <em_i2c.h>
Data Fields |
|
uint16_t | addr |
Address to use after (repeated) start.
|
|
uint16_t | flags |
Flags defining sequence type and details, see I2C_FLAG_ defines.
|
|
struct { | |
uint8_t * data | |
Buffer used for data to transmit/receive, must be
len
long.
|
|
uint16_t len | |
Number of bytes in
data
to send or receive.
|
|
} | buf [2] |
Buffers used to hold data to send from or receive into, depending on sequence type.
|
|
Master mode transfer message structure used to define a complete I2C transfer sequence (from start to stop).
The structure allows for defining the following types of sequences (refer to defines for sequence details):
- I2C_FLAG_READ - Data read into buf[0].data
- I2C_FLAG_WRITE - Data written from buf[0].data
- I2C_FLAG_WRITE_READ - Data written from buf[0].data and read into buf[1].data
- I2C_FLAG_WRITE_WRITE - Data written from buf[0].data and buf[1].data
Field Documentation
◆ addr
uint16_t I2C_TransferSeq_TypeDef::addr |
Address to use after (repeated) start.
Layout details, A = Address bit, X = don't care bit (set to 0):
- 7 bit address - Use format AAAA AAAX
- 10 bit address - Use format XXXX XAAX AAAA AAAA
◆ flags
uint16_t I2C_TransferSeq_TypeDef::flags |
Flags defining sequence type and details, see I2C_FLAG_ defines.
◆ data
uint8_t* I2C_TransferSeq_TypeDef::data |
Buffer used for data to transmit/receive, must be
len
long.