diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-15 17:25:41 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-15 17:25:41 +0100 |
| commit | f511c263a0c880aba5379cbb2ce459489531872f (patch) | |
| tree | a981f1919e8cfdf747b3619bfb5466be1c0e0199 | |
| parent | 49287e91b1686b76b7f406c8f2ac89e8eef41fd5 (diff) | |
ESP8266: Make sure SPI write finishes before returning.
Fixes #62.
| -rw-r--r-- | esp8266/common-hal/nativeio/SPI.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/esp8266/common-hal/nativeio/SPI.c b/esp8266/common-hal/nativeio/SPI.c index 27774dcab..5c00e5843 100644 --- a/esp8266/common-hal/nativeio/SPI.c +++ b/esp8266/common-hal/nativeio/SPI.c @@ -122,6 +122,7 @@ bool common_hal_nativeio_spi_write(nativeio_spi_obj_t *self, spi_tx8fast(HSPI, data[i]); ++i; } + while (spi_busy(HSPI)) {}; // Wait for SPI to finish the last byte. return true; } |
