Skip to content

Commit

Permalink
SPITFT: don't USE_FAST_PINIO on WICED
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Aug 11, 2018
1 parent f379d70 commit a34c594
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions Adafruit_SPITFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 10 additions & 8 deletions Adafruit_SPITFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions Adafruit_SPITFT_Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
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.7
version=1.2.8
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 a34c594

Please sign in to comment.