nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

Not support SPI slave #1922

Closed iFish85 closed 7 years ago

iFish85 commented 7 years ago

I can see there are some slave-related codes in app/driver/spi.c, but why platform_spi_setup() hardcode spi_master_init() ? Also the document shows that "spi.SLAVE - not supported currently" Is there any known serious issues on spi slave implementation?

Thanks

djphoenix commented 7 years ago

Is there any known serious issues on spi slave implementation?

Yes - this is still undone :) And noone who need it and have time+skill to implement.

iFish85 commented 7 years ago

Yes - this is still undone :) And noone who need it and have time+skill to implement.

Fortunately, we need this slave function on our production... I find the esp8266 SDK (NONOS and RTOS) already include SPISlaveSendData/SPISlaveRecvData, if these functions can works well, Lua api also can be implemented, right? Anyway, I will try to implement it.

Thanks.