From a34c5947d9027b8d2d37ffac078f0d84806c444e Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Fri, 10 Aug 2018 23:22:53 -0700 Subject: [PATCH] SPITFT: don't USE_FAST_PINIO on WICED --- Adafruit_SPITFT.cpp | 3 +-- Adafruit_SPITFT.h | 18 ++++++++++-------- Adafruit_SPITFT_Macros.h | 5 ++--- library.properties | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index a840377f..8b2c1d60 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -160,8 +160,7 @@ Adafruit_SPITFT::Adafruit_SPITFT(uint16_t w, uint16_t h, @param freq The desired maximum SPI hardware clock frequency */ /**************************************************************************/ -void Adafruit_SPITFT::initSPI(uint32_t freq) -{ +void Adafruit_SPITFT::initSPI(uint32_t freq) { _freq = freq; // Control Pins diff --git a/Adafruit_SPITFT.h b/Adafruit_SPITFT.h index 48c4867e..53cdd985 100644 --- a/Adafruit_SPITFT.h +++ b/Adafruit_SPITFT.h @@ -13,18 +13,19 @@ #define USE_FAST_PINIO #if defined(__AVR__) -typedef volatile uint8_t RwReg; + typedef volatile uint8_t RwReg; #elif defined(ARDUINO_STM32_FEATHER) -typedef volatile uint32 RwReg; + typedef volatile uint32 RwReg; + #undef USE_FAST_PINIO #elif defined(__OPENCR__) || defined (__OPENCM904__) -#undef USE_FAST_PINIO + #undef USE_FAST_PINIO #elif defined(ARDUINO_FEATHER52) || defined(__arm__) -typedef volatile uint32_t RwReg; + typedef volatile uint32_t RwReg; #elif defined(ESP32) || defined(ESP8266) -typedef volatile uint32_t RwReg; -#undef USE_FAST_PINIO + typedef volatile uint32_t RwReg; + #undef USE_FAST_PINIO #else -#undef USE_FAST_PINIO + #undef USE_FAST_PINIO #endif #include "Adafruit_SPITFT_Macros.h" @@ -37,7 +38,8 @@ class Adafruit_SPITFT : public Adafruit_GFX { Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1); Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _RST = -1); - virtual void begin(uint32_t freq) = 0; ///< Virtual begin() function to set SPI frequency, must be overridden in subclass. @param freq Maximum SPI hardware clock speed + virtual void begin(uint32_t freq) = 0; ///< Virtual begin() function to set SPI frequency, must be overridden in subclass. @param freq Maximum SPI hardware clock speed + void initSPI(uint32_t freq); // Required Non-Transaction diff --git a/Adafruit_SPITFT_Macros.h b/Adafruit_SPITFT_Macros.h index 79938654..f0466ef5 100644 --- a/Adafruit_SPITFT_Macros.h +++ b/Adafruit_SPITFT_Macros.h @@ -46,7 +46,7 @@ * Hardware SPI Macros * */ -#define SPI_OBJECT SPI +#define SPI_OBJECT SPI #if defined (__AVR__) || defined(TEENSYDUINO) || defined(ARDUINO_ARCH_STM32F1) #define HSPI_SET_CLOCK() SPI_OBJECT.setClockDivider(SPI_CLOCK_DIV2); @@ -115,5 +115,4 @@ static inline uint8_t _avr_spi_read(void) { #define SPI_WRITE32(l) if(_sclk < 0){HSPI_WRITE32(l);}else{SSPI_WRITE32(l);} #define SPI_WRITE_PIXELS(c,l) if(_sclk < 0){HSPI_WRITE_PIXELS(c,l);}else{SSPI_WRITE_PIXELS(c,l);} - -#endif +#endif // _ADAFRUIT_SPITFT_MACROS diff --git a/library.properties b/library.properties index 410d0d27..e2efc0da 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit GFX Library -version=1.2.7 +version=1.2.8 author=Adafruit maintainer=Adafruit sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from.