ESP8266: Make sure SPI write finishes before returning.

Fixes #62.
This commit is contained in:
Scott Shawcroft 2017-02-15 17:25:41 +01:00
parent 49287e91b1
commit f511c263a0
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}