From 9449aec6885da531aaf824ad8a66b61b0d5b0375 Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Mon, 2 Mar 2020 15:34:49 +0000 Subject: [PATCH] port pin wiring for Zero and M0 Pro --- utility/mcufriend_shield.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utility/mcufriend_shield.h b/utility/mcufriend_shield.h index b4252f7..6ffcea1 100644 --- a/utility/mcufriend_shield.h +++ b/utility/mcufriend_shield.h @@ -239,6 +239,8 @@ void write_8(uint8_t val) #define DMASK 0x0030C3C0 // #define write_8(x) PORT->Group[0].OUT.reg = (PORT->Group[0].OUT.reg & ~DMASK)|(((x) & 0x0F) << 6)|(((x) & 0x30) << 10)|(((x) & 0xC0)<<14) #if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAMD_ZERO) // American ZERO +//LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST | +//SAMD21 pin |PA21|PA20|PA15|PB8 |PB9 |PA14|PA7 |PA6 | |PA2|PB8|PB9 |PA4 |PA5 | #define write_8(x) {\ PORT->Group[0].OUTCLR.reg = DMASK;\ PORT->Group[0].OUTSET.reg = (((x) & 0x0B) << 6)\ @@ -253,6 +255,8 @@ void write_8(uint8_t val) |((PORT->Group[0].IN.reg >> 10) & (1<<5))\ |((PORT->Group[0].IN.reg >> 14) & 0xC0)) #else //default to an M0_PRO on v1.6.5 or 1.7.6 +//LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST | +//SAMD21 pin |PA21|PA20|PA15|PA14|PB9 |PB8 |PA7 |PA6 | |PA2|PB8|PB9 |PA4 |PA5 | #define write_8(x) {\ PORT->Group[0].OUTCLR.reg = DMASK;\ PORT->Group[0].OUTSET.reg = (((x) & 0x0F) << 6)\