esp8266/machine_hspi: After an SPI write wait for last byte to transfer.
Because otherwise the function can return with data still waiting to be
clocked out, and CS might then be disabled before the SPI transaction is
complete.  Fixes issue
@@ -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
