Chapter 2. API Reference
Note 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.
Return
• ESP_OK: on success
• or other return value from :cpp:func:spi_device_transmit.
Parameters
• spi: SPI device handle representing the slave
• [out] out_data: Buffer for read data, strongly suggested to be in the DRAM and aligned to 4
• addr: Address of the slave shared buffer
• len: Length to read
• flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_wrbuf(spi_device_handle_t
Write the shared buffer of the slave in ISR way.
Note 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.
Return
• ESP_OK: success
• or other return value from :cpp:func:spi_device_transmit.
Parameters
• spi: SPI device handle representing the slave
• data: Buffer for data to send, strongly suggested to be in the DRAM
• addr: Address of the slave shared buffer,
• len: Length to write
• flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_wrbuf_polling(spi_device_handle_t
Write the shared buffer of the slave in polling way.
Note 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.
Return
• ESP_OK: success
• or other return value from :cpp:func:spi_device_polling_transmit.
Parameters
• spi: SPI device handle representing the slave
• data: Buffer for data to send, strongly suggested to be in the DRAM
• addr: Address of the slave shared buffer,
• len: Length to write
• flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_rddma(spi_device_handle_t
Receive long buffer in segments from the slave through its DMA.
Note This
function
:cpp:func:essl_spi_rddma_done at the end.
mode.
Return
• ESP_OK: success
• or other return value from :cpp:func:spi_device_transmit.
Parameters
• spi: SPI device handle representing the slave
• [out] out_data: Buffer to hold the received data, strongly suggested to be in the DRAM and
aligned to 4
• len: Total length of data to receive.
Espressif Systems
spi, const uint8_t *data, int addr, int len, uint32_t
flags)
uint32_t flags)
spi, uint8_t *out_data, int len, int seg_len, uint32_t
flags)
combines
several
660
Submit Document Feedback
spi, const uint8_t *data, int addr, int len,
:cpp:func:essl_spi_rddma_seg
Used when the slave is working in segment
and
one
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?