From 64339017929fc03f06e0814866fa86fef9abd151 Mon Sep 17 00:00:00 2001 From: Gavin Hurlbut Date: Mon, 19 Dec 2016 00:47:04 -0800 Subject: [PATCH 1/3] Add clearDisplay() and display() as stubs --- Adafruit_GFX.cpp | 16 ++++++++++++++++ Adafruit_GFX.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/Adafruit_GFX.cpp b/Adafruit_GFX.cpp index af98900..486fa3a 100644 --- a/Adafruit_GFX.cpp +++ b/Adafruit_GFX.cpp @@ -172,6 +172,22 @@ void Adafruit_GFX::writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, } } + +/**************************************************************************/ +/*! + @brief Clear the display, overwrite in subclasses. +*/ +/**************************************************************************/ +void Adafruit_GFX::clearDisplay() {} + + +/**************************************************************************/ +/*! + @brief Update the display, overwrite in subclasses. +*/ +/**************************************************************************/ +void Adafruit_GFX::display() {} + /**************************************************************************/ /*! @brief Start a display-writing routine, overwrite in subclasses. diff --git a/Adafruit_GFX.h b/Adafruit_GFX.h index 63c6ab6..1d363d2 100644 --- a/Adafruit_GFX.h +++ b/Adafruit_GFX.h @@ -43,6 +43,8 @@ public: virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color); virtual void endWrite(void); + virtual void clearDisplay(void); + virtual void display(void); // CONTROL API // These MAY be overridden by the subclass to provide device-specific From 3fbf5735a33cc6fff7f2942ae33c72bfc1d434d7 Mon Sep 17 00:00:00 2001 From: Gavin Hurlbut Date: Thu, 26 Jan 2023 22:34:29 -0500 Subject: [PATCH 2/3] Remove extra blank lines --- Adafruit_GFX.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Adafruit_GFX.cpp b/Adafruit_GFX.cpp index 486fa3a..0cc4878 100644 --- a/Adafruit_GFX.cpp +++ b/Adafruit_GFX.cpp @@ -172,7 +172,6 @@ void Adafruit_GFX::writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, } } - /**************************************************************************/ /*! @brief Clear the display, overwrite in subclasses. @@ -180,7 +179,6 @@ void Adafruit_GFX::writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, /**************************************************************************/ void Adafruit_GFX::clearDisplay() {} - /**************************************************************************/ /*! @brief Update the display, overwrite in subclasses. From 3ca0b6a9d728b599108082a4e884187c03b6bd3a Mon Sep 17 00:00:00 2001 From: Gavin Hurlbut Date: Tue, 7 Mar 2023 16:43:49 -0500 Subject: [PATCH 3/3] Allow to skip SPI for tight FLASH situations --- Adafruit_GFX.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Adafruit_GFX.h b/Adafruit_GFX.h index 1d363d2..c363641 100644 --- a/Adafruit_GFX.h +++ b/Adafruit_GFX.h @@ -10,7 +10,9 @@ #include "gfxfont.h" #include +#ifndef SKIP_SPI #include +#endif /// A generic graphics superclass that can handle all sorts of drawing. At a /// minimum you can subclass and provide drawPixel(). At a maximum you can do a