Вы здесь

DLN_I2C_SLAVE_WRITE_EV Structure

The DLN_I2C_SLAVE_WRITE_EV structure contains information about the I2C write event.

Syntax
C/C++
typedef struct
{
        DLN_MSG_HEADER header;
        uint16_t eventCount;
        uint8_t eventType;
        uint8_t port;
        uint8_t slaveAddress;
        uint16_t size;
        uint8_t buffer[DLN_I2C_SLAVE_BUFFER_SIZE];
} __PACKED_ATTR DLN_I2C_SLAVE_WRITE_EV;
Event Structure Members
header

Defines the DLN message header. It should have the following value: DLN_MSG_ID_I2C_SLAVE_WRITE_EV (0x0C10).

eventCount

The number of events generated after the event configuration changed.

eventType

The type of generating events. The following values are possible:

ValueConstantDescription

2

DLN_I2C_SLAVE_EVENT_WRITE

Events are generated when the I2C master initiates transmitting data from the I2C slave device.

3

DLN_I2C_SLAVE_EVENT_READ_WRITE

Events are generated when the I2C master initiates receiving data from or transmitting data to the I2C slave device.

port

The number of the I2C slave port where the event is generated.

slaveAddress

The I2C slave address assigned to the DLN adapter that generated the event.

size

A size of the buffer that stores the event data.

buffer

The buffer that contains data received from the I2C master.

Языки

Вход на сайт