Espressif ESP32-S2 Programming Manual page 392

Table of Contents

Advertisement

Chapter 2. API Reference
SPI_DEVICE_HALFDUPLEX
Transmit data before receiving it, instead of simultaneously.
SPI_DEVICE_CLK_AS_CS
Output clock on CS line if CS is active.
SPI_DEVICE_NO_DUMMY
There are timing issue when reading at high frequency (the frequency is related to whether iomux pins are used,
valid time after slave sees the clock).
• In half-duplex mode, the driver automatically inserts dummy bits before reading phase to fix the timing
issue. Set this flag to disable this feature.
• In full-duplex mode, however, the hardware cannot use dummy bits, so there is no way to prevent data
being read from getting corrupted. Set this flag to confirm that you're going to work with output only,
or read without dummy bits at your own risk.
SPI_DEVICE_DDRCLK
SPI_TRANS_MODE_DIO
Transmit/receive data in 2-bit mode.
SPI_TRANS_MODE_QIO
Transmit/receive data in 4-bit mode.
SPI_TRANS_USE_RXDATA
Receive into rx_data member of
SPI_TRANS_USE_TXDATA
Transmit tx_data member of
this.
SPI_TRANS_MODE_DIOQIO_ADDR
Also transmit address in mode selected by SPI_MODE_DIO/SPI_MODE_QIO.
SPI_TRANS_VARIABLE_CMD
Use
the
command_bits
spi_device_interface_config_t.
SPI_TRANS_VARIABLE_ADDR
Use
the
address_bits
spi_device_interface_config_t.
SPI_TRANS_VARIABLE_DUMMY
Use
the
dummy_bits
spi_device_interface_config_t.
SPI_TRANS_CS_KEEP_ACTIVE
Keep CS active after data transfer.
SPI_TRANS_MULTILINE_CMD
The data lines used at command phase is the same as data phase (otherwise, only one data line is used at
command phase)
SPI_TRANS_MODE_OCT
Transmit/receive data in 8-bit mode.
SPI_TRANS_MULTILINE_ADDR
The data lines used at address phase is the same as data phase (otherwise, only one data line is used at address
phase)
Type Definitions
typedef struct
spi_transaction_t
typedef void
(*transaction_cb_t)(spi_transaction_t
typedef struct spi_device_t *spi_device_handle_t
Handle for a device on a SPI bus.
Espressif Systems
spi_transaction_t
instead into memory at rx_buffer.
spi_transaction_t
instead of data at tx_buffer. Do not set tx_buffer when using
in
spi_transaction_ext_t
in
spi_transaction_ext_t
in
spi_transaction_ext_t
spi_transaction_t
381
Submit Document Feedback
rather
than
rather
than
rather
than
*trans)
default
value
in
default
value
in
default
value
in
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF