diff --git a/BUILDS.md b/BUILDS.md
index 76d0460705a3..ee82439ae1a9 100644
--- a/BUILDS.md
+++ b/BUILDS.md
@@ -248,7 +248,6 @@ Note: the `minimal` variant is not listed as it shouldn't be used outside of the
| **Feature or Sensor** | **l** | **t** | **k** | **s** | **i** | **d** | **Remarks** |
| USE_DISPLAY | - | - / - | - | - | - | x |
| USE_DISPLAY_LCD | - | - / - | - | - | - | x |
-| USE_DISPLAY_SSD1306 | - | - / - | - | - | - | x |
| USE_DISPLAY_MATRIX | - | - / - | - | - | - | x |
| USE_DISPLAY_SH1106 | - | - / - | - | - | - | x |
| USE_DISPLAY_EPAPER_29 | - | - / - | - | - | - | x |
@@ -279,6 +278,6 @@ Note: the `minimal` variant is not listed as it shouldn't be used outside of the
| USE_DINGTIAN_RELAY | | / - | | | | |
| USE_MATTER_DEVICE | | / x | | | | | See SetOption151 |
-The following specific display drivers are replaced with uDisplay, see [uDisplay/uTouch documentation](https://tasmota.github.io/docs/Universal-Display-Driver/#migrating-to-udisplay): `USE_DISPLAY_ILI9341`
+The following specific display drivers are replaced with uDisplay, see [uDisplay/uTouch documentation](https://tasmota.github.io/docs/Universal-Display-Driver/#migrating-to-udisplay): `USE_DISPLAY_ILI9341`, `USE_DISPLAY_SSD1306`
- USE_MQTT_TLS is enabled by default in every ESP32 variants
diff --git a/I2CDEVICES.md b/I2CDEVICES.md
index 71e4ff15290e..afd1d1f1afb7 100644
--- a/I2CDEVICES.md
+++ b/I2CDEVICES.md
@@ -13,7 +13,7 @@ Index | Define | Driver | Device | Address(es) | Bus2 | Descrip
2 | USE_PCF8574 | xdrv_28 | PCF8574 | 0x20 - 0x26 | | 8-bit I/O expander (address range overridable)
2 | USE_PCF8574 | xdrv_28 | PCF8574A | 0x39 - 0x3F | | 8-bit I/O expander (address range overridable)
3 | USE_DISPLAY_LCD | xdsp_01 | | 0x27, 0x3F | | LCD display
- 4 | USE_DISPLAY_SSD1306 | xdsp_02 | SSD1306 | 0x3C - 0x3D | | Oled display
+ 4 | - REMOVED | | | | | USE_DISPLAY_SSD1306 - REMOVED
5 | USE_DISPLAY_MATRIX | xdsp_03 | HT16K33 | 0x70 - 0x77 | | 8x8 led matrix
6 | USE_DISPLAY_SH1106 | xdsp_07 | SH1106 | 0x3C - 0x3D | | Oled display
7 | USE_ADE7953 | xnrg_07 | ADE7953 | 0x38 | | Energy monitor
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/ISSUE_TEMPLATE.md b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index f0e26146fa93..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,46 +0,0 @@
-Thank you for opening an issue on an Adafruit Arduino library repository. To
-improve the speed of resolution please review the following guidelines and
-common troubleshooting steps below before creating the issue:
-
-- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use
- the forums at http://forums.adafruit.com to ask questions and troubleshoot why
- something isn't working as expected. In many cases the problem is a common issue
- that you will more quickly receive help from the forum community. GitHub issues
- are meant for known defects in the code. If you don't know if there is a defect
- in the code then start with troubleshooting on the forum first.
-
-- **If following a tutorial or guide be sure you didn't miss a step.** Carefully
- check all of the steps and commands to run have been followed. Consult the
- forum if you're unsure or have questions about steps in a guide/tutorial.
-
-- **For Arduino projects check these very common issues to ensure they don't apply**:
-
- - For uploading sketches or communicating with the board make sure you're using
- a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes
- very hard to tell the difference between a data and charge cable! Try using the
- cable with other devices or swapping to another cable to confirm it is not
- the problem.
-
- - **Be sure you are supplying adequate power to the board.** Check the specs of
- your board and plug in an external power supply. In many cases just
- plugging a board into your computer is not enough to power it and other
- peripherals.
-
- - **Double check all soldering joints and connections.** Flakey connections
- cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints.
-
- - **Ensure you are using an official Arduino or Adafruit board.** We can't
- guarantee a clone board will have the same functionality and work as expected
- with this code and don't support them.
-
-If you're sure this issue is a defect in the code and checked the steps above
-please fill in the following fields to provide enough troubleshooting information.
-You may delete the guideline and text above to just leave the following details:
-
-- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE**
-
-- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO
- VERSION HERE**
-
-- List the steps to reproduce the problem below (if possible attach a sketch or
- copy the sketch code in too): **LIST REPRO STEPS BELOW**
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/PULL_REQUEST_TEMPLATE.md b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 7b641eb862c0..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Thank you for creating a pull request to contribute to Adafruit's GitHub code!
-Before you open the request please review the following guidelines and tips to
-help it be more easily integrated:
-
-- **Describe the scope of your change--i.e. what the change does and what parts
- of the code were modified.** This will help us understand any risks of integrating
- the code.
-
-- **Describe any known limitations with your change.** For example if the change
- doesn't apply to a supported platform of the library please mention it.
-
-- **Please run any tests or examples that can exercise your modified code.** We
- strive to not break users of the code and running tests/examples helps with this
- process.
-
-Thank you again for contributing! We will try to test and integrate the change
-as soon as we can, but be aware we have many GitHub repositories to manage and
-can't immediately respond to every request. There is no need to bump or check in
-on a pull request (it will clutter the discussion of the request).
-
-Also don't be worried if the request is closed or not integrated--sometimes the
-priorities of Adafruit's GitHub code (education, ease of use) might not match the
-priorities of the pull request. Don't fret, the open source community thrives on
-forks and GitHub makes it easy to keep your changes in a forked repo.
-
-After reviewing the guidelines above you can delete this text from the pull request.
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.gitignore b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.gitignore
deleted file mode 100644
index c2a26c038308..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Our handy .gitignore for automation ease
-Doxyfile*
-doxygen_sqlite3.db
-html
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.travis.yml b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.travis.yml
deleted file mode 100644
index 1d9184e52328..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-language: c
-sudo: false
-cache:
- directories:
- - ~/arduino_ide
- - ~/.arduino15/packages/
-git:
- depth: false
- quiet: true
-env:
- global:
- - ARDUINO_IDE_VERSION="1.8.5"
- - PRETTYNAME="Adafruit SSD1306"
-# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile"
-# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
-
-before_install:
- - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh)
-
-install:
- - arduino --install-library "Adafruit GFX Library"
-
-script:
- - build_main_platforms
-
-# Generate and deploy documentation
-after_success:
- - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh)
- - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh)
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.cpp b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.cpp
deleted file mode 100644
index 2a5928ad36ad..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.cpp
+++ /dev/null
@@ -1,1173 +0,0 @@
-/*!
- * @file Adafruit_SSD1306.cpp
- *
- * @mainpage Arduino library for monochrome OLEDs based on SSD1306 drivers.
- *
- * @section intro_sec Introduction
- *
- * This is documentation for Adafruit's SSD1306 library for monochrome
- * OLED displays: http://www.adafruit.com/category/63_98
- *
- * These displays use I2C or SPI to communicate. I2C requires 2 pins
- * (SCL+SDA) and optionally a RESET pin. SPI requires 4 pins (MOSI, SCK,
- * select, data/command) and optionally a reset pin. Hardware SPI or
- * 'bitbang' software SPI are both supported.
- *
- * Adafruit invests time and resources providing this open source code,
- * please support Adafruit and open-source hardware by purchasing
- * products from Adafruit!
- *
- * @section dependencies Dependencies
- *
- * This library depends on
- * Adafruit_GFX being present on your system. Please make sure you have
- * installed the latest version before using this library.
- *
- * @section author Author
- *
- * Written by Limor Fried/Ladyada for Adafruit Industries, with
- * contributions from the open source community.
- *
- * @section license License
- *
- * BSD license, all text above, and the splash screen included below,
- * must be included in any redistribution.
- *
- */
-
-#ifdef __AVR__
- #include
-#elif defined(ESP8266) || defined(ESP32)
- #include
-#else
- #define pgm_read_byte(addr) \
- (*(const unsigned char *)(addr)) ///< PROGMEM workaround for non-AVR
-#endif
-
-#if !defined(__ARM_ARCH) && !defined(ENERGIA) && !defined(ESP8266) && !defined(ESP32) && !defined(__arc__)
- #include
-#endif
-
-#include
-#include "Adafruit_SSD1306.h"
-#include "splash.h"
-
-// SOME DEFINES AND STATIC VARIABLES USED INTERNALLY -----------------------
-
-#if defined(BUFFER_LENGTH)
- #define WIRE_MAX BUFFER_LENGTH ///< AVR or similar Wire lib
-#elif defined(SERIAL_BUFFER_SIZE)
- #define WIRE_MAX (SERIAL_BUFFER_SIZE-1) ///< Newer Wire uses RingBuffer
-#else
- #define WIRE_MAX 32 ///< Use common Arduino core default
-#endif
-
-#define ssd1306_swap(a, b) \
- (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b))) ///< No-temp-var swap operation
-
-#if ARDUINO >= 100
- #define WIRE_WRITE wire->write ///< Wire write function in recent Arduino lib
-#else
- #define WIRE_WRITE wire->send ///< Wire write function in older Arduino lib
-#endif
-
-#ifdef HAVE_PORTREG
- #define SSD1306_SELECT *csPort &= ~csPinMask; ///< Device select
- #define SSD1306_DESELECT *csPort |= csPinMask; ///< Device deselect
- #define SSD1306_MODE_COMMAND *dcPort &= ~dcPinMask; ///< Command mode
- #define SSD1306_MODE_DATA *dcPort |= dcPinMask; ///< Data mode
-#else
- #define SSD1306_SELECT digitalWrite(csPin, LOW); ///< Device select
- #define SSD1306_DESELECT digitalWrite(csPin, HIGH); ///< Device deselect
- #define SSD1306_MODE_COMMAND digitalWrite(dcPin, LOW); ///< Command mode
- #define SSD1306_MODE_DATA digitalWrite(dcPin, HIGH); ///< Data mode
-#endif
-
-#if (ARDUINO >= 157) && !defined(ARDUINO_STM32_FEATHER)
- #define SETWIRECLOCK wire->setClock(wireClk) ///< Set before I2C transfer
- #define RESWIRECLOCK wire->setClock(restoreClk) ///< Restore after I2C xfer
-#else // setClock() is not present in older Arduino Wire lib (or WICED)
- #define SETWIRECLOCK ///< Dummy stand-in define
- #define RESWIRECLOCK ///< keeps compiler happy
-#endif
-
-#if defined(SPI_HAS_TRANSACTION)
- #define SPI_TRANSACTION_START spi->beginTransaction(spiSettings) ///< Pre-SPI
- #define SPI_TRANSACTION_END spi->endTransaction() ///< Post-SPI
-#else // SPI transactions likewise not present in older Arduino SPI lib
- #define SPI_TRANSACTION_START ///< Dummy stand-in define
- #define SPI_TRANSACTION_END ///< keeps compiler happy
-#endif
-
-// The definition of 'transaction' is broadened a bit in the context of
-// this library -- referring not just to SPI transactions (if supported
-// in the version of the SPI library being used), but also chip select
-// (if SPI is being used, whether hardware or soft), and also to the
-// beginning and end of I2C transfers (the Wire clock may be sped up before
-// issuing data to the display, then restored to the default rate afterward
-// so other I2C device types still work). All of these are encapsulated
-// in the TRANSACTION_* macros.
-
-// Check first if Wire, then hardware SPI, then soft SPI:
-#define TRANSACTION_START \
- if(wire) { \
- SETWIRECLOCK; \
- } else { \
- if(spi) { \
- SPI_TRANSACTION_START; \
- } \
- SSD1306_SELECT; \
- } ///< Wire, SPI or bitbang transfer setup
-#define TRANSACTION_END \
- if(wire) { \
- RESWIRECLOCK; \
- } else { \
- SSD1306_DESELECT; \
- if(spi) { \
- SPI_TRANSACTION_END; \
- } \
- } ///< Wire, SPI or bitbang transfer end
-
-// CONSTRUCTORS, DESTRUCTOR ------------------------------------------------
-
-/*!
- @brief Constructor for I2C-interfaced SSD1306 displays.
- @param w
- Display width in pixels
- @param h
- Display height in pixels
- @param twi
- Pointer to an existing TwoWire instance (e.g. &Wire, the
- microcontroller's primary I2C bus).
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @param clkDuring
- Speed (in Hz) for Wire transmissions in SSD1306 library calls.
- Defaults to 400000 (400 KHz), a known 'safe' value for most
- microcontrollers, and meets the SSD1306 datasheet spec.
- Some systems can operate I2C faster (800 KHz for ESP32, 1 MHz
- for many other 32-bit MCUs), and some (perhaps not all)
- SSD1306's can work with this -- so it's optionally be specified
- here and is not a default behavior. (Ignored if using pre-1.5.7
- Arduino software, which operates I2C at a fixed 100 KHz.)
- @param clkAfter
- Speed (in Hz) for Wire transmissions following SSD1306 library
- calls. Defaults to 100000 (100 KHz), the default Arduino Wire
- speed. This is done rather than leaving it at the 'during' speed
- because other devices on the I2C bus might not be compatible
- with the faster rate. (Ignored if using pre-1.5.7 Arduino
- software, which operates I2C at a fixed 100 KHz.)
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi,
- int8_t rst_pin, uint32_t clkDuring, uint32_t clkAfter) :
- Renderer(w, h), spi(NULL), wire(twi ? twi : &Wire), xbuffer(NULL),
- mosiPin(-1), clkPin(-1), dcPin(-1), csPin(-1), rstPin(rst_pin),
- wireClk(clkDuring), restoreClk(clkAfter) {
-}
-
-/*!
- @brief Constructor for SPI SSD1306 displays, using software (bitbang)
- SPI.
- @param w
- Display width in pixels
- @param h
- Display height in pixels
- @param mosi_pin
- MOSI (master out, slave in) pin (using Arduino pin numbering).
- This transfers serial data from microcontroller to display.
- @param sclk_pin
- SCLK (serial clock) pin (using Arduino pin numbering).
- This clocks each bit from MOSI.
- @param dc_pin
- Data/command pin (using Arduino pin numbering), selects whether
- display is receiving commands (low) or data (high).
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @param cs_pin
- Chip-select pin (using Arduino pin numbering) for sharing the
- bus with other devices. Active low.
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h,
- int8_t mosi_pin, int8_t sclk_pin, int8_t dc_pin, int8_t rst_pin,
- int8_t cs_pin) : Renderer(w, h), spi(NULL), wire(NULL), xbuffer(NULL),
- mosiPin(mosi_pin), clkPin(sclk_pin), dcPin(dc_pin), csPin(cs_pin),
- rstPin(rst_pin) {
-}
-
-/*!
- @brief Constructor for SPI SSD1306 displays, using native hardware SPI.
- @param w
- Display width in pixels
- @param h
- Display height in pixels
- @param spi
- Pointer to an existing SPIClass instance (e.g. &SPI, the
- microcontroller's primary SPI bus).
- @param dc_pin
- Data/command pin (using Arduino pin numbering), selects whether
- display is receiving commands (low) or data (high).
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @param cs_pin
- Chip-select pin (using Arduino pin numbering) for sharing the
- bus with other devices. Active low.
- @param bitrate
- SPI clock rate for transfers to this display. Default if
- unspecified is 8000000UL (8 MHz).
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi,
- int8_t dc_pin, int8_t rst_pin, int8_t cs_pin, uint32_t bitrate) :
- Renderer(w, h), spi(spi ? spi : &SPI), wire(NULL), xbuffer(NULL),
- mosiPin(-1), clkPin(-1), dcPin(dc_pin), csPin(cs_pin), rstPin(rst_pin) {
-#ifdef SPI_HAS_TRANSACTION
- spiSettings = SPISettings(bitrate, MSBFIRST, SPI_MODE0);
-#endif
-}
-
-/*!
- @brief DEPRECATED constructor for SPI SSD1306 displays, using software
- (bitbang) SPI. Provided for older code to maintain compatibility
- with the current library. Screen size is determined by enabling
- one of the SSD1306_* size defines in Adafruit_SSD1306.h. New
- code should NOT use this.
- @param mosi_pin
- MOSI (master out, slave in) pin (using Arduino pin numbering).
- This transfers serial data from microcontroller to display.
- @param sclk_pin
- SCLK (serial clock) pin (using Arduino pin numbering).
- This clocks each bit from MOSI.
- @param dc_pin
- Data/command pin (using Arduino pin numbering), selects whether
- display is receiving commands (low) or data (high).
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @param cs_pin
- Chip-select pin (using Arduino pin numbering) for sharing the
- bus with other devices. Active low.
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(int8_t mosi_pin, int8_t sclk_pin,
- int8_t dc_pin, int8_t rst_pin, int8_t cs_pin) :
- Renderer(SSD1306_LCDWIDTH, SSD1306_LCDHEIGHT), spi(NULL), wire(NULL),
- xbuffer(NULL), mosiPin(mosi_pin), clkPin(sclk_pin), dcPin(dc_pin),
- csPin(cs_pin), rstPin(rst_pin) {
-}
-
-/*!
- @brief DEPRECATED constructor for SPI SSD1306 displays, using native
- hardware SPI. Provided for older code to maintain compatibility
- with the current library. Screen size is determined by enabling
- one of the SSD1306_* size defines in Adafruit_SSD1306.h. New
- code should NOT use this. Only the primary SPI bus is supported,
- and bitrate is fixed at 8 MHz.
- @param dc_pin
- Data/command pin (using Arduino pin numbering), selects whether
- display is receiving commands (low) or data (high).
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @param cs_pin
- Chip-select pin (using Arduino pin numbering) for sharing the
- bus with other devices. Active low.
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(int8_t dc_pin, int8_t rst_pin,
- int8_t cs_pin) : Renderer(SSD1306_LCDWIDTH, SSD1306_LCDHEIGHT),
- spi(&SPI), wire(NULL), xbuffer(NULL), mosiPin(-1), clkPin(-1),
- dcPin(dc_pin), csPin(cs_pin), rstPin(rst_pin) {
-#ifdef SPI_HAS_TRANSACTION
- spiSettings = SPISettings(8000000, MSBFIRST, SPI_MODE0);
-#endif
-}
-
-/*!
- @brief DEPRECATED constructor for I2C SSD1306 displays. Provided for
- older code to maintain compatibility with the current library.
- Screen size is determined by enabling one of the SSD1306_* size
- defines in Adafruit_SSD1306.h. New code should NOT use this.
- Only the primary I2C bus is supported.
- @param rst_pin
- Reset pin (using Arduino pin numbering), or -1 if not used
- (some displays might be wired to share the microcontroller's
- reset pin).
- @return Adafruit_SSD1306 object.
- @note Call the object's begin() function before use -- buffer
- allocation is performed there!
-*/
-Adafruit_SSD1306::Adafruit_SSD1306(int8_t rst_pin) :
- Renderer(SSD1306_LCDWIDTH, SSD1306_LCDHEIGHT), spi(NULL), wire(&Wire),
- xbuffer(NULL), mosiPin(-1), clkPin(-1), dcPin(-1), csPin(-1),
- rstPin(rst_pin) {
-}
-
-/*!
- @brief Destructor for Adafruit_SSD1306 object.
-*/
-Adafruit_SSD1306::~Adafruit_SSD1306(void) {
- if (framebuffer) {
- free (framebuffer);
- framebuffer = NULL;
- }
-}
-
-// LOW-LEVEL UTILS ---------------------------------------------------------
-
-// Issue single byte out SPI, either soft or hardware as appropriate.
-// SPI transaction/selection must be performed in calling function.
-inline void Adafruit_SSD1306::SPIwrite(uint8_t d) {
- if(spi) {
- (void)spi->transfer(d);
- } else {
- for(uint8_t bit = 0x80; bit; bit >>= 1) {
-#ifdef HAVE_PORTREG
- if(d & bit) *mosiPort |= mosiPinMask;
- else *mosiPort &= ~mosiPinMask;
- *clkPort |= clkPinMask; // Clock high
- *clkPort &= ~clkPinMask; // Clock low
-#else
- digitalWrite(mosiPin, d & bit);
- digitalWrite(clkPin , HIGH);
- digitalWrite(clkPin , LOW);
-#endif
- }
- }
-}
-
-// Issue single command to SSD1306, using I2C or hard/soft SPI as needed.
-// Because command calls are often grouped, SPI transaction and selection
-// must be started/ended in calling function for efficiency.
-// This is a private function, not exposed (see ssd1306_command() instead).
-void Adafruit_SSD1306::ssd1306_command1(uint8_t c) {
- if(wire) { // I2C
- wire->beginTransmission(i2caddr);
- WIRE_WRITE((uint8_t)0x00); // Co = 0, D/C = 0
- WIRE_WRITE(c);
- wire->endTransmission();
- } else { // SPI (hw or soft) -- transaction started in calling function
- SSD1306_MODE_COMMAND
- SPIwrite(c);
- }
-}
-
-// Issue list of commands to SSD1306, same rules as above re: transactions.
-// This is a private function, not exposed.
-void Adafruit_SSD1306::ssd1306_commandList(const uint8_t *c, uint8_t n) {
- if(wire) { // I2C
- wire->beginTransmission(i2caddr);
- WIRE_WRITE((uint8_t)0x00); // Co = 0, D/C = 0
- uint8_t bytesOut = 1;
- while(n--) {
- if(bytesOut >= WIRE_MAX) {
- wire->endTransmission();
- wire->beginTransmission(i2caddr);
- WIRE_WRITE((uint8_t)0x00); // Co = 0, D/C = 0
- bytesOut = 1;
- }
- WIRE_WRITE(pgm_read_byte(c++));
- bytesOut++;
- }
- wire->endTransmission();
- } else { // SPI -- transaction started in calling function
- SSD1306_MODE_COMMAND
- while(n--) SPIwrite(pgm_read_byte(c++));
- }
-}
-
-// A public version of ssd1306_command1(), for existing user code that
-// might rely on that function. This encapsulates the command transfer
-// in a transaction start/end, similar to old library's handling of it.
-/*!
- @brief Issue a single low-level command directly to the SSD1306
- display, bypassing the library.
- @param c
- Command to issue (0x00 to 0xFF, see datasheet).
- @return None (void).
-*/
-void Adafruit_SSD1306::ssd1306_command(uint8_t c) {
- TRANSACTION_START
- ssd1306_command1(c);
- TRANSACTION_END
-}
-
-// ALLOCATE & INIT DISPLAY -------------------------------------------------
-
-/*!
- @brief Allocate RAM for image buffer, initialize peripherals and pins.
- @param vcs
- VCC selection. Pass SSD1306_SWITCHCAPVCC to generate the display
- voltage (step up) from the 3.3V source, or SSD1306_EXTERNALVCC
- otherwise. Most situations with Adafruit SSD1306 breakouts will
- want SSD1306_SWITCHCAPVCC.
- @param addr
- I2C address of corresponding SSD1306 display (or pass 0 to use
- default of 0x3C for 128x32 display, 0x3D for all others).
- SPI displays (hardware or software) do not use addresses, but
- this argument is still required (pass 0 or any value really,
- it will simply be ignored). Default if unspecified is 0.
- @param reset
- If true, and if the reset pin passed to the constructor is
- valid, a hard reset will be performed before initializing the
- display. If using multiple SSD1306 displays on the same bus, and
- if they all share the same reset pin, you should only pass true
- on the first display being initialized, false on all others,
- else the already-initialized displays would be reset. Default if
- unspecified is true.
- @param periphBegin
- If true, and if a hardware peripheral is being used (I2C or SPI,
- but not software SPI), call that peripheral's begin() function,
- else (false) it has already been done in one's sketch code.
- Cases where false might be used include multiple displays or
- other devices sharing a common bus, or situations on some
- platforms where a nonstandard begin() function is available
- (e.g. a TwoWire interface on non-default pins, as can be done
- on the ESP8266 and perhaps others).
- @return true on successful allocation/init, false otherwise.
- Well-behaved code should check the return value before
- proceeding.
- @note MUST call this function before any drawing or updates!
-*/
-boolean Adafruit_SSD1306::begin(uint8_t vcs, uint8_t addr, boolean reset,
- boolean periphBegin) {
-
- framebuffer = (uint8_t *)malloc(WIDTH * ((HEIGHT + 7) / 8));
- if (!framebuffer) return false;
-
- clearDisplay();
-
- /*
- if(HEIGHT > 32) {
- drawBitmap((WIDTH - splash1_width) / 2, (HEIGHT - splash1_height) / 2,
- splash1_data, splash1_width, splash1_height, 1);
- } else {
- drawBitmap((WIDTH - splash2_width) / 2, (HEIGHT - splash2_height) / 2,
- splash2_data, splash2_width, splash2_height, 1);
- }
-*/
- vccstate = vcs;
-
- // Setup pin directions
- if(wire) { // Using I2C
- // If I2C address is unspecified, use default
- // (0x3C for 32-pixel-tall displays, 0x3D for all others).
- i2caddr = addr ? addr : ((HEIGHT == 32) ? 0x3C : 0x3D);
- // TwoWire begin() function might be already performed by the calling
- // function if it has unusual circumstances (e.g. TWI variants that
- // can accept different SDA/SCL pins, or if two SSD1306 instances
- // with different addresses -- only a single begin() is needed).
- if(periphBegin) wire->begin();
- } else { // Using one of the SPI modes, either soft or hardware
- pinMode(dcPin, OUTPUT); // Set data/command pin as output
- pinMode(csPin, OUTPUT); // Same for chip select
-#ifdef HAVE_PORTREG
- dcPort = (PortReg *)portOutputRegister(digitalPinToPort(dcPin));
- dcPinMask = digitalPinToBitMask(dcPin);
- csPort = (PortReg *)portOutputRegister(digitalPinToPort(csPin));
- csPinMask = digitalPinToBitMask(csPin);
-#endif
- SSD1306_DESELECT
- if(spi) { // Hardware SPI
- // SPI peripheral begin same as wire check above.
- if(periphBegin) spi->begin();
- } else { // Soft SPI
- pinMode(mosiPin, OUTPUT); // MOSI and SCLK outputs
- pinMode(clkPin , OUTPUT);
-#ifdef HAVE_PORTREG
- mosiPort = (PortReg *)portOutputRegister(digitalPinToPort(mosiPin));
- mosiPinMask = digitalPinToBitMask(mosiPin);
- clkPort = (PortReg *)portOutputRegister(digitalPinToPort(clkPin));
- clkPinMask = digitalPinToBitMask(clkPin);
- *clkPort &= ~clkPinMask; // Clock low
-#else
- digitalWrite(clkPin, LOW); // Clock low
-#endif
- }
- }
-
- // Reset SSD1306 if requested and reset pin specified in constructor
- if(reset && (rstPin >= 0)) {
- pinMode( rstPin, OUTPUT);
- digitalWrite(rstPin, HIGH);
- delay(1); // VDD goes high at start, pause for 1 ms
- digitalWrite(rstPin, LOW); // Bring reset low
- delay(10); // Wait 10 ms
- digitalWrite(rstPin, HIGH); // Bring out of reset
- }
-
- TRANSACTION_START
-
- // Init sequence
- static const uint8_t PROGMEM init1[] = {
- SSD1306_DISPLAYOFF, // 0xAE
- SSD1306_SETDISPLAYCLOCKDIV, // 0xD5
- 0x80, // the suggested ratio 0x80
- SSD1306_SETMULTIPLEX }; // 0xA8
- ssd1306_commandList(init1, sizeof(init1));
- ssd1306_command1(HEIGHT - 1);
-
- static const uint8_t PROGMEM init2[] = {
- SSD1306_SETDISPLAYOFFSET, // 0xD3
- 0x0, // no offset
- SSD1306_SETSTARTLINE | 0x0, // line #0
- SSD1306_CHARGEPUMP }; // 0x8D
- ssd1306_commandList(init2, sizeof(init2));
-
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x10 : 0x14);
-
- static const uint8_t PROGMEM init3[] = {
- SSD1306_MEMORYMODE, // 0x20
- 0x00, // 0x0 act like ks0108
- SSD1306_SEGREMAP | 0x1,
- SSD1306_COMSCANDEC };
- ssd1306_commandList(init3, sizeof(init3));
-
- if((WIDTH == 128) && (HEIGHT == 32)) {
- static const uint8_t PROGMEM init4a[] = {
- SSD1306_SETCOMPINS, // 0xDA
- 0x02,
- SSD1306_SETCONTRAST, // 0x81
- 0x8F };
- ssd1306_commandList(init4a, sizeof(init4a));
- } else if((WIDTH == 128) && (HEIGHT == 64)) {
- static const uint8_t PROGMEM init4b[] = {
- SSD1306_SETCOMPINS, // 0xDA
- 0x12,
- SSD1306_SETCONTRAST }; // 0x81
- ssd1306_commandList(init4b, sizeof(init4b));
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF);
- } else if((WIDTH == 96) && (HEIGHT == 16)) {
- static const uint8_t PROGMEM init4c[] = {
- SSD1306_SETCOMPINS, // 0xDA
- 0x2, // ada x12
- SSD1306_SETCONTRAST }; // 0x81
- ssd1306_commandList(init4c, sizeof(init4c));
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x10 : 0xAF);
- } else if((WIDTH == 64) && (HEIGHT == 48)) {
- static const uint8_t PROGMEM init4d[] = {
- SSD1306_SETCOMPINS, // 0xDA
- 0x12,
- SSD1306_SETCONTRAST }; // 0x81
- ssd1306_commandList(init4d, sizeof(init4d));
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF);
- } else if((WIDTH == 72) && (HEIGHT == 40)) {
- static const uint8_t PROGMEM init4d[] = {
- SSD1306_SETCOMPINS, // 0xDA
- 0x12,
- SSD1306_SETCONTRAST }; // 0x81
- ssd1306_commandList(init4d, sizeof(init4d));
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF);
- } else {
- // Other screen varieties -- TBD
- }
-
- ssd1306_command1(SSD1306_SETPRECHARGE); // 0xd9
- ssd1306_command1((vccstate == SSD1306_EXTERNALVCC) ? 0x22 : 0xF1);
- static const uint8_t PROGMEM init5[] = {
- SSD1306_SETVCOMDETECT, // 0xDB
- 0x40,
- SSD1306_DISPLAYALLON_RESUME, // 0xA4
- SSD1306_NORMALDISPLAY, // 0xA6
- SSD1306_DEACTIVATE_SCROLL,
- SSD1306_DISPLAYON }; // Main screen turn on
- ssd1306_commandList(init5, sizeof(init5));
-
- TRANSACTION_END
-
- return true; // Success
-}
-
-
-void Adafruit_SSD1306::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
-// ignore update mode
- //if (p==DISPLAY_INIT_MODE) {
- setRotation(rot);
- invertDisplay(false);
- setTextWrap(false); // Allow text to run off edges
- cp437(true);
- setTextFont(font);
- setTextSize(size);
- setTextColor(WHITE,BLACK);
- setCursor(0,0);
- fillScreen(BLACK);
- Updateframe();
-
- disp_bpp = -1;
- //}
-}
-
-#if 0
-
-// DRAWING FUNCTIONS -------------------------------------------------------
-
-/*!
- @brief Set/clear/invert a single pixel. This is also invoked by the
- Adafruit_GFX library in generating many higher-level graphics
- primitives.
- @param x
- Column of display -- 0 at left to (screen width - 1) at right.
- @param y
- Row of display -- 0 at top to (screen height -1) at bottom.
- @param color
- Pixel color, one of: BLACK, WHITE or INVERT.
- @return None (void).
- @note Changes buffer contents only, no immediate effect on display.
- Follow up with a call to display(), or with other graphics
- commands as needed by one's own application.
-*/
-void Adafruit_SSD1306::drawPixel(int16_t x, int16_t y, uint16_t color) {
-
- if (!framebuffer) return;
-
-
- if((x >= 0) && (x < width()) && (y >= 0) && (y < height())) {
- // Pixel is in-bounds. Rotate coordinates if needed.
- switch(getRotation()) {
- case 1:
- ssd1306_swap(x, y);
- x = WIDTH - x - 1;
- break;
- case 2:
- x = WIDTH - x - 1;
- y = HEIGHT - y - 1;
- break;
- case 3:
- ssd1306_swap(x, y);
- y = HEIGHT - y - 1;
- break;
- }
- switch(color) {
- case WHITE: framebuffer[x + (y/8)*WIDTH] |= (1 << (y&7)); break;
- case BLACK: framebuffer[x + (y/8)*WIDTH] &= ~(1 << (y&7)); break;
- case INVERSE: framebuffer[x + (y/8)*WIDTH] ^= (1 << (y&7)); break;
- }
- }
-}
-
-/*!
- @brief Clear contents of display buffer (set all pixels to off).
- @return None (void).
- @note Changes buffer contents only, no immediate effect on display.
- Follow up with a call to display(), or with other graphics
- commands as needed by one's own application.
-*/
-void Adafruit_SSD1306::clearDisplay(void) {
- if (!framebuffer) return;
- memset(framebuffer, 0, WIDTH * ((HEIGHT + 7) / 8));
-}
-
-/*!
- @brief Draw a horizontal line. This is also invoked by the Adafruit_GFX
- library in generating many higher-level graphics primitives.
- @param x
- Leftmost column -- 0 at left to (screen width - 1) at right.
- @param y
- Row of display -- 0 at top to (screen height -1) at bottom.
- @param w
- Width of line, in pixels.
- @param color
- Line color, one of: BLACK, WHITE or INVERT.
- @return None (void).
- @note Changes buffer contents only, no immediate effect on display.
- Follow up with a call to display(), or with other graphics
- commands as needed by one's own application.
-*/
-void Adafruit_SSD1306::drawFastHLine(
- int16_t x, int16_t y, int16_t w, uint16_t color) {
- boolean bSwap = false;
- switch(rotation) {
- case 1:
- // 90 degree rotation, swap x & y for rotation, then invert x
- bSwap = true;
- ssd1306_swap(x, y);
- x = WIDTH - x - 1;
- break;
- case 2:
- // 180 degree rotation, invert x and y, then shift y around for height.
- x = WIDTH - x - 1;
- y = HEIGHT - y - 1;
- x -= (w-1);
- break;
- case 3:
- // 270 degree rotation, swap x & y for rotation,
- // then invert y and adjust y for w (not to become h)
- bSwap = true;
- ssd1306_swap(x, y);
- y = HEIGHT - y - 1;
- y -= (w-1);
- break;
- }
-
- if(bSwap) drawFastVLineInternal(x, y, w, color);
- else drawFastHLineInternal(x, y, w, color);
-}
-
-
-
-/*!
- @brief Draw a vertical line. This is also invoked by the Adafruit_GFX
- library in generating many higher-level graphics primitives.
- @param x
- Column of display -- 0 at left to (screen width -1) at right.
- @param y
- Topmost row -- 0 at top to (screen height - 1) at bottom.
- @param h
- Height of line, in pixels.
- @param color
- Line color, one of: BLACK, WHITE or INVERT.
- @return None (void).
- @note Changes buffer contents only, no immediate effect on display.
- Follow up with a call to display(), or with other graphics
- commands as needed by one's own application.
-*/
-void Adafruit_SSD1306::drawFastVLine(
- int16_t x, int16_t y, int16_t h, uint16_t color) {
- boolean bSwap = false;
- switch(rotation) {
- case 1:
- // 90 degree rotation, swap x & y for rotation,
- // then invert x and adjust x for h (now to become w)
- bSwap = true;
- ssd1306_swap(x, y);
- x = WIDTH - x - 1;
- x -= (h-1);
- break;
- case 2:
- // 180 degree rotation, invert x and y, then shift y around for height.
- x = WIDTH - x - 1;
- y = HEIGHT - y - 1;
- y -= (h-1);
- break;
- case 3:
- // 270 degree rotation, swap x & y for rotation, then invert y
- bSwap = true;
- ssd1306_swap(x, y);
- y = HEIGHT - y - 1;
- break;
- }
-
- if(bSwap) drawFastHLineInternal(x, y, h, color);
- else drawFastVLineInternal(x, y, h, color);
-}
-#endif
-
-void Adafruit_SSD1306::drawFastHLineInternal (
- int16_t x, int16_t y, int16_t w, uint16_t color) {
- if (!framebuffer) return;
- if((y >= 0) && (y < HEIGHT)) { // Y coord in bounds?
- if(x < 0) { // Clip left
- w += x;
- x = 0;
- }
- if((x + w) > WIDTH) { // Clip right
- w = (WIDTH - x);
- }
- if(w > 0) { // Proceed only if width is positive
- uint8_t *pBuf = &framebuffer[(y / 8) * WIDTH + x],
- mask = 1 << (y & 7);
- switch(color) {
- case WHITE: while(w--) { *pBuf++ |= mask; }; break;
- case BLACK: mask = ~mask; while(w--) { *pBuf++ &= mask; }; break;
- case INVERSE: while(w--) { *pBuf++ ^= mask; }; break;
- }
- }
- }
-}
-
-void Adafruit_SSD1306::drawFastVLineInternal(
- int16_t x, int16_t __y, int16_t __h, uint16_t color) {
-if (!framebuffer) return;
- if((x >= 0) && (x < WIDTH)) { // X coord in bounds?
- if(__y < 0) { // Clip top
- __h += __y;
- __y = 0;
- }
- if((__y + __h) > HEIGHT) { // Clip bottom
- __h = (HEIGHT - __y);
- }
- if(__h > 0) { // Proceed only if height is now positive
- // this display doesn't need ints for coordinates,
- // use local byte registers for faster juggling
- uint8_t y = __y, h = __h;
- uint8_t *pBuf = &framebuffer[(y / 8) * WIDTH + x];
-
- // do the first partial byte, if necessary - this requires some masking
- uint8_t mod = (y & 7);
- if(mod) {
- // mask off the high n bits we want to set
- mod = 8 - mod;
- // note - lookup table results in a nearly 10% performance
- // improvement in fill* functions
- // uint8_t mask = ~(0xFF >> mod);
- static const uint8_t PROGMEM premask[8] =
- { 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE };
- uint8_t mask = pgm_read_byte(&premask[mod]);
- // adjust the mask if we're not going to reach the end of this byte
- if(h < mod) mask &= (0XFF >> (mod - h));
-
- switch(color) {
- case WHITE: *pBuf |= mask; break;
- case BLACK: *pBuf &= ~mask; break;
- case INVERSE: *pBuf ^= mask; break;
- }
- pBuf += WIDTH;
- }
-
- if(h >= mod) { // More to go?
- h -= mod;
- // Write solid bytes while we can - effectively 8 rows at a time
- if(h >= 8) {
- if(color == INVERSE) {
- // separate copy of the code so we don't impact performance of
- // black/white write version with an extra comparison per loop
- do {
- *pBuf ^= 0xFF; // Invert byte
- pBuf += WIDTH; // Advance pointer 8 rows
- h -= 8; // Subtract 8 rows from height
- } while(h >= 8);
- } else {
- // store a local value to work with
- uint8_t val = (color != BLACK) ? 255 : 0;
- do {
- *pBuf = val; // Set byte
- pBuf += WIDTH; // Advance pointer 8 rows
- h -= 8; // Subtract 8 rows from height
- } while(h >= 8);
- }
- }
-
- if(h) { // Do the final partial byte, if necessary
- mod = h & 7;
- // this time we want to mask the low bits of the byte,
- // vs the high bits we did above
- // uint8_t mask = (1 << mod) - 1;
- // note - lookup table results in a nearly 10% performance
- // improvement in fill* functions
- static const uint8_t PROGMEM postmask[8] =
- { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F };
- uint8_t mask = pgm_read_byte(&postmask[mod]);
- switch(color) {
- case WHITE: *pBuf |= mask; break;
- case BLACK: *pBuf &= ~mask; break;
- case INVERSE: *pBuf ^= mask; break;
- }
- }
- }
- } // endif positive height
- } // endif x in bounds
-}
-
-/*!
- @brief Return color of a single pixel in display buffer.
- @param x
- Column of display -- 0 at left to (screen width - 1) at right.
- @param y
- Row of display -- 0 at top to (screen height -1) at bottom.
- @return true if pixel is set (usually WHITE, unless display invert mode
- is enabled), false if clear (BLACK).
- @note Reads from buffer contents; may not reflect current contents of
- screen if display() has not been called.
-*/
-boolean Adafruit_SSD1306::getPixel(int16_t x, int16_t y) {
- if (!framebuffer) return 0;
-
- if((x >= 0) && (x < width()) && (y >= 0) && (y < height())) {
- // Pixel is in-bounds. Rotate coordinates if needed.
- switch(getRotation()) {
- case 1:
- ssd1306_swap(x, y);
- x = WIDTH - x - 1;
- break;
- case 2:
- x = WIDTH - x - 1;
- y = HEIGHT - y - 1;
- break;
- case 3:
- ssd1306_swap(x, y);
- y = HEIGHT - y - 1;
- break;
- }
- return (framebuffer[x + (y / 8) * WIDTH] & (1 << (y & 7)));
- }
- return false; // Pixel out of bounds
-}
-
-/*!
- @brief Get base address of display buffer for direct reading or writing.
- @return Pointer to an unsigned 8-bit array, column-major, columns padded
- to full byte boundary if needed.
-*/
-uint8_t *Adafruit_SSD1306::getBuffer(void) {
- return framebuffer;
-}
-
-
-// REFRESH DISPLAY ---------------------------------------------------------
-
-/*!
- @brief Push data currently in RAM to SSD1306 display.
- @return None (void).
- @note Drawing operations are not visible until this function is
- called. Call after each graphics command, or after a whole set
- of graphics commands, as best needed by one's own application.
-*/
-void Adafruit_SSD1306::display(void) {
- if (!framebuffer) return;
- int16_t col_start = 0;
- int16_t col_end = WIDTH - 1;
- if ((64 == WIDTH) && (48 == HEIGHT)) { // for 64x48, we need to shift by 32 in both directions
- col_start += 32;
- col_end += 32;
- } else if ((72 == WIDTH) && (40 == HEIGHT)) { // for 72x40, we need to shift by 27 in both directions
- col_start += 27;
- col_end += 27;
- }
-
- TRANSACTION_START
- static const uint8_t PROGMEM dlist1[] = {
- SSD1306_PAGEADDR,
- 0, // Page start address
- 0xFF, // Page end (not really, but works here)
- SSD1306_COLUMNADDR };
- ssd1306_commandList(dlist1, sizeof(dlist1));
- ssd1306_command1(col_start); // Column start address
- ssd1306_command1(col_end); // Column end address
-
-#if defined(ESP8266)
- // ESP8266 needs a periodic yield() call to avoid watchdog reset.
- // With the limited size of SSD1306 displays, and the fast bitrate
- // being used (1 MHz or more), I think one yield() immediately before
- // a screen write and one immediately after should cover it. But if
- // not, if this becomes a problem, yields() might be added in the
- // 32-byte transfer condition below.
- yield();
-#endif
- uint16_t count = WIDTH * ((HEIGHT + 7) / 8);
- uint8_t *ptr = framebuffer;
- if(wire) { // I2C
- wire->beginTransmission(i2caddr);
- WIRE_WRITE((uint8_t)0x40);
- uint8_t bytesOut = 1;
- while(count--) {
- if(bytesOut >= WIRE_MAX) {
- wire->endTransmission();
- wire->beginTransmission(i2caddr);
- WIRE_WRITE((uint8_t)0x40);
- bytesOut = 1;
- }
- WIRE_WRITE(*ptr++);
- bytesOut++;
- }
- wire->endTransmission();
- } else { // SPI
- SSD1306_MODE_DATA
- while(count--) SPIwrite(*ptr++);
- }
- TRANSACTION_END
-#if defined(ESP8266)
- yield();
-#endif
-}
-
-// SCROLLING FUNCTIONS -----------------------------------------------------
-
-/*!
- @brief Activate a right-handed scroll for all or part of the display.
- @param start
- First row.
- @param stop
- Last row.
- @return None (void).
-*/
-// To scroll the whole display, run: display.startscrollright(0x00, 0x0F)
-void Adafruit_SSD1306::startscrollright(uint8_t start, uint8_t stop) {
- TRANSACTION_START
- static const uint8_t PROGMEM scrollList1a[] = {
- SSD1306_RIGHT_HORIZONTAL_SCROLL,
- 0X00 };
- ssd1306_commandList(scrollList1a, sizeof(scrollList1a));
- ssd1306_command1(start);
- ssd1306_command1(0X00);
- ssd1306_command1(stop);
- static const uint8_t PROGMEM scrollList1b[] = {
- 0X00,
- 0XFF,
- SSD1306_ACTIVATE_SCROLL };
- ssd1306_commandList(scrollList1b, sizeof(scrollList1b));
- TRANSACTION_END
-}
-
-/*!
- @brief Activate a left-handed scroll for all or part of the display.
- @param start
- First row.
- @param stop
- Last row.
- @return None (void).
-*/
-// To scroll the whole display, run: display.startscrollleft(0x00, 0x0F)
-void Adafruit_SSD1306::startscrollleft(uint8_t start, uint8_t stop) {
- TRANSACTION_START
- static const uint8_t PROGMEM scrollList2a[] = {
- SSD1306_LEFT_HORIZONTAL_SCROLL,
- 0X00 };
- ssd1306_commandList(scrollList2a, sizeof(scrollList2a));
- ssd1306_command1(start);
- ssd1306_command1(0X00);
- ssd1306_command1(stop);
- static const uint8_t PROGMEM scrollList2b[] = {
- 0X00,
- 0XFF,
- SSD1306_ACTIVATE_SCROLL };
- ssd1306_commandList(scrollList2b, sizeof(scrollList2b));
- TRANSACTION_END
-}
-
-/*!
- @brief Activate a diagonal scroll for all or part of the display.
- @param start
- First row.
- @param stop
- Last row.
- @return None (void).
-*/
-// display.startscrolldiagright(0x00, 0x0F)
-void Adafruit_SSD1306::startscrolldiagright(uint8_t start, uint8_t stop) {
- TRANSACTION_START
- static const uint8_t PROGMEM scrollList3a[] = {
- SSD1306_SET_VERTICAL_SCROLL_AREA,
- 0X00 };
- ssd1306_commandList(scrollList3a, sizeof(scrollList3a));
- ssd1306_command1(HEIGHT);
- static const uint8_t PROGMEM scrollList3b[] = {
- SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL,
- 0X00 };
- ssd1306_commandList(scrollList3b, sizeof(scrollList3b));
- ssd1306_command1(start);
- ssd1306_command1(0X00);
- ssd1306_command1(stop);
- static const uint8_t PROGMEM scrollList3c[] = {
- 0X01,
- SSD1306_ACTIVATE_SCROLL };
- ssd1306_commandList(scrollList3c, sizeof(scrollList3c));
- TRANSACTION_END
-}
-
-/*!
- @brief Activate alternate diagonal scroll for all or part of the display.
- @param start
- First row.
- @param stop
- Last row.
- @return None (void).
-*/
-// To scroll the whole display, run: display.startscrolldiagleft(0x00, 0x0F)
-void Adafruit_SSD1306::startscrolldiagleft(uint8_t start, uint8_t stop) {
- TRANSACTION_START
- static const uint8_t PROGMEM scrollList4a[] = {
- SSD1306_SET_VERTICAL_SCROLL_AREA,
- 0X00 };
- ssd1306_commandList(scrollList4a, sizeof(scrollList4a));
- ssd1306_command1(HEIGHT);
- static const uint8_t PROGMEM scrollList4b[] = {
- SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL,
- 0X00 };
- ssd1306_commandList(scrollList4b, sizeof(scrollList4b));
- ssd1306_command1(start);
- ssd1306_command1(0X00);
- ssd1306_command1(stop);
- static const uint8_t PROGMEM scrollList4c[] = {
- 0X01,
- SSD1306_ACTIVATE_SCROLL };
- ssd1306_commandList(scrollList4c, sizeof(scrollList4c));
- TRANSACTION_END
-}
-
-/*!
- @brief Cease a previously-begun scrolling action.
- @return None (void).
-*/
-void Adafruit_SSD1306::stopscroll(void) {
- TRANSACTION_START
- ssd1306_command1(SSD1306_DEACTIVATE_SCROLL);
- TRANSACTION_END
-}
-
-// OTHER HARDWARE SETTINGS -------------------------------------------------
-
-/*!
- @brief Enable or disable display invert mode (white-on-black vs
- black-on-white).
- @param i
- If true, switch to invert mode (black-on-white), else normal
- mode (white-on-black).
- @return None (void).
- @note This has an immediate effect on the display, no need to call the
- display() function -- buffer contents are not changed, rather a
- different pixel mode of the display hardware is used. When
- enabled, drawing BLACK (value 0) pixels will actually draw white,
- WHITE (value 1) will draw black.
-*/
-void Adafruit_SSD1306::invertDisplay(boolean i) {
- TRANSACTION_START
- ssd1306_command1(i ? SSD1306_INVERTDISPLAY : SSD1306_NORMALDISPLAY);
- TRANSACTION_END
-}
-
-/*!
- @brief Dim the display.
- @param dim
- true to enable lower brightness mode, false for full brightness.
- @return None (void).
- @note This has an immediate effect on the display, no need to call the
- display() function -- buffer contents are not changed.
-*/
-void Adafruit_SSD1306::dim(boolean dim) {
- uint8_t contrast;
-
- if(dim) {
- contrast = 0; // Dimmed display
- } else {
- contrast = (vccstate == SSD1306_EXTERNALVCC) ? 0x9F : 0xCF;
- }
- // the range of contrast to too small to be really useful
- // it is useful to dim the display
- TRANSACTION_START
- ssd1306_command1(SSD1306_SETCONTRAST);
- ssd1306_command1(contrast);
- TRANSACTION_END
-}
-
-void Adafruit_SSD1306::DisplayOnff(int8_t on) {
- TRANSACTION_START
- if(on) {
- ssd1306_command1(SSD1306_DISPLAYON);
- } else {
- ssd1306_command1(SSD1306_DISPLAYOFF);
- }
- TRANSACTION_END
-}
-
-void Adafruit_SSD1306::Updateframe(void) {
- display();
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.h b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.h
deleted file mode 100644
index 5be5441995bb..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/Adafruit_SSD1306.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*!
- * @file Adafruit_SSD1306.h
- *
- * This is part of for Adafruit's SSD1306 library for monochrome
- * OLED displays: http://www.adafruit.com/category/63_98
- *
- * These displays use I2C or SPI to communicate. I2C requires 2 pins
- * (SCL+SDA) and optionally a RESET pin. SPI requires 4 pins (MOSI, SCK,
- * select, data/command) and optionally a reset pin. Hardware SPI or
- * 'bitbang' software SPI are both supported.
- *
- * Adafruit invests time and resources providing this open source code,
- * please support Adafruit and open-source hardware by purchasing
- * products from Adafruit!
- *
- * Written by Limor Fried/Ladyada for Adafruit Industries, with
- * contributions from the open source community.
- *
- * BSD license, all text above, and the splash screen header file,
- * must be included in any redistribution.
- *
- */
-
-#ifndef _Adafruit_SSD1306_H_
-#define _Adafruit_SSD1306_H_
-
-#include
-
-extern uint8_t *buffer;
-
-// ONE of the following three lines must be #defined:
-//#define SSD1306_128_64 ///< DEPRECTAED: old way to specify 128x64 screen
-#define SSD1306_128_32 ///< DEPRECATED: old way to specify 128x32 screen
-//#define SSD1306_96_16 ///< DEPRECATED: old way to specify 96x16 screen
-// This establishes the screen dimensions in old Adafruit_SSD1306 sketches
-// (NEW CODE SHOULD IGNORE THIS, USE THE CONSTRUCTORS THAT ACCEPT WIDTH
-// AND HEIGHT ARGUMENTS).
-
-#if defined(ARDUINO_STM32_FEATHER)
- typedef class HardwareSPI SPIClass;
-#endif
-
-#include
-#include
-#include
-
-#if defined(__AVR__)
- typedef volatile uint8_t PortReg;
- typedef uint8_t PortMask;
- #define HAVE_PORTREG
-#elif defined(__SAM3X8E__)
- typedef volatile RwReg PortReg;
- typedef uint32_t PortMask;
- #define HAVE_PORTREG
-#elif defined(__arm__) || defined(ARDUINO_FEATHER52)
- typedef volatile uint32_t PortReg;
- typedef uint32_t PortMask;
- #define HAVE_PORTREG
-#endif
-
-#define BLACK 0 ///< Draw 'off' pixels
-#define WHITE 1 ///< Draw 'on' pixels
-#define INVERSE 2 ///< Invert pixels
-
-#define SSD1306_MEMORYMODE 0x20 ///< See datasheet
-#define SSD1306_COLUMNADDR 0x21 ///< See datasheet
-#define SSD1306_PAGEADDR 0x22 ///< See datasheet
-#define SSD1306_SETCONTRAST 0x81 ///< See datasheet
-#define SSD1306_CHARGEPUMP 0x8D ///< See datasheet
-#define SSD1306_SEGREMAP 0xA0 ///< See datasheet
-#define SSD1306_DISPLAYALLON_RESUME 0xA4 ///< See datasheet
-#define SSD1306_DISPLAYALLON 0xA5 ///< Not currently used
-#define SSD1306_NORMALDISPLAY 0xA6 ///< See datasheet
-#define SSD1306_INVERTDISPLAY 0xA7 ///< See datasheet
-#define SSD1306_SETMULTIPLEX 0xA8 ///< See datasheet
-#define SSD1306_DISPLAYOFF 0xAE ///< See datasheet
-#define SSD1306_DISPLAYON 0xAF ///< See datasheet
-#define SSD1306_COMSCANINC 0xC0 ///< Not currently used
-#define SSD1306_COMSCANDEC 0xC8 ///< See datasheet
-#define SSD1306_SETDISPLAYOFFSET 0xD3 ///< See datasheet
-#define SSD1306_SETDISPLAYCLOCKDIV 0xD5 ///< See datasheet
-#define SSD1306_SETPRECHARGE 0xD9 ///< See datasheet
-#define SSD1306_SETCOMPINS 0xDA ///< See datasheet
-#define SSD1306_SETVCOMDETECT 0xDB ///< See datasheet
-
-#define SSD1306_SETLOWCOLUMN 0x00 ///< Not currently used
-#define SSD1306_SETHIGHCOLUMN 0x10 ///< Not currently used
-#define SSD1306_SETSTARTLINE 0x40 ///< See datasheet
-
-#define SSD1306_EXTERNALVCC 0x01 ///< External display voltage source
-#define SSD1306_SWITCHCAPVCC 0x02 ///< Gen. display voltage from 3.3V
-
-#define SSD1306_RIGHT_HORIZONTAL_SCROLL 0x26 ///< Init rt scroll
-#define SSD1306_LEFT_HORIZONTAL_SCROLL 0x27 ///< Init left scroll
-#define SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL 0x29 ///< Init diag scroll
-#define SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL 0x2A ///< Init diag scroll
-#define SSD1306_DEACTIVATE_SCROLL 0x2E ///< Stop scroll
-#define SSD1306_ACTIVATE_SCROLL 0x2F ///< Start scroll
-#define SSD1306_SET_VERTICAL_SCROLL_AREA 0xA3 ///< Set scroll range
-
-// Deprecated size stuff for backwards compatibility with old sketches
-#if defined SSD1306_128_64
- #define SSD1306_LCDWIDTH 128 ///< DEPRECATED: width w/SSD1306_128_64 defined
- #define SSD1306_LCDHEIGHT 64 ///< DEPRECATED: height w/SSD1306_128_64 defined
-#endif
-#if defined SSD1306_128_32
- #define SSD1306_LCDWIDTH 128 ///< DEPRECATED: width w/SSD1306_128_32 defined
- #define SSD1306_LCDHEIGHT 32 ///< DEPRECATED: height w/SSD1306_128_32 defined
-#endif
-#if defined SSD1306_96_16
- #define SSD1306_LCDWIDTH 96 ///< DEPRECATED: width w/SSD1306_96_16 defined
- #define SSD1306_LCDHEIGHT 16 ///< DEPRECATED: height w/SSD1306_96_16 defined
-#endif
-
-/*!
- @brief Class that stores state and functions for interacting with
- SSD1306 OLED displays.
-*/
-class Adafruit_SSD1306 : public Renderer {
-public:
- // NEW CONSTRUCTORS -- recommended for new projects
- Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi=&Wire, int8_t rst_pin=-1,
- uint32_t clkDuring=400000UL, uint32_t clkAfter=100000UL);
- Adafruit_SSD1306(uint8_t w, uint8_t h, int8_t mosi_pin, int8_t sclk_pin,
- int8_t dc_pin, int8_t rst_pin, int8_t cs_pin);
- Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi,
- int8_t dc_pin, int8_t rst_pin, int8_t cs_pin, uint32_t bitrate=8000000UL);
-
- // DEPRECATED CONSTRUCTORS - for back compatibility, avoid in new projects
- Adafruit_SSD1306(int8_t mosi_pin, int8_t sclk_pin, int8_t dc_pin,
- int8_t rst_pin, int8_t cs_pin);
- Adafruit_SSD1306(int8_t dc_pin, int8_t rst_pin, int8_t cs_pin);
- Adafruit_SSD1306(int8_t rst_pin = -1);
-
- ~Adafruit_SSD1306(void);
-
- boolean begin(uint8_t switchvcc=SSD1306_SWITCHCAPVCC,
- uint8_t i2caddr=0, boolean reset=true,
- boolean periphBegin=true);
- void display(void);
- void invertDisplay(boolean i);
- void dim(boolean dim);
- void DisplayOnff(int8_t on);
- void DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font);
-
- #if 0
- void clearDisplay(void);
- void drawPixel(int16_t x, int16_t y, uint16_t color);
- virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
- virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
- #endif
- void startscrollright(uint8_t start, uint8_t stop);
- void startscrollleft(uint8_t start, uint8_t stop);
- void startscrolldiagright(uint8_t start, uint8_t stop);
- void startscrolldiagleft(uint8_t start, uint8_t stop);
- void stopscroll(void);
- void ssd1306_command(uint8_t c);
- boolean getPixel(int16_t x, int16_t y);
- uint8_t *getBuffer(void);
- void Updateframe(void);
-
- private:
- inline void SPIwrite(uint8_t d) __attribute__((always_inline));
- void drawFastHLineInternal(int16_t x, int16_t y, int16_t w,
- uint16_t color);
- void drawFastVLineInternal(int16_t x, int16_t y, int16_t h,
- uint16_t color);
- void ssd1306_command1(uint8_t c);
- void ssd1306_commandList(const uint8_t *c, uint8_t n);
-
- SPIClass *spi;
- TwoWire *wire;
- uint8_t *xbuffer;
- int8_t i2caddr, vccstate, page_end;
- int8_t mosiPin , clkPin , dcPin , csPin, rstPin;
-#ifdef HAVE_PORTREG
- PortReg *mosiPort , *clkPort , *dcPort , *csPort;
- PortMask mosiPinMask, clkPinMask, dcPinMask, csPinMask;
-#endif
-#if defined(SPI_HAS_TRANSACTION)
- SPISettings spiSettings;
-#endif
-#if ARDUINO >= 157
- uint32_t wireClk; // Wire speed for SSD1306 transfers
- uint32_t restoreClk; // Wire speed following SSD1306 transfers
-#endif
-};
-
-#endif // _Adafruit_SSD1306_H_
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/README.md b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/README.md
deleted file mode 100644
index f2e01ad4bd5e..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Adafruit_SSD1306 [](https://travis-ci.org/adafruit/Adafruit_SSD1306)
-
-This is a library for our Monochrome OLEDs based on SSD1306 drivers
-
- Pick one up today in the adafruit shop!
- ------> http://www.adafruit.com/category/63_98
-
-These displays use I2C or SPI to communicate, 2 to 5 pins are required to interface.
-
-Adafruit invests time and resources providing this open source code,
-please support Adafruit and open-source hardware by purchasing
-products from Adafruit!
-
-Written by Limor Fried/Ladyada for Adafruit Industries, with contributions from the open source community. Scrolling code contributed by Michael Gregg. Dynamic buffer allocation based on work by Andrew Canaday.
-BSD license, check license.txt for more information. All text above must be included in any redistribution
-
-Preferred installation method is to use the Arduino IDE Library Manager. To download the source from Github instead, click "Clone or download" above, then "Download ZIP." After uncompressing, rename the resulting folder Adafruit_SSD1306. Check that the Adafruit_SSD1306 folder contains Adafruit_SSD1306.cpp and Adafruit_SSD1306.h.
-
-You will also have to install the **Adafruit GFX library** which provides graphics primitves such as lines, circles, text, etc. This also can be found in the Arduino Library Manager, or you can get the source from https://github.com/adafruit/Adafruit-GFX-Library
-
-## Changes
-
-Version 1.2 (November 2018) introduces some significant changes:
-
- * Display dimensions are now specified in the constructor...you no longer need to edit the .h file for different screens (though old sketches can continue to work that way).
- * SPI transactions are used and SPI bitrate can be specified (both require Arduino 1.6 or later).
- * SPI and Wire (I2C) interfaces other than the defaults are supported.
-
-
-
-## Compatibility
-
-MCU |Tested Works|Doesn't Work|Not Tested|Notes
-------------|:----------:|:----------:|:--------:|-----
-Atmega328 | X | | |
-Atmega32u4 | X | | |
-Atmega2560 | X | | |
-ESP8266 | X | | | Change OLED_RESET to different pin if using default I2C pins D4/D5.
-ESP32 | X | | |
-ATSAM3X8E | X | | |
-ATSAM21D | X | | |
-Intel Curie | X | | |
-WICED | X | | | No hardware SPI - bitbang only
-ATtiny85 | | X | |
-
- * ATmega328 : Arduino UNO, Adafruit Pro Trinket, Adafruit Metro 328, Adafruit Metro Mini
- * ATmega32u4 : Arduino Leonardo, Arduino Micro, Arduino Yun, Teensy 2.0, Adafruit Flora, Bluefruit Micro
- * ATmega2560 : Arduino Mega
- * ESP8266 : Adafruit Huzzah
- * ATSAM3X8E : Arduino Due
- * ATSAM21D : Arduino Zero, M0 Pro, Adafruit Metro Express, Feather M0
- * ATtiny85 : Adafruit Gemma, Arduino Gemma, Adafruit Trinket
-
-
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/OLED_featherwing/OLED_featherwing.ino b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/OLED_featherwing/OLED_featherwing.ino
deleted file mode 100644
index 2d0d246465eb..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/OLED_featherwing/OLED_featherwing.ino
+++ /dev/null
@@ -1,79 +0,0 @@
-#include
-#include
-#include
-#include
-
-Adafruit_SSD1306 display = Adafruit_SSD1306(128, 32, &Wire);
-
-// OLED FeatherWing buttons map to different pins depending on board:
-#if defined(ESP8266)
- #define BUTTON_A 0
- #define BUTTON_B 16
- #define BUTTON_C 2
-#elif defined(ESP32)
- #define BUTTON_A 15
- #define BUTTON_B 32
- #define BUTTON_C 14
-#elif defined(ARDUINO_STM32_FEATHER)
- #define BUTTON_A PA15
- #define BUTTON_B PC7
- #define BUTTON_C PC5
-#elif defined(TEENSYDUINO)
- #define BUTTON_A 4
- #define BUTTON_B 3
- #define BUTTON_C 8
-#elif defined(ARDUINO_FEATHER52832)
- #define BUTTON_A 31
- #define BUTTON_B 30
- #define BUTTON_C 27
-#else // 32u4, M0, M4, nrf52840 and 328p
- #define BUTTON_A 9
- #define BUTTON_B 6
- #define BUTTON_C 5
-#endif
-
-void setup() {
- Serial.begin(9600);
-
- Serial.println("OLED FeatherWing test");
- // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
- display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x32
-
- Serial.println("OLED begun");
-
- // Show image buffer on the display hardware.
- // Since the buffer is intialized with an Adafruit splashscreen
- // internally, this will display the splashscreen.
- display.display();
- delay(1000);
-
- // Clear the buffer.
- display.clearDisplay();
- display.display();
-
- Serial.println("IO test");
-
- pinMode(BUTTON_A, INPUT_PULLUP);
- pinMode(BUTTON_B, INPUT_PULLUP);
- pinMode(BUTTON_C, INPUT_PULLUP);
-
- // text display tests
- display.setTextSize(1);
- display.setTextColor(WHITE);
- display.setCursor(0,0);
- display.print("Connecting to SSID\n'adafruit':");
- display.print("connected!");
- display.println("IP: 10.0.1.23");
- display.println("Sending val #0");
- display.setCursor(0,0);
- display.display(); // actually display all of the above
-}
-
-void loop() {
- if(!digitalRead(BUTTON_A)) display.print("A");
- if(!digitalRead(BUTTON_B)) display.print("B");
- if(!digitalRead(BUTTON_C)) display.print("C");
- delay(10);
- yield();
- display.display();
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_i2c/ssd1306_128x32_i2c.ino b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_i2c/ssd1306_128x32_i2c.ino
deleted file mode 100644
index 68bfee354b7d..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_i2c/ssd1306_128x32_i2c.ino
+++ /dev/null
@@ -1,410 +0,0 @@
-/**************************************************************************
- This is an example for our Monochrome OLEDs based on SSD1306 drivers
-
- Pick one up today in the adafruit shop!
- ------> http://www.adafruit.com/category/63_98
-
- This example is for a 128x32 pixel display using I2C to communicate
- 3 pins are required to interface (two I2C and one reset).
-
- Adafruit invests time and resources providing this open
- source code, please support Adafruit and open-source
- hardware by purchasing products from Adafruit!
-
- Written by Limor Fried/Ladyada for Adafruit Industries,
- with contributions from the open source community.
- BSD license, check license.txt for more information
- All text above, and the splash screen below must be
- included in any redistribution.
- **************************************************************************/
-
-#include
-#include
-#include
-#include
-
-#define SCREEN_WIDTH 128 // OLED display width, in pixels
-#define SCREEN_HEIGHT 32 // OLED display height, in pixels
-
-// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
-#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
-
-#define NUMFLAKES 10 // Number of snowflakes in the animation example
-
-#define LOGO_HEIGHT 16
-#define LOGO_WIDTH 16
-static const unsigned char PROGMEM logo_bmp[] =
-{ B00000000, B11000000,
- B00000001, B11000000,
- B00000001, B11000000,
- B00000011, B11100000,
- B11110011, B11100000,
- B11111110, B11111000,
- B01111110, B11111111,
- B00110011, B10011111,
- B00011111, B11111100,
- B00001101, B01110000,
- B00011011, B10100000,
- B00111111, B11100000,
- B00111111, B11110000,
- B01111100, B11110000,
- B01110000, B01110000,
- B00000000, B00110000 };
-
-void setup() {
- Serial.begin(9600);
-
- // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
- if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32
- Serial.println(F("SSD1306 allocation failed"));
- for(;;); // Don't proceed, loop forever
- }
-
- // Show initial display buffer contents on the screen --
- // the library initializes this with an Adafruit splash screen.
- display.display();
- delay(2000); // Pause for 2 seconds
-
- // Clear the buffer
- display.clearDisplay();
-
- // Draw a single pixel in white
- display.drawPixel(10, 10, WHITE);
-
- // Show the display buffer on the screen. You MUST call display() after
- // drawing commands to make them visible on screen!
- display.display();
- delay(2000);
- // display.display() is NOT necessary after every single drawing command,
- // unless that's what you want...rather, you can batch up a bunch of
- // drawing operations and then update the screen all at once by calling
- // display.display(). These examples demonstrate both approaches...
-
- testdrawline(); // Draw many lines
-
- testdrawrect(); // Draw rectangles (outlines)
-
- testfillrect(); // Draw rectangles (filled)
-
- testdrawcircle(); // Draw circles (outlines)
-
- testfillcircle(); // Draw circles (filled)
-
- testdrawroundrect(); // Draw rounded rectangles (outlines)
-
- testfillroundrect(); // Draw rounded rectangles (filled)
-
- testdrawtriangle(); // Draw triangles (outlines)
-
- testfilltriangle(); // Draw triangles (filled)
-
- testdrawchar(); // Draw characters of the default font
-
- testdrawstyles(); // Draw 'stylized' characters
-
- testscrolltext(); // Draw scrolling text
-
- testdrawbitmap(); // Draw a small bitmap image
-
- // Invert and restore display, pausing in-between
- display.invertDisplay(true);
- delay(1000);
- display.invertDisplay(false);
- delay(1000);
-
- testanimate(logo_bmp, LOGO_WIDTH, LOGO_HEIGHT); // Animate bitmaps
-}
-
-void loop() {
-}
-
-void testdrawline() {
- int16_t i;
-
- display.clearDisplay(); // Clear display buffer
-
- for(i=0; i=0; i-=4) {
- display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=display.width()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
- display.display();
- delay(1);
- }
- for(i=display.height()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=0; i0; i-=3) {
- // The INVERSE color is used so circles alternate white/black
- display.fillCircle(display.width() / 2, display.height() / 2, i, INVERSE);
- display.display(); // Update screen with each newly-drawn circle
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawroundrect(void) {
- display.clearDisplay();
-
- for(int16_t i=0; i0; i-=5) {
- // The INVERSE color is used so triangles alternate white/black
- display.fillTriangle(
- display.width()/2 , display.height()/2-i,
- display.width()/2-i, display.height()/2+i,
- display.width()/2+i, display.height()/2+i, INVERSE);
- display.display();
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawchar(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0, 0); // Start at top-left corner
- display.cp437(true); // Use full 256 char 'Code Page 437' font
-
- // Not all the characters will fit on the display. This is normal.
- // Library will draw what it can and the rest will be clipped.
- for(int16_t i=0; i<256; i++) {
- if(i == '\n') display.write(' ');
- else display.write(i);
- }
-
- display.display();
- delay(2000);
-}
-
-void testdrawstyles(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0,0); // Start at top-left corner
- display.println(F("Hello, world!"));
-
- display.setTextColor(BLACK, WHITE); // Draw 'inverse' text
- display.println(3.141592);
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.print(F("0x")); display.println(0xDEADBEEF, HEX);
-
- display.display();
- delay(2000);
-}
-
-void testscrolltext(void) {
- display.clearDisplay();
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.setCursor(10, 0);
- display.println(F("scroll"));
- display.display(); // Show initial text
- delay(100);
-
- // Scroll in various directions, pausing in-between:
- display.startscrollright(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrollleft(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrolldiagright(0x00, 0x07);
- delay(2000);
- display.startscrolldiagleft(0x00, 0x07);
- delay(2000);
- display.stopscroll();
- delay(1000);
-}
-
-void testdrawbitmap(void) {
- display.clearDisplay();
-
- display.drawBitmap(
- (display.width() - LOGO_WIDTH ) / 2,
- (display.height() - LOGO_HEIGHT) / 2,
- logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, 1);
- display.display();
- delay(1000);
-}
-
-#define XPOS 0 // Indexes into the 'icons' array in function below
-#define YPOS 1
-#define DELTAY 2
-
-void testanimate(const uint8_t *bitmap, uint8_t w, uint8_t h) {
- int8_t f, icons[NUMFLAKES][3];
-
- // Initialize 'snowflake' positions
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- Serial.print(F("x: "));
- Serial.print(icons[f][XPOS], DEC);
- Serial.print(F(" y: "));
- Serial.print(icons[f][YPOS], DEC);
- Serial.print(F(" dy: "));
- Serial.println(icons[f][DELTAY], DEC);
- }
-
- for(;;) { // Loop forever...
- display.clearDisplay(); // Clear the display buffer
-
- // Draw each snowflake:
- for(f=0; f< NUMFLAKES; f++) {
- display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE);
- }
-
- display.display(); // Show the display buffer on the screen
- delay(200); // Pause for 1/10 second
-
- // Then update coordinates of each flake...
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][YPOS] += icons[f][DELTAY];
- // If snowflake is off the bottom of the screen...
- if (icons[f][YPOS] >= display.height()) {
- // Reinitialize to a random position, just off the top
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- }
- }
- }
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_spi/ssd1306_128x32_spi.ino b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_spi/ssd1306_128x32_spi.ino
deleted file mode 100644
index b254785f32b9..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x32_spi/ssd1306_128x32_spi.ino
+++ /dev/null
@@ -1,423 +0,0 @@
-/**************************************************************************
- This is an example for our Monochrome OLEDs based on SSD1306 drivers
-
- Pick one up today in the adafruit shop!
- ------> http://www.adafruit.com/category/63_98
-
- This example is for a 128x32 pixel display using SPI to communicate
- 4 or 5 pins are required to interface.
-
- Adafruit invests time and resources providing this open
- source code, please support Adafruit and open-source
- hardware by purchasing products from Adafruit!
-
- Written by Limor Fried/Ladyada for Adafruit Industries,
- with contributions from the open source community.
- BSD license, check license.txt for more information
- All text above, and the splash screen below must be
- included in any redistribution.
- **************************************************************************/
-
-#include
-#include
-#include
-#include
-
-#define SCREEN_WIDTH 128 // OLED display width, in pixels
-#define SCREEN_HEIGHT 32 // OLED display height, in pixels
-
-// Declaration for SSD1306 display connected using software SPI (default case):
-#define OLED_MOSI 9
-#define OLED_CLK 10
-#define OLED_DC 11
-#define OLED_CS 12
-#define OLED_RESET 13
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
- OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
-
-/* Comment out above, uncomment this block to use hardware SPI
-#define OLED_DC 6
-#define OLED_CS 7
-#define OLED_RESET 8
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
- &SPI, OLED_DC, OLED_RESET, OLED_CS);
-*/
-
-#define NUMFLAKES 10 // Number of snowflakes in the animation example
-
-#define LOGO_HEIGHT 16
-#define LOGO_WIDTH 16
-static const unsigned char PROGMEM logo_bmp[] =
-{ B00000000, B11000000,
- B00000001, B11000000,
- B00000001, B11000000,
- B00000011, B11100000,
- B11110011, B11100000,
- B11111110, B11111000,
- B01111110, B11111111,
- B00110011, B10011111,
- B00011111, B11111100,
- B00001101, B01110000,
- B00011011, B10100000,
- B00111111, B11100000,
- B00111111, B11110000,
- B01111100, B11110000,
- B01110000, B01110000,
- B00000000, B00110000 };
-
-void setup() {
- Serial.begin(9600);
-
- // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
- if(!display.begin(SSD1306_SWITCHCAPVCC)) {
- Serial.println(F("SSD1306 allocation failed"));
- for(;;); // Don't proceed, loop forever
- }
-
- // Show initial display buffer contents on the screen --
- // the library initializes this with an Adafruit splash screen.
- display.display();
- delay(2000); // Pause for 2 seconds
-
- // Clear the buffer
- display.clearDisplay();
-
- // Draw a single pixel in white
- display.drawPixel(10, 10, WHITE);
-
- // Show the display buffer on the screen. You MUST call display() after
- // drawing commands to make them visible on screen!
- display.display();
- delay(2000);
- // display.display() is NOT necessary after every single drawing command,
- // unless that's what you want...rather, you can batch up a bunch of
- // drawing operations and then update the screen all at once by calling
- // display.display(). These examples demonstrate both approaches...
-
- testdrawline(); // Draw many lines
-
- testdrawrect(); // Draw rectangles (outlines)
-
- testfillrect(); // Draw rectangles (filled)
-
- testdrawcircle(); // Draw circles (outlines)
-
- testfillcircle(); // Draw circles (filled)
-
- testdrawroundrect(); // Draw rounded rectangles (outlines)
-
- testfillroundrect(); // Draw rounded rectangles (filled)
-
- testdrawtriangle(); // Draw triangles (outlines)
-
- testfilltriangle(); // Draw triangles (filled)
-
- testdrawchar(); // Draw characters of the default font
-
- testdrawstyles(); // Draw 'stylized' characters
-
- testscrolltext(); // Draw scrolling text
-
- testdrawbitmap(); // Draw a small bitmap image
-
- // Invert and restore display, pausing in-between
- display.invertDisplay(true);
- delay(1000);
- display.invertDisplay(false);
- delay(1000);
-
- testanimate(logo_bmp, LOGO_WIDTH, LOGO_HEIGHT); // Animate bitmaps
-}
-
-void loop() {
-}
-
-void testdrawline() {
- int16_t i;
-
- display.clearDisplay(); // Clear display buffer
-
- for(i=0; i=0; i-=4) {
- display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=display.width()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
- display.display();
- delay(1);
- }
- for(i=display.height()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=0; i0; i-=3) {
- // The INVERSE color is used so circles alternate white/black
- display.fillCircle(display.width() / 2, display.height() / 2, i, INVERSE);
- display.display(); // Update screen with each newly-drawn circle
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawroundrect(void) {
- display.clearDisplay();
-
- for(int16_t i=0; i0; i-=5) {
- // The INVERSE color is used so triangles alternate white/black
- display.fillTriangle(
- display.width()/2 , display.height()/2-i,
- display.width()/2-i, display.height()/2+i,
- display.width()/2+i, display.height()/2+i, INVERSE);
- display.display();
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawchar(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0, 0); // Start at top-left corner
- display.cp437(true); // Use full 256 char 'Code Page 437' font
-
- // Not all the characters will fit on the display. This is normal.
- // Library will draw what it can and the rest will be clipped.
- for(int16_t i=0; i<256; i++) {
- if(i == '\n') display.write(' ');
- else display.write(i);
- }
-
- display.display();
- delay(2000);
-}
-
-void testdrawstyles(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0,0); // Start at top-left corner
- display.println(F("Hello, world!"));
-
- display.setTextColor(BLACK, WHITE); // Draw 'inverse' text
- display.println(3.141592);
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.print(F("0x")); display.println(0xDEADBEEF, HEX);
-
- display.display();
- delay(2000);
-}
-
-void testscrolltext(void) {
- display.clearDisplay();
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.setCursor(10, 0);
- display.println(F("scroll"));
- display.display(); // Show initial text
- delay(100);
-
- // Scroll in various directions, pausing in-between:
- display.startscrollright(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrollleft(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrolldiagright(0x00, 0x07);
- delay(2000);
- display.startscrolldiagleft(0x00, 0x07);
- delay(2000);
- display.stopscroll();
- delay(1000);
-}
-
-void testdrawbitmap(void) {
- display.clearDisplay();
-
- display.drawBitmap(
- (display.width() - LOGO_WIDTH ) / 2,
- (display.height() - LOGO_HEIGHT) / 2,
- logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, 1);
- display.display();
- delay(1000);
-}
-
-#define XPOS 0 // Indexes into the 'icons' array in function below
-#define YPOS 1
-#define DELTAY 2
-
-void testanimate(const uint8_t *bitmap, uint8_t w, uint8_t h) {
- int8_t f, icons[NUMFLAKES][3];
-
- // Initialize 'snowflake' positions
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- Serial.print(F("x: "));
- Serial.print(icons[f][XPOS], DEC);
- Serial.print(F(" y: "));
- Serial.print(icons[f][YPOS], DEC);
- Serial.print(F(" dy: "));
- Serial.println(icons[f][DELTAY], DEC);
- }
-
- for(;;) { // Loop forever...
- display.clearDisplay(); // Clear the display buffer
-
- // Draw each snowflake:
- for(f=0; f< NUMFLAKES; f++) {
- display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE);
- }
-
- display.display(); // Show the display buffer on the screen
- delay(200); // Pause for 1/10 second
-
- // Then update coordinates of each flake...
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][YPOS] += icons[f][DELTAY];
- // If snowflake is off the bottom of the screen...
- if (icons[f][YPOS] >= display.height()) {
- // Reinitialize to a random position, just off the top
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- }
- }
- }
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_i2c/ssd1306_128x64_i2c.ino b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_i2c/ssd1306_128x64_i2c.ino
deleted file mode 100644
index 6d7d5ddd0d7b..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_i2c/ssd1306_128x64_i2c.ino
+++ /dev/null
@@ -1,410 +0,0 @@
-/**************************************************************************
- This is an example for our Monochrome OLEDs based on SSD1306 drivers
-
- Pick one up today in the adafruit shop!
- ------> http://www.adafruit.com/category/63_98
-
- This example is for a 128x32 pixel display using I2C to communicate
- 3 pins are required to interface (two I2C and one reset).
-
- Adafruit invests time and resources providing this open
- source code, please support Adafruit and open-source
- hardware by purchasing products from Adafruit!
-
- Written by Limor Fried/Ladyada for Adafruit Industries,
- with contributions from the open source community.
- BSD license, check license.txt for more information
- All text above, and the splash screen below must be
- included in any redistribution.
- **************************************************************************/
-
-#include
-#include
-#include
-#include
-
-#define SCREEN_WIDTH 128 // OLED display width, in pixels
-#define SCREEN_HEIGHT 64 // OLED display height, in pixels
-
-// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
-#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
-
-#define NUMFLAKES 10 // Number of snowflakes in the animation example
-
-#define LOGO_HEIGHT 16
-#define LOGO_WIDTH 16
-static const unsigned char PROGMEM logo_bmp[] =
-{ B00000000, B11000000,
- B00000001, B11000000,
- B00000001, B11000000,
- B00000011, B11100000,
- B11110011, B11100000,
- B11111110, B11111000,
- B01111110, B11111111,
- B00110011, B10011111,
- B00011111, B11111100,
- B00001101, B01110000,
- B00011011, B10100000,
- B00111111, B11100000,
- B00111111, B11110000,
- B01111100, B11110000,
- B01110000, B01110000,
- B00000000, B00110000 };
-
-void setup() {
- Serial.begin(9600);
-
- // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
- if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) { // Address 0x3D for 128x64
- Serial.println(F("SSD1306 allocation failed"));
- for(;;); // Don't proceed, loop forever
- }
-
- // Show initial display buffer contents on the screen --
- // the library initializes this with an Adafruit splash screen.
- display.display();
- delay(2000); // Pause for 2 seconds
-
- // Clear the buffer
- display.clearDisplay();
-
- // Draw a single pixel in white
- display.drawPixel(10, 10, WHITE);
-
- // Show the display buffer on the screen. You MUST call display() after
- // drawing commands to make them visible on screen!
- display.display();
- delay(2000);
- // display.display() is NOT necessary after every single drawing command,
- // unless that's what you want...rather, you can batch up a bunch of
- // drawing operations and then update the screen all at once by calling
- // display.display(). These examples demonstrate both approaches...
-
- testdrawline(); // Draw many lines
-
- testdrawrect(); // Draw rectangles (outlines)
-
- testfillrect(); // Draw rectangles (filled)
-
- testdrawcircle(); // Draw circles (outlines)
-
- testfillcircle(); // Draw circles (filled)
-
- testdrawroundrect(); // Draw rounded rectangles (outlines)
-
- testfillroundrect(); // Draw rounded rectangles (filled)
-
- testdrawtriangle(); // Draw triangles (outlines)
-
- testfilltriangle(); // Draw triangles (filled)
-
- testdrawchar(); // Draw characters of the default font
-
- testdrawstyles(); // Draw 'stylized' characters
-
- testscrolltext(); // Draw scrolling text
-
- testdrawbitmap(); // Draw a small bitmap image
-
- // Invert and restore display, pausing in-between
- display.invertDisplay(true);
- delay(1000);
- display.invertDisplay(false);
- delay(1000);
-
- testanimate(logo_bmp, LOGO_WIDTH, LOGO_HEIGHT); // Animate bitmaps
-}
-
-void loop() {
-}
-
-void testdrawline() {
- int16_t i;
-
- display.clearDisplay(); // Clear display buffer
-
- for(i=0; i=0; i-=4) {
- display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=display.width()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
- display.display();
- delay(1);
- }
- for(i=display.height()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=0; i0; i-=3) {
- // The INVERSE color is used so circles alternate white/black
- display.fillCircle(display.width() / 2, display.height() / 2, i, INVERSE);
- display.display(); // Update screen with each newly-drawn circle
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawroundrect(void) {
- display.clearDisplay();
-
- for(int16_t i=0; i0; i-=5) {
- // The INVERSE color is used so triangles alternate white/black
- display.fillTriangle(
- display.width()/2 , display.height()/2-i,
- display.width()/2-i, display.height()/2+i,
- display.width()/2+i, display.height()/2+i, INVERSE);
- display.display();
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawchar(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0, 0); // Start at top-left corner
- display.cp437(true); // Use full 256 char 'Code Page 437' font
-
- // Not all the characters will fit on the display. This is normal.
- // Library will draw what it can and the rest will be clipped.
- for(int16_t i=0; i<256; i++) {
- if(i == '\n') display.write(' ');
- else display.write(i);
- }
-
- display.display();
- delay(2000);
-}
-
-void testdrawstyles(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0,0); // Start at top-left corner
- display.println(F("Hello, world!"));
-
- display.setTextColor(BLACK, WHITE); // Draw 'inverse' text
- display.println(3.141592);
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.print(F("0x")); display.println(0xDEADBEEF, HEX);
-
- display.display();
- delay(2000);
-}
-
-void testscrolltext(void) {
- display.clearDisplay();
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.setCursor(10, 0);
- display.println(F("scroll"));
- display.display(); // Show initial text
- delay(100);
-
- // Scroll in various directions, pausing in-between:
- display.startscrollright(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrollleft(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrolldiagright(0x00, 0x07);
- delay(2000);
- display.startscrolldiagleft(0x00, 0x07);
- delay(2000);
- display.stopscroll();
- delay(1000);
-}
-
-void testdrawbitmap(void) {
- display.clearDisplay();
-
- display.drawBitmap(
- (display.width() - LOGO_WIDTH ) / 2,
- (display.height() - LOGO_HEIGHT) / 2,
- logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, 1);
- display.display();
- delay(1000);
-}
-
-#define XPOS 0 // Indexes into the 'icons' array in function below
-#define YPOS 1
-#define DELTAY 2
-
-void testanimate(const uint8_t *bitmap, uint8_t w, uint8_t h) {
- int8_t f, icons[NUMFLAKES][3];
-
- // Initialize 'snowflake' positions
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- Serial.print(F("x: "));
- Serial.print(icons[f][XPOS], DEC);
- Serial.print(F(" y: "));
- Serial.print(icons[f][YPOS], DEC);
- Serial.print(F(" dy: "));
- Serial.println(icons[f][DELTAY], DEC);
- }
-
- for(;;) { // Loop forever...
- display.clearDisplay(); // Clear the display buffer
-
- // Draw each snowflake:
- for(f=0; f< NUMFLAKES; f++) {
- display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE);
- }
-
- display.display(); // Show the display buffer on the screen
- delay(200); // Pause for 1/10 second
-
- // Then update coordinates of each flake...
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][YPOS] += icons[f][DELTAY];
- // If snowflake is off the bottom of the screen...
- if (icons[f][YPOS] >= display.height()) {
- // Reinitialize to a random position, just off the top
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- }
- }
- }
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_spi/ssd1306_128x64_spi.ino b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_spi/ssd1306_128x64_spi.ino
deleted file mode 100644
index dbe300d43370..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/examples/ssd1306_128x64_spi/ssd1306_128x64_spi.ino
+++ /dev/null
@@ -1,424 +0,0 @@
-/**************************************************************************
- This is an example for our Monochrome OLEDs based on SSD1306 drivers
-
- Pick one up today in the adafruit shop!
- ------> http://www.adafruit.com/category/63_98
-
- This example is for a 128x64 pixel display using SPI to communicate
- 4 or 5 pins are required to interface.
-
- Adafruit invests time and resources providing this open
- source code, please support Adafruit and open-source
- hardware by purchasing products from Adafruit!
-
- Written by Limor Fried/Ladyada for Adafruit Industries,
- with contributions from the open source community.
- BSD license, check license.txt for more information
- All text above, and the splash screen below must be
- included in any redistribution.
- **************************************************************************/
-
-#include
-#include
-#include
-#include
-
-#define SCREEN_WIDTH 128 // OLED display width, in pixels
-#define SCREEN_HEIGHT 64 // OLED display height, in pixels
-
-// Declaration for SSD1306 display connected using software SPI (default case):
-#define OLED_MOSI 9
-#define OLED_CLK 10
-#define OLED_DC 11
-#define OLED_CS 12
-#define OLED_RESET 13
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
- OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
-
-/* Comment out above, uncomment this block to use hardware SPI
-#define OLED_DC 6
-#define OLED_CS 7
-#define OLED_RESET 8
-Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
- &SPI, OLED_DC, OLED_RESET, OLED_CS);
-*/
-
-#define NUMFLAKES 10 // Number of snowflakes in the animation example
-
-#define LOGO_HEIGHT 16
-#define LOGO_WIDTH 16
-static const unsigned char PROGMEM logo_bmp[] =
-{ B00000000, B11000000,
- B00000001, B11000000,
- B00000001, B11000000,
- B00000011, B11100000,
- B11110011, B11100000,
- B11111110, B11111000,
- B01111110, B11111111,
- B00110011, B10011111,
- B00011111, B11111100,
- B00001101, B01110000,
- B00011011, B10100000,
- B00111111, B11100000,
- B00111111, B11110000,
- B01111100, B11110000,
- B01110000, B01110000,
- B00000000, B00110000 };
-
-void setup() {
- Serial.begin(9600);
-
- // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
- if(!display.begin(SSD1306_SWITCHCAPVCC)) {
- Serial.println(F("SSD1306 allocation failed"));
- for(;;); // Don't proceed, loop forever
- }
-
-
- // Show initial display buffer contents on the screen --
- // the library initializes this with an Adafruit splash screen.
- display.display();
- delay(2000); // Pause for 2 seconds
-
- // Clear the buffer
- display.clearDisplay();
-
- // Draw a single pixel in white
- display.drawPixel(10, 10, WHITE);
-
- // Show the display buffer on the screen. You MUST call display() after
- // drawing commands to make them visible on screen!
- display.display();
- delay(2000);
- // display.display() is NOT necessary after every single drawing command,
- // unless that's what you want...rather, you can batch up a bunch of
- // drawing operations and then update the screen all at once by calling
- // display.display(). These examples demonstrate both approaches...
-
- testdrawline(); // Draw many lines
-
- testdrawrect(); // Draw rectangles (outlines)
-
- testfillrect(); // Draw rectangles (filled)
-
- testdrawcircle(); // Draw circles (outlines)
-
- testfillcircle(); // Draw circles (filled)
-
- testdrawroundrect(); // Draw rounded rectangles (outlines)
-
- testfillroundrect(); // Draw rounded rectangles (filled)
-
- testdrawtriangle(); // Draw triangles (outlines)
-
- testfilltriangle(); // Draw triangles (filled)
-
- testdrawchar(); // Draw characters of the default font
-
- testdrawstyles(); // Draw 'stylized' characters
-
- testscrolltext(); // Draw scrolling text
-
- testdrawbitmap(); // Draw a small bitmap image
-
- // Invert and restore display, pausing in-between
- display.invertDisplay(true);
- delay(1000);
- display.invertDisplay(false);
- delay(1000);
-
- testanimate(logo_bmp, LOGO_WIDTH, LOGO_HEIGHT); // Animate bitmaps
-}
-
-void loop() {
-}
-
-void testdrawline() {
- int16_t i;
-
- display.clearDisplay(); // Clear display buffer
-
- for(i=0; i=0; i-=4) {
- display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=display.width()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
- display.display();
- delay(1);
- }
- for(i=display.height()-1; i>=0; i-=4) {
- display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
- display.display();
- delay(1);
- }
- delay(250);
-
- display.clearDisplay();
-
- for(i=0; i0; i-=3) {
- // The INVERSE color is used so circles alternate white/black
- display.fillCircle(display.width() / 2, display.height() / 2, i, INVERSE);
- display.display(); // Update screen with each newly-drawn circle
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawroundrect(void) {
- display.clearDisplay();
-
- for(int16_t i=0; i0; i-=5) {
- // The INVERSE color is used so triangles alternate white/black
- display.fillTriangle(
- display.width()/2 , display.height()/2-i,
- display.width()/2-i, display.height()/2+i,
- display.width()/2+i, display.height()/2+i, INVERSE);
- display.display();
- delay(1);
- }
-
- delay(2000);
-}
-
-void testdrawchar(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0, 0); // Start at top-left corner
- display.cp437(true); // Use full 256 char 'Code Page 437' font
-
- // Not all the characters will fit on the display. This is normal.
- // Library will draw what it can and the rest will be clipped.
- for(int16_t i=0; i<256; i++) {
- if(i == '\n') display.write(' ');
- else display.write(i);
- }
-
- display.display();
- delay(2000);
-}
-
-void testdrawstyles(void) {
- display.clearDisplay();
-
- display.setTextSize(1); // Normal 1:1 pixel scale
- display.setTextColor(WHITE); // Draw white text
- display.setCursor(0,0); // Start at top-left corner
- display.println(F("Hello, world!"));
-
- display.setTextColor(BLACK, WHITE); // Draw 'inverse' text
- display.println(3.141592);
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.print(F("0x")); display.println(0xDEADBEEF, HEX);
-
- display.display();
- delay(2000);
-}
-
-void testscrolltext(void) {
- display.clearDisplay();
-
- display.setTextSize(2); // Draw 2X-scale text
- display.setTextColor(WHITE);
- display.setCursor(10, 0);
- display.println(F("scroll"));
- display.display(); // Show initial text
- delay(100);
-
- // Scroll in various directions, pausing in-between:
- display.startscrollright(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrollleft(0x00, 0x0F);
- delay(2000);
- display.stopscroll();
- delay(1000);
- display.startscrolldiagright(0x00, 0x07);
- delay(2000);
- display.startscrolldiagleft(0x00, 0x07);
- delay(2000);
- display.stopscroll();
- delay(1000);
-}
-
-void testdrawbitmap(void) {
- display.clearDisplay();
-
- display.drawBitmap(
- (display.width() - LOGO_WIDTH ) / 2,
- (display.height() - LOGO_HEIGHT) / 2,
- logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, 1);
- display.display();
- delay(1000);
-}
-
-#define XPOS 0 // Indexes into the 'icons' array in function below
-#define YPOS 1
-#define DELTAY 2
-
-void testanimate(const uint8_t *bitmap, uint8_t w, uint8_t h) {
- int8_t f, icons[NUMFLAKES][3];
-
- // Initialize 'snowflake' positions
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- Serial.print(F("x: "));
- Serial.print(icons[f][XPOS], DEC);
- Serial.print(F(" y: "));
- Serial.print(icons[f][YPOS], DEC);
- Serial.print(F(" dy: "));
- Serial.println(icons[f][DELTAY], DEC);
- }
-
- for(;;) { // Loop forever...
- display.clearDisplay(); // Clear the display buffer
-
- // Draw each snowflake:
- for(f=0; f< NUMFLAKES; f++) {
- display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE);
- }
-
- display.display(); // Show the display buffer on the screen
- delay(200); // Pause for 1/10 second
-
- // Then update coordinates of each flake...
- for(f=0; f< NUMFLAKES; f++) {
- icons[f][YPOS] += icons[f][DELTAY];
- // If snowflake is off the bottom of the screen...
- if (icons[f][YPOS] >= display.height()) {
- // Reinitialize to a random position, just off the top
- icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
- icons[f][YPOS] = -LOGO_HEIGHT;
- icons[f][DELTAY] = random(1, 6);
- }
- }
- }
-}
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/library.properties b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/library.properties
deleted file mode 100644
index 61b8efa078c9..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/library.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-name=Adafruit SSD1306
-version=1.3.0
-author=Adafruit
-maintainer=Adafruit
-sentence=SSD1306 oled driver library for monochrome 128x64 and 128x32 displays
-paragraph=SSD1306 oled driver library for monochrome 128x64 and 128x32 displays
-category=Display
-url=https://github.com/adafruit/Adafruit_SSD1306
-architectures=*
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/license.txt b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/license.txt
deleted file mode 100644
index f6a0f22b826f..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/license.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Software License Agreement (BSD License)
-
-Copyright (c) 2012, Adafruit Industries
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-3. Neither the name of the copyright holders nor the
-names of its contributors may be used to endorse or promote products
-derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/splash.h b/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/splash.h
deleted file mode 100644
index 487daecb4697..000000000000
--- a/lib/lib_display/Adafruit_SSD1306-1.3.0-gemu-1.1/splash.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#define splash1_width 82
-#define splash1_height 64
-
-const uint8_t PROGMEM splash1_data[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x0F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
- 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xE0,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xF0, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x7F, 0xF0, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFE, 0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x3F, 0xFF, 0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x1F, 0xFF, 0xFB, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x0F, 0xFF, 0xF9, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0F, 0xFF, 0xF9, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
- 0xFF, 0xF1, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
- 0x73, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFE, 0x3F,
- 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x1E, 0x0F,
- 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x1F, 0xFC,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xF8, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xDF, 0xFF, 0xE0, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x19, 0xFF, 0xC0, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3C, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x7E, 0x7C, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x7F, 0xFE, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
- 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xEF,
- 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xCF, 0xFE,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0x07, 0xFE, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x07, 0xFE, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF0, 0x03, 0xFE, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
- 0x80, 0x00, 0xFC, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x07, 0x80,
- 0x01, 0xFC, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x07, 0x80, 0x01,
- 0xFC, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x07, 0x80, 0x01, 0xE0,
- 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x07, 0x80, 0x01, 0xE0, 0x00,
- 0x00, 0x00, 0x1E, 0x00, 0x7F, 0xE3, 0xF7, 0x9F, 0xF9, 0xFD, 0xE7, 0x78,
- 0x7B, 0xDF, 0xC0, 0xFF, 0xF7, 0xFF, 0xBF, 0xFD, 0xFD, 0xFF, 0x78, 0x7B,
- 0xDF, 0xC0, 0xFF, 0xF7, 0xFF, 0xBF, 0xFD, 0xFD, 0xFF, 0x78, 0x7B, 0xDF,
- 0xC0, 0xF0, 0xF7, 0x87, 0xBC, 0x3D, 0xE1, 0xFF, 0x78, 0x7B, 0xDE, 0x00,
- 0xF0, 0xF7, 0x87, 0xBC, 0x3D, 0xE1, 0xF0, 0x78, 0x7B, 0xDE, 0x00, 0x00,
- 0xF7, 0x87, 0x80, 0x3D, 0xE1, 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0x7F, 0xF7,
- 0x87, 0x9F, 0xFD, 0xE1, 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0xFF, 0xF7, 0x87,
- 0xBF, 0xFD, 0xE1, 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0xF0, 0xF7, 0x87, 0xBC,
- 0x3D, 0xE1, 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0xF0, 0xF7, 0x87, 0xBC, 0x3D,
- 0xE1, 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0xF0, 0xF7, 0x87, 0xBC, 0x3D, 0xE1,
- 0xE0, 0x78, 0x7B, 0xDE, 0x00, 0xFF, 0xF7, 0xFF, 0xBF, 0xFD, 0xE1, 0xE0,
- 0x7F, 0xFB, 0xDF, 0xC0, 0xFF, 0xF7, 0xFF, 0xBF, 0xFD, 0xE1, 0xE0, 0x7F,
- 0xFB, 0xDF, 0xC0, 0x7C, 0xF3, 0xF3, 0x9F, 0x3D, 0xE1, 0xE0, 0x3E, 0x7B,
- 0xCF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x68, 0xDB, 0x11, 0x1A, 0x31, 0xC0, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFD, 0x2B, 0x5A, 0xFB, 0x6A, 0xEF, 0xC0, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFD, 0x4B, 0x5B, 0x3B, 0x1A, 0x33, 0xC0, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFD, 0x6B, 0x5B, 0xDB, 0x6A, 0xFD, 0xC0 };
-
-#define splash2_width 115
-#define splash2_height 32
-
-const uint8_t PROGMEM splash2_data[] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF0,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF8,
- 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x7E, 0x00, 0x00, 0x01, 0xE0, 0x00,
- 0x7F, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0xFE, 0x00, 0x00,
- 0x01, 0xE0, 0x00, 0xFF, 0xEF, 0xF8, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00,
- 0xFE, 0x00, 0x00, 0x01, 0xE0, 0x00, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00,
- 0x03, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x7F, 0xFE, 0x7F,
- 0xC0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x0F, 0x00,
- 0x3F, 0xFE, 0x7F, 0xF8, 0x3F, 0xF1, 0xFB, 0xCF, 0xFC, 0xFE, 0xF3, 0xBC,
- 0x3D, 0xEF, 0xE0, 0x1F, 0xFE, 0x7F, 0xFF, 0x7F, 0xFB, 0xFF, 0xDF, 0xFE,
- 0xFE, 0xFF, 0xBC, 0x3D, 0xEF, 0xE0, 0x1F, 0xC6, 0xFF, 0xFF, 0x7F, 0xFB,
- 0xFF, 0xDF, 0xFE, 0xFE, 0xFF, 0xBC, 0x3D, 0xEF, 0xE0, 0x0F, 0xE3, 0xC7,
- 0xFE, 0x78, 0x7B, 0xC3, 0xDE, 0x1E, 0xF0, 0xFF, 0xBC, 0x3D, 0xEF, 0x00,
- 0x07, 0xFF, 0x87, 0xFC, 0x78, 0x7B, 0xC3, 0xDE, 0x1E, 0xF0, 0xF8, 0x3C,
- 0x3D, 0xEF, 0x00, 0x01, 0xFF, 0xFF, 0xF0, 0x00, 0x7B, 0xC3, 0xC0, 0x1E,
- 0xF0, 0xF0, 0x3C, 0x3D, 0xEF, 0x00, 0x01, 0xF3, 0x7F, 0xE0, 0x3F, 0xFB,
- 0xC3, 0xCF, 0xFE, 0xF0, 0xF0, 0x3C, 0x3D, 0xEF, 0x00, 0x03, 0xE3, 0x3F,
- 0x80, 0x7F, 0xFB, 0xC3, 0xDF, 0xFE, 0xF0, 0xF0, 0x3C, 0x3D, 0xEF, 0x00,
- 0x07, 0xE7, 0x3C, 0x00, 0x78, 0x7B, 0xC3, 0xDE, 0x1E, 0xF0, 0xF0, 0x3C,
- 0x3D, 0xEF, 0x00, 0x07, 0xFF, 0xBE, 0x00, 0x78, 0x7B, 0xC3, 0xDE, 0x1E,
- 0xF0, 0xF0, 0x3C, 0x3D, 0xEF, 0x00, 0x07, 0xFF, 0xFE, 0x00, 0x78, 0x7B,
- 0xC3, 0xDE, 0x1E, 0xF0, 0xF0, 0x3C, 0x3D, 0xEF, 0x00, 0x0F, 0xFF, 0xFE,
- 0x00, 0x7F, 0xFB, 0xFF, 0xDF, 0xFE, 0xF0, 0xF0, 0x3F, 0xFD, 0xEF, 0xE0,
- 0x0F, 0xFF, 0xFF, 0x00, 0x7F, 0xFB, 0xFF, 0xDF, 0xFE, 0xF0, 0xF0, 0x3F,
- 0xFD, 0xEF, 0xE0, 0x0F, 0xF9, 0xFF, 0x00, 0x3E, 0x79, 0xF9, 0xCF, 0x9E,
- 0xF0, 0xF0, 0x1F, 0x3D, 0xE7, 0xE0, 0x1F, 0xF1, 0xFF, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0xFF,
- 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
- 0x1C, 0x00, 0x7F, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0xB4, 0x6D, 0x88,
- 0x8D, 0x18, 0xE0, 0x00, 0x00, 0x1F, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE,
- 0x95, 0xAD, 0x7D, 0xB5, 0x77, 0xE0, 0x00, 0x00, 0x0F, 0x00, 0x7F, 0xFF,
- 0xFF, 0xFF, 0xFE, 0xA5, 0xAD, 0x9D, 0x8D, 0x19, 0xE0, 0x00, 0x00, 0x06,
- 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0xB5, 0xAD, 0xED, 0xB5, 0x7E, 0xE0 };
diff --git a/tasmota/include/tasmota_configurations.h b/tasmota/include/tasmota_configurations.h
index e5ec3eaf208a..dcfc895bc729 100644
--- a/tasmota/include/tasmota_configurations.h
+++ b/tasmota/include/tasmota_configurations.h
@@ -354,7 +354,7 @@
#define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram)
#define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
#define USE_DISPLAY_LCD // [DisplayModel 1] Enable Lcd display (I2C addresses 0x27 and 0x3F) (+6k code)
- #define USE_DISPLAY_SSD1306 // [DisplayModel 2] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
+ // REMOVED - #define USE_DISPLAY_SSD1306 // [DisplayModel 2] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
#define USE_DISPLAY_MATRIX // [DisplayModel 3] Enable 8x8 Matrix display (I2C adresseses see below) (+11k code)
#define USE_DISPLAY_SEVENSEG // [DisplayModel 11] [I2cDriver47] Enable sevenseg display (I2C addresses 0x70 - 0x77) (<+11k code)
#define USE_DISPLAY_SH1106 // [DisplayModel 7] Enable SH1106 Oled 128x64 display (I2C addresses 0x3C and 0x3D)
diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h
index bd2e56e639f7..2eba3cb6ea36 100644
--- a/tasmota/include/tasmota_configurations_ESP32.h
+++ b/tasmota/include/tasmota_configurations_ESP32.h
@@ -333,7 +333,6 @@
//#undef USE_DISPLAY_MODES1TO5
#undef USE_DISPLAY_LCD
-#undef USE_DISPLAY_SSD1306
#undef USE_DISPLAY_MATRIX
#undef USE_DISPLAY_SEVENSEG
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 056d8f03087c..1903cc9482c2 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -760,7 +760,7 @@ An online tool to calculate TLS fingerprints is available here at:\n\
// #define USE_DISPLAY // Add I2C/TM1637/MAX7219 Display Support (+2k code)
#define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0
#define USE_DISPLAY_LCD // [DisplayModel 1] [I2cDriver3] Enable Lcd display (I2C addresses 0x27 and 0x3F) (+6k code)
- #define USE_DISPLAY_SSD1306 // [DisplayModel 2] [I2cDriver4] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
+ // REMOVED - #define USE_DISPLAY_SSD1306 // [DisplayModel 2] [I2cDriver4] Enable SSD1306 Oled 128x64 display (I2C addresses 0x3C and 0x3D) (+16k code)
#define USE_DISPLAY_MATRIX // [DisplayModel 3] [I2cDriver5] Enable 8x8 Matrix display (I2C adresseses see below) (+11k code)
#define MTX_ADDRESS1 0x71 // [DisplayAddress1] I2C address of first 8x8 matrix module
#define MTX_ADDRESS2 0x74 // [DisplayAddress2] I2C address of second 8x8 matrix module
diff --git a/tasmota/tasmota_support/support_features.ino b/tasmota/tasmota_support/support_features.ino
index dcd317d16183..bd064146415b 100644
--- a/tasmota/tasmota_support/support_features.ino
+++ b/tasmota/tasmota_support/support_features.ino
@@ -145,9 +145,10 @@ constexpr uint32_t feature[] = {
#if defined(USE_I2C) && defined(USE_DISPLAY) && defined(USE_DISPLAY_LCD)
0x00000080 | // xdsp_01_lcd.ino
#endif
-#if defined(USE_I2C) && defined(USE_DISPLAY) && defined(USE_DISPLAY_SSD1306)
- 0x00000100 | // xdsp_02_ssd1306.ino
-#endif
+// REMOVED
+// #if defined(USE_I2C) && defined(USE_DISPLAY) && defined(USE_DISPLAY_SSD1306)
+// 0x00000100 | // xdsp_02_ssd1306.ino
+// #endif
#if defined(USE_I2C) && defined(USE_DISPLAY) && defined(USE_DISPLAY_MATRIX)
0x00000200 | // xdsp_03_matrix.ino
#endif
diff --git a/tasmota/tasmota_xdsp_display/xdsp_02_ssd1306.ino b/tasmota/tasmota_xdsp_display/xdsp_02_ssd1306.ino
index 5f9657069dfe..029fa426897a 100644
--- a/tasmota/tasmota_xdsp_display/xdsp_02_ssd1306.ino
+++ b/tasmota/tasmota_xdsp_display/xdsp_02_ssd1306.ino
@@ -17,179 +17,182 @@
along with this program. If not, see .
*/
-#ifdef USE_I2C
-#ifdef USE_DISPLAY
-#ifdef USE_DISPLAY_SSD1306
-
-#define XDSP_02 2
-#define XI2C_04 4 // See I2CDEVICES.md
-
-#define OLED_RESET 4
-
-#define SPRINT(A) char str[32];sprintf(str,"val: %d ",A);Serial.println((char*)str);
-
-#define OLED_ADDRESS1 0x3C // Oled 128x32 I2C address
-#define OLED_ADDRESS2 0x3D // Oled 128x64 I2C address
-
-#define OLED_BUFFER_COLS 40 // Max number of columns in display shadow buffer
-#define OLED_BUFFER_ROWS 16 // Max number of lines in display shadow buffer
-
-#define OLED_FONT_WIDTH 6
-#define OLED_FONT_HEIGTH 8
-
-#include
-#include
-#include
-
-Adafruit_SSD1306 *oled1306;
-
-extern uint8_t *buffer;
-
-/*********************************************************************************************/
-
-void SSD1306InitDriver(void) {
- if (!TasmotaGlobal.i2c_enabled) { return; }
-
- if (!Settings->display_model) {
- if (I2cSetDevice(OLED_ADDRESS1)) {
- Settings->display_address[0] = OLED_ADDRESS1;
- Settings->display_model = XDSP_02;
- }
- else if (I2cSetDevice(OLED_ADDRESS2)) {
- Settings->display_address[0] = OLED_ADDRESS2;
- Settings->display_model = XDSP_02;
- }
- }
-
- if (XDSP_02 == Settings->display_model) {
- I2cSetActiveFound(Settings->display_address[0], "SSD1306");
-
- if ((Settings->display_width != 72) && (Settings->display_width != 64) && (Settings->display_width != 96) && (Settings->display_width != 128)) {
- Settings->display_width = 128;
- }
- if ((Settings->display_height != 40) && (Settings->display_height != 16) && (Settings->display_height != 32) && (Settings->display_height != 48) && (Settings->display_height != 64)) {
- Settings->display_height = 64;
- }
-
- // init renderer
- // oled1306 = new Adafruit_SSD1306(SSD1306_LCDWIDTH,SSD1306_LCDHEIGHT);
- oled1306 = new Adafruit_SSD1306(Settings->display_width, Settings->display_height, &Wire, Pin(GPIO_OLED_RESET));
- oled1306->begin(SSD1306_SWITCHCAPVCC, Settings->display_address[0], Pin(GPIO_OLED_RESET) >= 0);
- renderer = oled1306;
- renderer->DisplayInit(DISPLAY_INIT_MODE, Settings->display_size, Settings->display_rotate, Settings->display_font);
- renderer->setTextColor(1,0);
-
-#ifdef SHOW_SPLASH
- if (!Settings->flag5.display_no_splash) {
- renderer->setTextFont(0);
- renderer->setTextSize(2);
- renderer->setCursor(20,20);
- renderer->println(F("SSD1306"));
- renderer->Updateframe();
- renderer->DisplayOnff(1);
- }
-#endif
-
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: SSD1306"));
- }
-}
-
-/*********************************************************************************************/
-#ifdef USE_DISPLAY_MODES1TO5
-
-void Ssd1306PrintLog(void)
-{
- disp_refresh--;
- if (!disp_refresh) {
- disp_refresh = Settings->display_refresh;
- if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); }
-
- char* txt = DisplayLogBuffer('\370');
- if (txt != NULL) {
- uint8_t last_row = Settings->display_rows -1;
-
- renderer->clearDisplay();
- renderer->setTextSize(Settings->display_size);
- renderer->setCursor(0,0);
- for (byte i = 0; i < last_row; i++) {
- strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols);
- renderer->println(disp_screen_buffer[i]);
- }
- strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols);
- DisplayFillScreen(last_row);
-
- AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "[%s]"), disp_screen_buffer[last_row]);
-
- renderer->println(disp_screen_buffer[last_row]);
- renderer->Updateframe();
- }
- }
-}
-
-void Ssd1306Time(void)
-{
- char line[12];
-
- renderer->clearDisplay();
- renderer->setTextSize(Settings->display_size);
- renderer->setTextFont(Settings->display_font);
- renderer->setCursor(0, 0);
- snprintf_P(line, sizeof(line), PSTR(" %02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second); // [ 12:34:56 ]
- renderer->println(line);
- renderer->println();
- snprintf_P(line, sizeof(line), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [01-02-2018]
- renderer->println(line);
- renderer->Updateframe();
-}
-
-void Ssd1306Refresh(void) // Every second
-{
- if (!renderer) return;
-
- if (Settings->display_mode) { // Mode 0 is User text
- switch (Settings->display_mode) {
- case 1: // Time
- Ssd1306Time();
- break;
- case 2: // Local
- case 3: // Local
- case 4: // Mqtt
- case 5: // Mqtt
- Ssd1306PrintLog();
- break;
- }
- }
-}
-
-#endif // USE_DISPLAY_MODES1TO5
-
-/*********************************************************************************************\
- * Interface
-\*********************************************************************************************/
-
-bool Xdsp02(uint32_t function) {
- if (!I2cEnabled(XI2C_04)) { return false; }
-
- bool result = false;
-
- if (FUNC_DISPLAY_INIT_DRIVER == function) {
- SSD1306InitDriver();
- }
- else if (XDSP_02 == Settings->display_model) {
- switch (function) {
-#ifdef USE_DISPLAY_MODES1TO5
- case FUNC_DISPLAY_EVERY_SECOND:
- Ssd1306Refresh();
- break;
-#endif // USE_DISPLAY_MODES1TO5
- case FUNC_DISPLAY_MODEL:
- result = true;
- break;
- }
- }
- return result;
-}
-
-#endif // USE_DISPLAY_SSD1306
-#endif // USE_DISPLAY
-#endif // USE_I2C
+// REMOVED
+// DEPRECATED - USE UNIVERSAL DISPLAY INSTEAD, https://tasmota.github.io/docs/Universal-Display-Driver/#migrating-to-udisplay
+
+// #ifdef USE_I2C
+// #ifdef USE_DISPLAY
+// #ifdef USE_DISPLAY_SSD1306
+
+// #define XDSP_02 2
+// #define XI2C_04 4 // See I2CDEVICES.md
+
+// #define OLED_RESET 4
+
+// #define SPRINT(A) char str[32];sprintf(str,"val: %d ",A);Serial.println((char*)str);
+
+// #define OLED_ADDRESS1 0x3C // Oled 128x32 I2C address
+// #define OLED_ADDRESS2 0x3D // Oled 128x64 I2C address
+
+// #define OLED_BUFFER_COLS 40 // Max number of columns in display shadow buffer
+// #define OLED_BUFFER_ROWS 16 // Max number of lines in display shadow buffer
+
+// #define OLED_FONT_WIDTH 6
+// #define OLED_FONT_HEIGTH 8
+
+// #include
+// #include
+// #include
+
+// Adafruit_SSD1306 *oled1306;
+
+// extern uint8_t *buffer;
+
+// /*********************************************************************************************/
+
+// void SSD1306InitDriver(void) {
+// if (!TasmotaGlobal.i2c_enabled) { return; }
+
+// if (!Settings->display_model) {
+// if (I2cSetDevice(OLED_ADDRESS1)) {
+// Settings->display_address[0] = OLED_ADDRESS1;
+// Settings->display_model = XDSP_02;
+// }
+// else if (I2cSetDevice(OLED_ADDRESS2)) {
+// Settings->display_address[0] = OLED_ADDRESS2;
+// Settings->display_model = XDSP_02;
+// }
+// }
+
+// if (XDSP_02 == Settings->display_model) {
+// I2cSetActiveFound(Settings->display_address[0], "SSD1306");
+
+// if ((Settings->display_width != 72) && (Settings->display_width != 64) && (Settings->display_width != 96) && (Settings->display_width != 128)) {
+// Settings->display_width = 128;
+// }
+// if ((Settings->display_height != 40) && (Settings->display_height != 16) && (Settings->display_height != 32) && (Settings->display_height != 48) && (Settings->display_height != 64)) {
+// Settings->display_height = 64;
+// }
+
+// // init renderer
+// // oled1306 = new Adafruit_SSD1306(SSD1306_LCDWIDTH,SSD1306_LCDHEIGHT);
+// oled1306 = new Adafruit_SSD1306(Settings->display_width, Settings->display_height, &Wire, Pin(GPIO_OLED_RESET));
+// oled1306->begin(SSD1306_SWITCHCAPVCC, Settings->display_address[0], Pin(GPIO_OLED_RESET) >= 0);
+// renderer = oled1306;
+// renderer->DisplayInit(DISPLAY_INIT_MODE, Settings->display_size, Settings->display_rotate, Settings->display_font);
+// renderer->setTextColor(1,0);
+
+// #ifdef SHOW_SPLASH
+// if (!Settings->flag5.display_no_splash) {
+// renderer->setTextFont(0);
+// renderer->setTextSize(2);
+// renderer->setCursor(20,20);
+// renderer->println(F("SSD1306"));
+// renderer->Updateframe();
+// renderer->DisplayOnff(1);
+// }
+// #endif
+
+// AddLog(LOG_LEVEL_INFO, PSTR("DSP: SSD1306"));
+// }
+// }
+
+// /*********************************************************************************************/
+// #ifdef USE_DISPLAY_MODES1TO5
+
+// void Ssd1306PrintLog(void)
+// {
+// disp_refresh--;
+// if (!disp_refresh) {
+// disp_refresh = Settings->display_refresh;
+// if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); }
+
+// char* txt = DisplayLogBuffer('\370');
+// if (txt != NULL) {
+// uint8_t last_row = Settings->display_rows -1;
+
+// renderer->clearDisplay();
+// renderer->setTextSize(Settings->display_size);
+// renderer->setCursor(0,0);
+// for (byte i = 0; i < last_row; i++) {
+// strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols);
+// renderer->println(disp_screen_buffer[i]);
+// }
+// strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols);
+// DisplayFillScreen(last_row);
+
+// AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "[%s]"), disp_screen_buffer[last_row]);
+
+// renderer->println(disp_screen_buffer[last_row]);
+// renderer->Updateframe();
+// }
+// }
+// }
+
+// void Ssd1306Time(void)
+// {
+// char line[12];
+
+// renderer->clearDisplay();
+// renderer->setTextSize(Settings->display_size);
+// renderer->setTextFont(Settings->display_font);
+// renderer->setCursor(0, 0);
+// snprintf_P(line, sizeof(line), PSTR(" %02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second); // [ 12:34:56 ]
+// renderer->println(line);
+// renderer->println();
+// snprintf_P(line, sizeof(line), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [01-02-2018]
+// renderer->println(line);
+// renderer->Updateframe();
+// }
+
+// void Ssd1306Refresh(void) // Every second
+// {
+// if (!renderer) return;
+
+// if (Settings->display_mode) { // Mode 0 is User text
+// switch (Settings->display_mode) {
+// case 1: // Time
+// Ssd1306Time();
+// break;
+// case 2: // Local
+// case 3: // Local
+// case 4: // Mqtt
+// case 5: // Mqtt
+// Ssd1306PrintLog();
+// break;
+// }
+// }
+// }
+
+// #endif // USE_DISPLAY_MODES1TO5
+
+// /*********************************************************************************************\
+// * Interface
+// \*********************************************************************************************/
+
+// bool Xdsp02(uint32_t function) {
+// if (!I2cEnabled(XI2C_04)) { return false; }
+
+// bool result = false;
+
+// if (FUNC_DISPLAY_INIT_DRIVER == function) {
+// SSD1306InitDriver();
+// }
+// else if (XDSP_02 == Settings->display_model) {
+// switch (function) {
+// #ifdef USE_DISPLAY_MODES1TO5
+// case FUNC_DISPLAY_EVERY_SECOND:
+// Ssd1306Refresh();
+// break;
+// #endif // USE_DISPLAY_MODES1TO5
+// case FUNC_DISPLAY_MODEL:
+// result = true;
+// break;
+// }
+// }
+// return result;
+// }
+
+// #endif // USE_DISPLAY_SSD1306
+// #endif // USE_DISPLAY
+// #endif // USE_I2C