You are here

DLN_I2C_SLAVE_EVENT_READ_WRITE Events

A DLN adapter generates the DLN_I2C_SLAVE_EVENT_READ_WRITE events each time the I2C master device initiates receiving data from or transmitting data to the I2C slave address assigned to the DLN adapter.

DLN_I2C_SLAVE_EVENT_READ_WRITE events

Use the DlnI2cSlaveSetEvent() function to configure events. Pass DLN_I2C_SLAVE_EVENT_READ_WRITE for the eventType parameter.

The DLN_I2C_SLAVE_EVENT_READ_WRITE events are described by two structures:

  • The DLN_I2C_SLAVE_READ_EV structure describes the I2C read event details: event counter, I2C slave address and port number, and the buffer size. The header of the structure contains the msgId field that is set to DLN_MSG_ID_I2C_SLAVE_READ_EV (0x0C10).

  • The DLN_I2C_SLAVE_WRITE_EV structure describes the I2C write event details: event counter, I2C slave address and port number, the buffer size and the received data. The header of the structure contains the msgId field that is set to DLN_MSG_ID_I2C_SLAVE_WRITE_EV (0x0C11).

Rating: 
No votes yet

User login