From 026c152d454a995f3fdc7daf278a809abc34cc38 Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Sun, 17 Mar 2019 19:43:48 -0700 Subject: [PATCH] Conditional compile SAMD51 parallel code --- Adafruit_SPITFT.cpp | 2 ++ Adafruit_SPITFT.h | 4 ++-- library.properties | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index 1f2acd4..832a7a4 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -690,6 +690,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) { } else { // Parallel connection + #if defined(__SAMD51__) int dmaChannel = dma.getChannel(); // Enable event output, use EVOSEL output DMAC->Channel[dmaChannel].CHEVCTRL.bit.EVOE = 1; @@ -795,6 +796,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) { descriptor[d].DSTADDR.reg = (uint32_t)tft8.writePort; } + #endif // __SAMD51 } // end parallel-specific DMA setup lastFillColor = 0x0000; diff --git a/Adafruit_SPITFT.h b/Adafruit_SPITFT.h index d11f484..697d542 100644 --- a/Adafruit_SPITFT.h +++ b/Adafruit_SPITFT.h @@ -67,9 +67,9 @@ typedef volatile PORT_t* PORTreg_t; ///< PORT register type #endif #if defined(ADAFRUIT_PYPORTAL) -#define USE_SPI_DMA ///< Auto DMA if using PyPortal + #define USE_SPI_DMA ///< Auto DMA if using PyPortal #else -//#define USE_SPI_DMA ///< If set, use DMA if available + //#define USE_SPI_DMA ///< If set, use DMA if available #endif // Another "oops" name -- this now also handles parallel DMA. // If DMA is enabled, Arduino sketch MUST #include diff --git a/library.properties b/library.properties index de473d4..296c72b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit GFX Library -version=1.4.5 +version=1.4.6 author=Adafruit maintainer=Adafruit sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.