Skip to content

Commit 026c152

Browse files
Conditional compile SAMD51 parallel code
1 parent fe6266e commit 026c152

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Adafruit_SPITFT.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) {
690690

691691
} else { // Parallel connection
692692

693+
#if defined(__SAMD51__)
693694
int dmaChannel = dma.getChannel();
694695
// Enable event output, use EVOSEL output
695696
DMAC->Channel[dmaChannel].CHEVCTRL.bit.EVOE = 1;
@@ -795,6 +796,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) {
795796
descriptor[d].DSTADDR.reg =
796797
(uint32_t)tft8.writePort;
797798
}
799+
#endif // __SAMD51
798800
} // end parallel-specific DMA setup
799801

800802
lastFillColor = 0x0000;

Adafruit_SPITFT.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ typedef volatile PORT_t* PORTreg_t; ///< PORT register type
6767
#endif
6868

6969
#if defined(ADAFRUIT_PYPORTAL)
70-
#define USE_SPI_DMA ///< Auto DMA if using PyPortal
70+
#define USE_SPI_DMA ///< Auto DMA if using PyPortal
7171
#else
72-
//#define USE_SPI_DMA ///< If set, use DMA if available
72+
//#define USE_SPI_DMA ///< If set, use DMA if available
7373
#endif
7474
// Another "oops" name -- this now also handles parallel DMA.
7575
// If DMA is enabled, Arduino sketch MUST #include <Adafruit_ZeroDMA.h>

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Adafruit GFX Library
2-
version=1.4.5
2+
version=1.4.6
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
55
sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.

0 commit comments

Comments
 (0)