From e9b86373a67839e2e19210fee258b98c363e288e Mon Sep 17 00:00:00 2001 From: Robin Giese Date: Sun, 31 Jan 2021 17:05:02 -0800 Subject: [PATCH 1/3] Fix compiler warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef] --- Adafruit_SPITFT.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index a35ae444..2c65610c 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -560,7 +560,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) { if ( #if !defined(SPI_INTERFACES_COUNT) 1 -#endif +#else #if SPI_INTERFACES_COUNT > 0 (hwspi._spi == &SPI) #endif @@ -579,6 +579,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) { #if SPI_INTERFACES_COUNT > 5 || (hwspi._spi == &SPI5) #endif +#endif // end SPI_INTERFACES_COUNT ) { hwspi._spi->begin(); } From 87bfdd4d8775f9b3d03cd5bb64db87a31d9840e3 Mon Sep 17 00:00:00 2001 From: Robin Giese Date: Sun, 31 Jan 2021 17:06:24 -0800 Subject: [PATCH 2/3] Fixing compiler error: 'virtual Adafruit_SPITFT::~Adafruit_SPITFT()' is implicitly deleted because the default definition would be ill-formed --- Adafruit_SPITFT.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Adafruit_SPITFT.h b/Adafruit_SPITFT.h index a5754bbe..85391f47 100644 --- a/Adafruit_SPITFT.h +++ b/Adafruit_SPITFT.h @@ -154,6 +154,10 @@ class Adafruit_SPITFT : public Adafruit_GFX { int8_t wr, int8_t dc, int8_t cs = -1, int8_t rst = -1, int8_t rd = -1); + // DESTRUCTOR ---------------------------------------------------------- + + ~Adafruit_SPITFT() {}; + // CLASS MEMBER FUNCTIONS ---------------------------------------------- // These first two functions MUST be declared by subclasses: From 347b1341e93baa4669782de5f8e60ba78aa3e8dd Mon Sep 17 00:00:00 2001 From: Robin Giese Date: Sun, 31 Jan 2021 17:22:05 -0800 Subject: [PATCH 3/3] Fixing clang-format --- Adafruit_SPITFT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adafruit_SPITFT.h b/Adafruit_SPITFT.h index 85391f47..78e850c4 100644 --- a/Adafruit_SPITFT.h +++ b/Adafruit_SPITFT.h @@ -156,7 +156,7 @@ class Adafruit_SPITFT : public Adafruit_GFX { // DESTRUCTOR ---------------------------------------------------------- - ~Adafruit_SPITFT() {}; + ~Adafruit_SPITFT(){}; // CLASS MEMBER FUNCTIONS ----------------------------------------------