From 1ea46e2f5c12667fb58afdfcad9f78306308a757 Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Tue, 17 Jul 2018 18:34:21 -0700 Subject: [PATCH] Fix for Teensy 3.x boards --- Adafruit_SPITFT.cpp | 22 +++++++++++----------- library.properties | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index db6538d3..6360434b 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -87,16 +87,16 @@ Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, _miso = miso; _freq = 0; #ifdef USE_FAST_PINIO - csport = portOutputRegister(digitalPinToPort(_cs)); - cspinmask = digitalPinToBitMask(_cs); - dcport = portOutputRegister(digitalPinToPort(_dc)); - dcpinmask = digitalPinToBitMask(_dc); - clkport = portOutputRegister(digitalPinToPort(_sclk)); + csport = (RwReg *)portOutputRegister(digitalPinToPort(_cs)); + cspinmask = digitalPinToBitMask(_cs); + dcport = (RwReg *)portOutputRegister(digitalPinToPort(_dc)); + dcpinmask = digitalPinToBitMask(_dc); + clkport = (RwReg *)portOutputRegister(digitalPinToPort(_sclk)); clkpinmask = digitalPinToBitMask(_sclk); - mosiport = portOutputRegister(digitalPinToPort(_mosi)); + mosiport = (RwReg *)portOutputRegister(digitalPinToPort(_mosi)); mosipinmask = digitalPinToBitMask(_mosi); if(miso >= 0){ - misoport = portInputRegister(digitalPinToPort(_miso)); + misoport = (RwReg *)portInputRegister(digitalPinToPort(_miso)); misopinmask = digitalPinToBitMask(_miso); } else { misoport = 0; @@ -126,10 +126,10 @@ Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, _miso = -1; _freq = 0; #ifdef USE_FAST_PINIO - csport = portOutputRegister(digitalPinToPort(_cs)); - cspinmask = digitalPinToBitMask(_cs); - dcport = portOutputRegister(digitalPinToPort(_dc)); - dcpinmask = digitalPinToBitMask(_dc); + csport = (RwReg *)portOutputRegister(digitalPinToPort(_cs)); + cspinmask = digitalPinToBitMask(_cs); + dcport = (RwReg *)portOutputRegister(digitalPinToPort(_dc)); + dcpinmask = digitalPinToBitMask(_dc); clkport = 0; clkpinmask = 0; mosiport = 0; diff --git a/library.properties b/library.properties index a705ccd2..7f67432f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit GFX Library -version=1.2.5 +version=1.2.6 author=Adafruit maintainer=Adafruit sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.