From 4dffbfe9d75bfe4a4dcabd332280c7cb25fa9dcc Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Mon, 30 Apr 2018 17:32:05 +0100 Subject: [PATCH] single class constructor with DUMMY arguments --- MCUFRIEND_kbv.cpp | 13 +++---------- MCUFRIEND_kbv.h | 7 +------ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index 5d65909..914f2f7 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -1,4 +1,4 @@ -#define SUPPORT_0139 //not working +238 bytes +//#define SUPPORT_0139 //S6D0139 +280 bytes #define SUPPORT_0154 //S6D0154 +320 bytes //#define SUPPORT_1289 //costs about 408 bytes //#define SUPPORT_1580 //R61580 Untested @@ -13,10 +13,10 @@ //#define SUPPORT_8352A //HX8352A +486 bytes, 0.27s //#define SUPPORT_8352B //HX8352B //#define SUPPORT_8357D_GAMMA //monster 34 byte -#define SUPPORT_9225 //ILI9225-B, ILI9225-G ID=0x9225, ID=0x9226 +//#define SUPPORT_9225 //ILI9225-B, ILI9225-G ID=0x9225, ID=0x9226 +380 bytes //#define SUPPORT_9326_5420 //ILI9326, SPFD5420 +246 bytes //#define SUPPORT_9342 //costs +114 bytes -//#define SUPPORT_9806 +//#define SUPPORT_9806 //UNTESTED #define SUPPORT_9488_555 //costs +230 bytes, 0.03s / 0.19s #define SUPPORT_B509_7793 //R61509, ST7793 +244 bytes #define OFFSET_9327 32 //costs about 103 bytes, 0.08s @@ -54,17 +54,10 @@ #define USING_16BIT_BUS 0 #endif -#if defined USE_GFX_KBV -MCUFRIEND_kbv::MCUFRIEND_kbv():Adafruit_GFX(240, 320) -{ - // we can not access GPIO pins until AHB has been enabled. -} -#else MCUFRIEND_kbv::MCUFRIEND_kbv(int CS, int RS, int WR, int RD, int RST):Adafruit_GFX(240, 320) { // we can not access GPIO pins until AHB has been enabled. } -#endif static uint8_t done_reset, is8347, is555; static uint16_t color565_to_555(uint16_t color) { diff --git a/MCUFRIEND_kbv.h b/MCUFRIEND_kbv.h index b79e2ba..ae47662 100644 --- a/MCUFRIEND_kbv.h +++ b/MCUFRIEND_kbv.h @@ -13,13 +13,8 @@ class MCUFRIEND_kbv : public Adafruit_GFX { public: -#if defined USE_GFX_KBV - MCUFRIEND_kbv(); -#elif defined(ARDUINO_GENERIC_STM32F103C) || defined(ARDUINO_GENERIC_STM32F103V) || defined(ARDUINO_MAPLE_REV3) || defined(ARDUINO_MAPLE_MINI) || defined(ESP32) +// MCUFRIEND_kbv(int CS=A3, int RS=A2, int WR=A1, int RD=A0, int RST=A4); //shield wiring MCUFRIEND_kbv(int CS=0, int RS=0, int WR=0, int RD=0, int RST=0); //dummy arguments -#else - MCUFRIEND_kbv(int CS=A3, int RS=A2, int WR=A1, int RD=A0, int RST=A4); -#endif void reset(void); // you only need the constructor void begin(uint16_t ID = 0x9341); // you only need the constructor virtual void drawPixel(int16_t x, int16_t y, uint16_t color); // and these three