summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ports/esp8266/machine_hspi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/esp8266/machine_hspi.c b/ports/esp8266/machine_hspi.c
index 9fd0f48682..ff77282911 100644
--- a/ports/esp8266/machine_hspi.c
+++ b/ports/esp8266/machine_hspi.c
@@ -65,6 +65,9 @@ STATIC void machine_hspi_transfer(mp_obj_base_t *self_in, size_t len, const uint
spi_tx8fast(HSPI, src[i]);
++i;
}
+ // wait for SPI transaction to complete
+ while (spi_busy(HSPI)) {
+ }
} else {
// we need to read and write data