Conditional compile SAMD51 parallel code

This commit is contained in:
Phillip Burgess 2019-03-17 19:43:48 -07:00
parent fe6266e2a8
commit 026c152d45
3 changed files with 5 additions and 3 deletions

View File

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

View File

@ -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 <Adafruit_ZeroDMA.h>

View File

@ -1,5 +1,5 @@
name=Adafruit GFX Library
version=1.4.5
version=1.4.6
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.