From b9b80496a79062feeefb93e0d5a373149272476e Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Thu, 26 Jan 2017 11:10:42 +0000 Subject: [PATCH] bump version, extra param in pushColors() --- MCUFRIEND_kbv.cpp | 4 ++-- MCUFRIEND_kbv.h | 6 +++--- library.properties | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index 67c120d..0b7db41 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -615,7 +615,7 @@ void MCUFRIEND_kbv::pushColors(uint8_t * block, int16_t n, bool first) CS_IDLE; } -void MCUFRIEND_kbv::pushColors(const uint8_t * block, int16_t n, bool first) +void MCUFRIEND_kbv::pushColors(const uint8_t * block, int16_t n, bool first, bool bigend) //costs 28 bytes { uint16_t color; uint8_t h, l; @@ -627,7 +627,7 @@ void MCUFRIEND_kbv::pushColors(const uint8_t * block, int16_t n, bool first) while (n-- > 0) { l = pgm_read_byte(block++); h = pgm_read_byte(block++); - color = h << 8 | l; + color = (bigend) ? (l << 8 ) | h : (h << 8) | l; write16(color); } CS_IDLE; diff --git a/MCUFRIEND_kbv.h b/MCUFRIEND_kbv.h index b44480a..0622a41 100644 --- a/MCUFRIEND_kbv.h +++ b/MCUFRIEND_kbv.h @@ -1,5 +1,5 @@ #ifndef MCUFRIEND_KBV_H_ -#define MCUFRIEND_KBV_H_ 293 +#define MCUFRIEND_KBV_H_ 294 //#define USE_SERIAL @@ -39,8 +39,8 @@ class MCUFRIEND_kbv : public Adafruit_GFX { void setAddrWindow(int16_t x, int16_t y, int16_t x1, int16_t y1); void pushColors(uint16_t *block, int16_t n, bool first); void pushColors(uint8_t *block, int16_t n, bool first); - void pushColors(const uint8_t *block, int16_t n, bool first); - void vertScroll(int16_t top, int16_t scrollines, int16_t offset); + void pushColors(const uint8_t *block, int16_t n, bool first, bool bigend = false); + void vertScroll(int16_t top, int16_t scrollines, int16_t offset); private: uint16_t _lcd_ID, _lcd_rev, _lcd_madctl, _lcd_drivOut, _MC, _MP, _MW, _SC, _EC, _SP, _EP; diff --git a/library.properties b/library.properties index b5953e7..addd427 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=MCUFRIEND_kbv -version=2.9.3 +version=2.9.4-beta author=David Prentice maintainer=David Prentice sentence=TFT Library for 2.4, 2.8, 3.5, 3.6, 3.95 inch mcufriend UNO Shields