dc42/DuetWiFiServer

Why the spi slave control "CS" ?

Opened this issue · 4 comments

Hi, David!
I found that your esp8266 was configured to be the slave in the spi communication. But the spi "cs" pin was controled by esp8266 as well. In my experience, the "clk" and the "cs" pin should be outputed by the master.
I just want to make sure of the way of spi communication.

And I read the duet firmware just now, found that it didn't obviously specified whether duet was master or slave.

dc42 commented

The ESP is the SPI master.

Hmm, I was not familiar with the arduino hardware driver with esp8266, and was mislead by the spi initial function.
I still can not find out where to configure esp8266's spi to be master or slave.

dc42 commented

DuetWiFiServer uses the customised ESP8266 SPI driver in file HSPI.cpp.