From cc3a1084fb30d2c2a40807755e7d55f9e4872f55 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Sat, 9 May 2020 19:51:03 +0100 Subject: [PATCH] Fix #617 --- Processors/TFT_eSPI_ESP32.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Processors/TFT_eSPI_ESP32.h b/Processors/TFT_eSPI_ESP32.h index ee8ceb6..23477c7 100644 --- a/Processors/TFT_eSPI_ESP32.h +++ b/Processors/TFT_eSPI_ESP32.h @@ -42,6 +42,14 @@ #define TFT_PARALLEL_8_BIT // Generic parallel flag #endif + // Code to check if DMA is busy, used by SPI bus transaction transaction and endWrite functions + #if !defined(TFT_PARALLEL_8_BIT) && !defined(ILI9488_DRIVER) && !defined (RPI_DISPLAY_TYPE) + #define ESP32_DMA + // Code to check if DMA is busy, used by SPI DMA + transaction + endWrite functions + #define DMA_BUSY_CHECK { if (spiBusyCheck) dmaWait(); } + #else + #define DMA_BUSY_CHECK + #endif // If smooth font is used then it is likely SPIFFS will be needed #ifdef SMOOTH_FONT @@ -302,16 +310,6 @@ //////////////////////////////////////////////////////////////////////////////////////// #else - #define ESP32_DMA // DMA is available for SPI - - // Code to check if DMA is busy, used by SPI bus transaction transaction and endWrite functions - #ifdef ESP32_DMA - // Code to check if DMA is busy, used by SPI DMA + transaction + endWrite functions - #define DMA_BUSY_CHECK { if (spiBusyCheck) dmaWait(); } - #else - #define DMA_BUSY_CHECK - #endif - // ESP32 low level SPI writes for 8, 16 and 32 bit values // to avoid the function call overhead #define TFT_WRITE_BITS(D, B) \