I2C_TransferSeq_TypeDef Struct Reference
[I2C]

Master mode transfer message structure used to define a complete I2C transfer sequence (from start to stop). More...

#include <em_i2c.h>

Collaboration diagram for I2C_TransferSeq_TypeDef:
Collaboration graph
[legend]

Data Fields

uint16_t addr
 Address to use after (repeated) start.
uint16_t flags
struct {
   uint8_t *   data
   uint16_t   len
buf [2]

Detailed Description

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, please refer to defines for sequence details.

Definition at line 245 of file em_i2c.h.


Field Documentation

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

Definition at line 255 of file em_i2c.h.

Referenced by I2C_Transfer().

struct { ... } I2C_TransferSeq_TypeDef::buf[2]

Buffers used to hold data to send from or receive into depending on sequence type.

Referenced by I2C_Transfer(), and I2C_TransferInit().

Buffer used for data to transmit/receive, must be len long.

Definition at line 267 of file em_i2c.h.

Referenced by I2C_Transfer().

Flags defining sequence type and details, see I2C_FLAG_... defines.

Definition at line 258 of file em_i2c.h.

Referenced by I2C_Transfer(), and I2C_TransferInit().

Number of bytes in data to send or receive. Notice that when receiving data to this buffer, at least 1 byte must be received. Setting len to 0 in the receive case is considered a usage fault. Transmitting 0 bytes is legal, in which case only the address is transmitted after the start condition.

Definition at line 276 of file em_i2c.h.

Referenced by I2C_Transfer(), and I2C_TransferInit().


The documentation for this struct was generated from the following file: