The DlnSpiMasterWriteEx() function sends data via SPI bus. The data is sent as an array of 1-byte elements. By using this function you can use additional attributes.
DlnSpiMasterWriteEx()
DLN_RESULT DlnSpiMasterWriteEx( HDLN handle, uint8_t port, uint16_t size, uint8_t *writeBuffer, uint8_t attribute );
A handle to the DLN-series adapter.
A number of the SPI master port.
The size of the message buffer. This parameter is specified in bytes. The maximum value is 256 bytes.
A pointer to an array of unsigned 8-bit integers that receives data to be sent to a slave.
Additional transmission attribute.
DLN_SPI_MASTER_ATTR_LEAVE_SS_LOW - Leave SS low after transmission.
DLN_SPI_MASTER_ATTR_LEAVE_SS_LOW
DLN_SPI_MASTER_ATTR_RELEASE_SS - Release SS after transmission.
DLN_SPI_MASTER_ATTR_RELEASE_SS
The function successfully sent data.
The port number is not valid. Use the DlnSpiMasterGetPortCount() function to find the maximum possible port number.
The SPI master port is disabled. Use the DlnSpiMasterEnable() function to activate the SPI master port.
The DlnSpiMasterWriteEx() function is defined in the dln_spi_master.h file.
dln_spi_master.h