Various tweaks and bug fixes

This commit is contained in:
Bodmer
2022-10-10 19:02:05 +01:00
parent 385cb5423e
commit d1bb18bdde
8 changed files with 22 additions and 17 deletions

View File

@@ -135,7 +135,14 @@ SPI3_HOST = 2
// Call up the SPIFFS (SPI FLASH Filing System) for the anti-aliased fonts
#define FS_NO_GLOBALS
#include <FS.h>
#include "SPIFFS.h" // ESP32 only
#if defined(CONFIG_IDF_TARGET_ESP32)
#include "SPIFFS.h" // ESP32 only
#else
#ifndef SPIFFS
#include <LittleFS.h>
#define SPIFFS LittleFS
#endif
#endif
#define FONT_FS_AVAILABLE
#endif

View File

@@ -52,15 +52,6 @@
#endif
#endif
#if !defined (TFT_PARALLEL_8_BIT)
// Volatile for register reads:
volatile uint32_t* _spi_cmd = (volatile uint32_t*)(SPI_CMD_REG(SPI_PORT));
volatile uint32_t* _spi_user = (volatile uint32_t*)(SPI_USER_REG(SPI_PORT));
// Register writes only:
volatile uint32_t* _spi_mosi_dlen = (volatile uint32_t*)(SPI_MOSI_DLEN_REG(SPI_PORT));
volatile uint32_t* _spi_w = (volatile uint32_t*)(SPI_W0_REG(SPI_PORT));
#endif
////////////////////////////////////////////////////////////////////////////////////////
#if defined (TFT_SDA_READ) && !defined (TFT_PARALLEL_8_BIT)
////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -112,6 +112,11 @@ SPI3_HOST = 2
// Processor specific code used by SPI bus transaction startWrite and endWrite functions
#if !defined (ESP32_PARALLEL)
#define _spi_cmd (volatile uint32_t*)(SPI_CMD_REG(SPI_PORT))
#define _spi_user (volatile uint32_t*)(SPI_USER_REG(SPI_PORT))
#define _spi_mosi_dlen (volatile uint32_t*)(SPI_MOSI_DLEN_REG(SPI_PORT))
#define _spi_w (volatile uint32_t*)(SPI_W0_REG(SPI_PORT))
#if (TFT_SPI_MODE == SPI_MODE1) || (TFT_SPI_MODE == SPI_MODE2)
#define SET_BUS_WRITE_MODE *_spi_user = SPI_USR_MOSI | SPI_CK_OUT_EDGE
#define SET_BUS_READ_MODE *_spi_user = SPI_USR_MOSI | SPI_USR_MISO | SPI_DOUTDIN | SPI_CK_OUT_EDGE
@@ -129,7 +134,7 @@ SPI3_HOST = 2
#if !defined(TFT_PARALLEL_8_BIT) && !defined(SPI_18BIT_DRIVER)
#define ESP32_DMA
// Code to check if DMA is busy, used by SPI DMA + transaction + endWrite functions
#define DMA_BUSY_CHECK dmaWait()
#define DMA_BUSY_CHECK //dmaWait()
#else
#define DMA_BUSY_CHECK
#endif

View File

@@ -3828,6 +3828,7 @@ void TFT_eSPI::fillSmoothRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, i
int32_t cx = 0;
// Limit radius to half width or height
if (r < 0) r = 0;
if (r > w/2) r = w/2;
if (r > h/2) r = h/2;
@@ -3892,6 +3893,7 @@ void TFT_eSPI::drawWideLine(float ax, float ay, float bx, float by, float wd, ui
***************************************************************************************/
void TFT_eSPI::drawWedgeLine(float ax, float ay, float bx, float by, float ar, float br, uint32_t fg_color, uint32_t bg_color)
{
if ( (ar < 0.0) || (br < 0.0) )return;
if ( (abs(ax - bx) < 0.01f) && (abs(ay - by) < 0.01f) ) bx += 0.01f; // Avoid divide by zero
// Find line bounding box

View File

@@ -16,7 +16,7 @@
#ifndef _TFT_eSPIH_
#define _TFT_eSPIH_
#define TFT_ESPI_VERSION "2.4.76"
#define TFT_ESPI_VERSION "2.4.77"
// Bit level feature flags
// Bit 0 set: viewport capability

View File

@@ -17,10 +17,10 @@ The procedure is as follows:
3. Close the Arduino IDE and open it again so the added file is recognised.
4. This step is already done in this sketch, but to adapt you own sketches, open the a sketch and add a
4. This step is already done in this sketch, but to adapt you own sketches, open the sketch and add a
new tab, "tft_setup.h" in the main sketch, put all the tft library setup information in that header.
The tab header name must be tft_setup.h
IMPORTANT: You will need to remember to add the platform.local.txt file again if you upgrade the IDE or
the board package version). Note that the file must be added to each processor board package you are using.
*/
the board package version. Note that the file must be added to each processor board package you are using.
*/

View File

@@ -1,6 +1,6 @@
{
"name": "TFT_eSPI",
"version": "2.4.76",
"version": "2.4.77",
"keywords": "Arduino, tft, display, ttgo, LilyPi, WT32-SC01, ePaper, display, Pico, RP2040 Nano Connect, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, ST7796, RM68140, SSD1351, SSD1963, ILI9225, HX8357D, GC9A01, R61581",
"description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, RP2040, ESP8266, ESP32 and STM32",
"repository":

View File

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