From 5e62875ff548a2214500ffc05f06a93010548fd0 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Sun, 25 Nov 2018 03:15:16 +0000 Subject: [PATCH] Fix issue #256 Parallel compatibility lost during recent updates. Now working again. --- TFT_eSPI.cpp | 2 +- TFT_eSPI.h | 8 +++++--- library.json | 2 +- library.properties | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index 260e324..92873da 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -4928,7 +4928,7 @@ void writeBlock(uint16_t color, uint32_t repeat) void writeBlock(uint16_t color, uint32_t repeat) { - uint32_t color32 = SPI_32(color, color); + uint32_t color32 = COL_32(color, color); if (repeat > 31) // Revert legacy toggle buffer change { diff --git a/TFT_eSPI.h b/TFT_eSPI.h index fae8068..2af6786 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -226,10 +226,12 @@ #ifdef ESP8266 // Concatenate two 16 bit values for the SPI 32 bit register write #define SPI_32(H,L) ( (H)<<16 | (L) ) + #define COL_32(H,L) ( (H)<<16 | (L) ) #else - // Swap byte order for concatenated 16 bit window address or colors - // AB CD -> DCBA for SPI 32 bit register write - #define SPI_32(H,L) ( ((H)<<8 | (H)>>8) | (((L)<<8 | (L)>>8)<<16 ) ) + #define SPI_32(H,L) ( (H)<<16 | (L) ) + // Swap byte order for concatenated 16 bit colors + // AB CD -> DCBA for 32 bit register write + #define COL_32(H,L) ( ((H)<<8 | (H)>>8) | (((L)<<8 | (L)>>8)<<16 ) ) #endif #if defined (ESP32) && defined (ESP32_PARALLEL) diff --git a/library.json b/library.json index 65e6a5a..7540093 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "1.3.1", + "version": "1.3.2", "keywords": "tft, ePaper, display, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789", "description": "A TFT and ePaper SPI graphics library for ESP8266 and ESP32", "repository": diff --git a/library.properties b/library.properties index 16f3333..fd3be61 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=1.3.1 +version=1.3.2 author=Bodmer maintainer=Bodmer sentence=A fast TFT graphics library for ESP8266 and ESP32 processors for the Arduino IDE