Not all processors support buffered write()

This commit is contained in:
Bodmer
2022-02-16 19:52:52 +00:00
parent 4f7f8f7d7e
commit 86101770ac
4 changed files with 9 additions and 6 deletions

View File

@@ -4339,18 +4339,21 @@ uint32_t TFT_eSPI::alphaBlend24(uint8_t alpha, uint32_t fgc, uint32_t bgc, uint8
** Function name: write ** Function name: write
** Description: draw characters piped through serial stream ** Description: draw characters piped through serial stream
***************************************************************************************/ ***************************************************************************************/
/* // Not all processors support buffered write
#ifndef ESP8266 // Avoid ESP8266 board package bug
size_t TFT_eSPI::write(const uint8_t *buf, size_t len) size_t TFT_eSPI::write(const uint8_t *buf, size_t len)
{ {
inTransaction = true; inTransaction = true;
uint8_t *lbuf = (uint8_t *)buf; uint8_t *lbuf = (uint8_t *)buf;
while(len--) write(*lbuf++); while(*lbuf !=0 && len--) write(*lbuf++);
inTransaction = lockTransaction; inTransaction = lockTransaction;
end_tft_write(); end_tft_write();
return 1; return 1;
} }
#endif
*/
/*************************************************************************************** /***************************************************************************************
** Function name: write ** Function name: write
** Description: draw characters piped through serial stream ** Description: draw characters piped through serial stream

View File

@@ -16,7 +16,7 @@
#ifndef _TFT_eSPIH_ #ifndef _TFT_eSPIH_
#define _TFT_eSPIH_ #define _TFT_eSPIH_
#define TFT_ESPI_VERSION "2.4.37" #define TFT_ESPI_VERSION "2.4.38"
// Bit level feature flags // Bit level feature flags
// Bit 0 set: viewport capability // Bit 0 set: viewport capability
@@ -611,7 +611,7 @@ class TFT_eSPI : public Print { friend class TFT_eSprite; // Sprite class has ac
// Support function to UTF8 decode and draw characters piped through print stream // Support function to UTF8 decode and draw characters piped through print stream
size_t write(uint8_t); size_t write(uint8_t);
size_t write(const uint8_t *buf, size_t len); // size_t write(const uint8_t *buf, size_t len);
// Used by Smooth font class to fetch a pixel colour for the anti-aliasing // Used by Smooth font class to fetch a pixel colour for the anti-aliasing
void setCallback(getColorCallback getCol); void setCallback(getColorCallback getCol);

View File

@@ -1,6 +1,6 @@
{ {
"name": "TFT_eSPI", "name": "TFT_eSPI",
"version": "2.4.37", "version": "2.4.38",
"keywords": "Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D", "keywords": "Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D",
"description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32", "description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32",
"repository": "repository":

View File

@@ -1,5 +1,5 @@
name=TFT_eSPI name=TFT_eSPI
version=2.4.37 version=2.4.38
author=Bodmer author=Bodmer
maintainer=Bodmer maintainer=Bodmer
sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32 sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32