kendryte / kendryte-freertos-demo

Demo of kendryte k210 FreeRTOS SDK
https://github.com/kendryte/kendryte-freertos-sdk
64 stars 24 forks source link

How to send data in spi slave mode? #6

Open Pillar1989 opened 5 years ago

Pillar1989 commented 5 years ago

There is no send funciton code in the latest code.

https://github.com/kendryte/kendryte-freertos-demo/blob/e86330d5be27293d88f283952a88567aa2b767bb/spi_slave/spi_slave.c#L43

xiangbingj commented 5 years ago

There is no send funciton code in the latest code.

kendryte-freertos-demo/spi_slave/spi_slave.c

Line 43 in e86330d

spi_slave_config(spi_slave, gio, SPI_SLAVE_INT_IO, SPI_SLAVE_READY_IO, 8, data, len, spi_slave_receive_hook);

Hello, k210 used as a slave device like spi flash. spi master can get data from spi slave. spi slave do not send data actively. Of course, the driver can also be modified according to the communication requirements.