From 6704269c77d74f5c55992fc6129c1cf3c985f0e7 Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Thu, 14 Mar 2019 22:09:42 -0700 Subject: [PATCH] Parallel DMA working on PyPortal --- Adafruit_SPITFT.cpp | 65 +++++++++++++++++++++++++++++++-------------- library.properties | 2 +- 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index f586999..d1f432e 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -673,7 +673,27 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) { dma.setTrigger(dmac_id); dma.setAction(DMA_TRIGGER_ACTON_BEAT); - } else { // Parallel connection + // Initialize descriptor list. + for(int d=0; dPCHCTRL[EVSYS_GCLK_ID_0].bit.CHEN); MCLK->APBBMASK.bit.EVSYS_ = 1; + // Connect Timer EVU to ch 0 EVSYS->USER[tcList[tcNum].evu].reg = 1; // Datasheet recommends single write operation; @@ -758,27 +779,29 @@ void Adafruit_SPITFT::initSPI(uint32_t freq) { ev.bit.PATH = 2; // Asynchronous ev.bit.EVGEN = 0x22 + dmaChannel; // DMA channel 0+ EVSYS->Channel[0].CHANNEL.reg = ev.reg; + + // Initialize descriptor list. + for(int d=0; d sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.