EasyManua.ls Logo

Espressif ESP32-S2 - Page 672

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
seg_len: Length of each segment, which is not larger than the maximum transaction length al-
lowed for the spi device. Suggested to be multiples of 4. When set < 0, means send all data in one
segment (the rddma_done will still be sent.)
flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_rddma_seg(spi_device_handle_t spi, uint8_t *out_data, int seg_len, uint32_t flags)
Read one data segment from the slave through its DMA.
Note To read long buffer, call :cpp:func:essl_spi_rddma instead.
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
seg_len: Length of this segment
flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_rddma_done(spi_device_handle_t spi, uint32_t flags)
Send the rddma_done command to the slave. Upon receiving this command, the slave will stop sending the
current buffer even there are data unsent, and maybe prepare the next buffer to send.
Note This is required only when the slave is working in segment mode.
Return
ESP_OK: success
or other return value from :cpp:func:spi_device_transmit.
Parameters
spi: SPI device handle representing the slave
flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_wrdma(spi_device_handle_t spi, const uint8_t *data, int len, int seg_len, uint32_t
flags)
Send long buffer in segments to the slave through its DMA.
Note This function combines several :cpp:func:essl_spi_wrdma_seg and one
:cpp:func:essl_spi_wrdma_done at the end. Used when the slave is working in segment
mode.
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
len: Total length of data to send.
seg_len: Length of each segment, which is not larger than the maximum transaction length al-
lowed for the spi device. Suggested to be multiples of 4. When set < 0, means send all data in one
segment (the wrdma_done will still be sent.)
flags: SPI_TRANS_* flags to control the transaction mode of the transaction to send.
esp_err_t essl_spi_wrdma_seg(spi_device_handle_t spi, const uint8_t *data, int seg_len, uint32_t
flags)
Send one data segment to the slave through its DMA.
Note To send long buffer, call :cpp:func:essl_spi_wrdma instead.
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
seg_len: Length of this segment
Espressif Systems 661
Submit Document Feedback
Release v4.4

Table of Contents