Skip to content

Commit

Permalink
Fix for Teensy 3.x boards
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Jul 18, 2018
1 parent b2cc77a commit 1ea46e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Adafruit_SPITFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit GFX Library
version=1.2.5
version=1.2.6
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.
Expand Down

0 comments on commit 1ea46e2

Please sign in to comment.