DLN_SPI_SLAVE_TRANSFER_EV Event
The DLN_SPI_SLAVE_TRANSFER_EV event is sent when the SPI bus master releases the SS line or the data receive buffer is full.
typedef struct
{
DLN_MSG_HEADER header;
uint16_t eventCount;
uint8_t eventType;
uint8_t port;
uint16_t size;
uint8_t buffer[DLN_SPI_SLAVE_BUFFER_SIZE];
} __PACKED_ATTR DLN_SPI_SLAVE_TRANSFER_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_SPI_SLAVE_TRANSFER_EV structure. msgId Contains the event id. For the DLN_SPI_SLAVE_TRANSFER_EV event it is set to 0x0B10. The DLN_MSG_ID_SPI_SLAVE_TRANSFER_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_MSG_ID_SPI_SLAVE_TRANSFER_EV event). See eventCount member to get the number of DLN_MSG_ID_SPI_SLAVE_TRANSFER_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 SPI slave configuration is changed.
- eventType
-
The condition for event generation on the SPI-slave port. The eventType member
can contain the following values:
1 or SPI_SLAVE_EVENT_SS_RISE The event is generated when an SS line is released. 2 or SPI_SLAVE_EVENT_SS_BUFFER_FULL The event is generated when the allocated buffer becomes full. - port
- A number of the SPI slave port.
- size
- A size of the buffer that stores the event data. This parameter is specified in bytes. The maximum value us 256 bytes.
- buffer
- A 256-element array. Each of the elements is an 8-bit value. The buffer contains the event data.
2006-2012