diff --git a/Adafruit_GFX.cpp b/Adafruit_GFX.cpp index af989002..0cc48789 100644 --- a/Adafruit_GFX.cpp +++ b/Adafruit_GFX.cpp @@ -172,6 +172,20 @@ 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 63c6ab68..c363641a 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 @@ -43,6 +45,8 @@ class Adafruit_GFX : public Print { 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