SPI Slave mode amount of received data
Posted: Mon May 28, 2018 10:06 am
Hello!
I use ESP32 as SPI Slave device.
I use following code:
contain amount of data sent from ESP32.
My problem is that I can't to check for amount of received data.
How can I do that?
I use ESP32 as SPI Slave device.
I use following code:
Code: Select all
memset(spi_recvbuf, 0x00, sizeof(spi_recvbuf));
ret1 = spi_slave_queue_trans(HSPI_HOST, &t, 1);
ret2 = spi_slave_get_trans_result(HSPI_HOST, &t2, portMAX_DELAY);
if(t2->trans_len > 8)
spi_2_printf("spi rcv %d of %d bytes\r\n", t2->trans_len / 8, t2->length / 8);
Code: Select all
trans_len
My problem is that I can't to check for amount of received data.
How can I do that?