From 47babd2098daadf6133be3b5a31f36f08214d745 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 14 Nov 2016 13:08:30 +0200 Subject: [PATCH] shave off some time when sending multiple bytes through SPI --- cores/esp32/esp32-hal-spi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cores/esp32/esp32-hal-spi.c b/cores/esp32/esp32-hal-spi.c index 7947108c..39654453 100644 --- a/cores/esp32/esp32-hal-spi.c +++ b/cores/esp32/esp32-hal-spi.c @@ -642,9 +642,9 @@ void __spiTransferBytes(spi_t * spi, uint8_t * data, uint8_t * out, uint32_t byt uint8_t * bytesBuf = (uint8_t *) wordsBuf; if(data) { - for(i=0; idev->cmd.usr); @@ -662,9 +662,7 @@ void __spiTransferBytes(spi_t * spi, uint8_t * data, uint8_t * out, uint32_t byt for(i=0; idev->data_buf[i];//copy spi fifo to buffer } - for(i=0; i