essl_spi_rdbuf() function
Read the shared buffer from the slave in ISR way
Arguments
spi
SPI device handle representing the slave
out_data
Buffer for read data, strongly suggested to be in the DRAM and aligned to 4
addr
Address of the slave shared buffer
flags
`SPI_TRANS_*` flags to control the transaction mode of the transaction to send.
Return value
- ESP_OK: on success - or other return value from :cpp:func:`spi_device_transmit`.
Notes
The slave's HW doesn't guarantee the data in one SPI transaction is consistent. It sends data in unit of byte. In other words, if the slave SW attempts to update the shared register when a rdbuf SPI transaction is in-flight, the data got by the master will be the combination of bytes of different writes of slave SW. ``out_data`` should be prepared in words and in the DRAM. The buffer may be written in words by the DMA. When a byte is written, the remaining bytes in the same word will also be overwritten, even the ``len`` is shorter than a word.
essl_spi_rdbuf() is called by 1 function and calls 3 functions:
![]()
essl_spi_rdbuf()
essl_spi_rdbuf() reads 1 variable:
![]()
essl_spi_rdbuf()