EasyManua.ls Logo

Espressif ESP32-S2 - Page 671

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
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 spi, const uint8_t *data, int addr, int len, uint32_t
flags)
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 spi, const uint8_t *data, int addr, int len,
uint32_t flags)
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 spi, uint8_t *out_data, int len, int seg_len, uint32_t
flags)
Receive long buffer in segments from the slave through its DMA.
Note This function combines several :cpp:func:essl_spi_rddma_seg and one
:cpp:func:essl_spi_rddma_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
[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 660
Submit Document Feedback
Release v4.4

Table of Contents