summaryrefslogtreecommitdiff
path: root/ports/esp32s2/common-hal
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-10-28 14:45:29 -0700
committerGitHub <noreply@github.com>2020-10-28 14:45:29 -0700
commit7cbc50962beac17f07162e75be7f041f1b11671f (patch)
treee33781989f89cc819faca2e1b6e0546fc353b9bd /ports/esp32s2/common-hal
parent557a58b244b19846472113fb90777303604f7f67 (diff)
parent54c0e98a37fc3c997d3a7a566a67e33d1636f46a (diff)
Merge pull request #3611 from tannewt/esp32s2_eink_portal
Add Adafruit ESP EInk Portal and grayscale EInk support
Diffstat (limited to 'ports/esp32s2/common-hal')
-rw-r--r--ports/esp32s2/common-hal/busio/SPI.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/esp32s2/common-hal/busio/SPI.c b/ports/esp32s2/common-hal/busio/SPI.c
index 1906ca6f0..490419f34 100644
--- a/ports/esp32s2/common-hal/busio/SPI.c
+++ b/ports/esp32s2/common-hal/busio/SPI.c
@@ -357,6 +357,9 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
} else {
hal->dma_enabled = 0;
burst_length = sizeof(hal->hw->data_buf);
+ // When switching to non-DMA, we need to make sure DMA is off. Otherwise,
+ // the S2 will transmit zeroes instead of our data.
+ spi_ll_txdma_disable(hal->hw);
}
// This rounds up.