ESP32三线SPI怎么可以双向通信

qiyu773212@gmail.com
Posts: 2
Joined: Sat Dec 23, 2023 2:22 am

ESP32三线SPI怎么可以双向通信

Postby qiyu773212@gmail.com » Sat Dec 23, 2023 3:17 am

寻求帮助: ESP32三线SPI双向通信的话需要怎么配置呢?

ESP_MacChu
Posts: 47
Joined: Tue Nov 21, 2023 7:53 am

Re: ESP32三线SPI怎么可以双向通信

Postby ESP_MacChu » Tue Dec 26, 2023 9:47 am

首先三线 SPI 能实现的是半双工;
然后要修改的话主要是将1. spi_bus_initialize 时将 PIN_NUM_MISO 设置为 -1, 因为三线 spi 时仅 MOSI 工作 2. spi_device_interface_config_t.flags 赋值为 SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE

Who is online

Users browsing this forum: Bing [Bot] and 105 guests