19.6.4.7.1 Function spi_write_buffer_job()

Asynchronous buffer write.

enum status_code spi_write_buffer_job( struct spi_module *const module, uint8_t * tx_data, uint16_t length)

Sets up the driver to write to the SPI from a given buffer. If registered and enabled, a callback function will be called when the write is finished.

Table 19-45. Parameters
Data directionParameter nameDescription

[in]

module

Pointer to SPI software instance struct

[out]

tx_data

Pointer to data buffer to receive

[in]

length

Data buffer length

Returns

Status of the write request operation.

Table 19-46. Return Values
Return valueDescription

STATUS_OK

If the operation completed successfully

STATUS_ERR_BUSY

If the SPI was already busy with a write operation

STATUS_ERR_INVALID_ARG

If requested write length was zero