DLN_I2C_SLAVE_READ_EV Event

The DLN_I2C_SLAVE_READ_EV event is sent to your application when I2C bus master terminates the I2C read transaction, generating the stop condition.

Syntax

C/C++
  typedef struct
  {
  DLN_MSG_HEADER header;
  uint16_t eventCount;
  uint8_t eventType;
  uint8_t port;
  uint8_t slaveAddress;
  uint16_t size;
  } __PACKED_ATTR DLN_I2C_SLAVE_READ_EV;
     

Members:

header

Defines the DLN message header DLN_MSG_HEADER. The event header contains the following fields:

Field Description
size The size of the message. It is equal to the size of the DLN_I2C_SLAVE_READ_EV structure.
msgId Contains the event id. For the DLN_I2C_SLAVE_READ_EV event it is set to 0x0C10. The DLN_MSG_ID_I2C_SLAVE_READ_EV constant can be used to check the event ID.
echoCounter Number of events sent since the DLN-series adapter is powered on. This counter increments on every event (not only on DLN_I2C_SLAVE_READ_EV event). See eventCount member to get the number of DLN_I2C_SLAVE_READ_EV events sent after the SPI slave module is configured.
handle A handle to the DLN-series adapter. You can use the handle field to determine the adapter that have sent the event.
eventCount
The number of the generated events after I2C slave configuration is changed.
eventType
Contains the condition for event generation on the I2C-slave port. The following values are available:
port
A number of the I2C slave port.
slaveAddress
The I2C slave address that was used in current transaction. You can configure I2C slave module to respond to several I2C slave addresses with the DlnI2cSlaveGetEvent() function.
size
A number of bytes that were read by the I2C master device.