Reads last received SPI character.
enum status_code spi_read( struct spi_module *const module, uint16_t * rx_data)
This function will return the last SPI character shifted into the receive register by the spi_write function.
| Data direction | Parameter name | Description |
|---|---|---|
|
[in] |
module |
Pointer to the software instance struct |
|
[out] |
rx_data |
Pointer to store the received data |
Status of the read operation.
| Return value | Description |
|---|---|
|
STATUS_OK |
If data was read |
|
STATUS_ERR_IO |
If no data is available |
|
STATUS_ERR_OVERFLOW |
If the data is overflown |