mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-23 13:38:01 +00:00
fix touch screen
This commit is contained in:
parent
26b72d1188
commit
fcef6fbb14
@ -120,11 +120,11 @@ static void rak14014_tpIntHandle(void)
|
||||
_rak14014_touch_int = true;
|
||||
}
|
||||
|
||||
#elif defined (ST72xx_DE)
|
||||
#elif defined(ST72xx_DE)
|
||||
#include <LovyanGFX.hpp>
|
||||
#include <TCA9534.h>
|
||||
#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>
|
||||
#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>
|
||||
#include <TCA9534.h>
|
||||
TCA9534 ioex;
|
||||
|
||||
class LGFX : public lgfx::LGFX_Device
|
||||
@ -210,53 +210,53 @@ class LGFX : public lgfx::LGFX_Device
|
||||
|
||||
#ifdef ST7265_HSYNC_POLARITY
|
||||
cfg.hsync_polarity = ST7265_HSYNC_POLARITY;
|
||||
cfg.hsync_front_porch = ST7265_HSYNC_FRONT_PORCH; //8;
|
||||
cfg.hsync_pulse_width = ST7265_HSYNC_PULSE_WIDTH; //4;
|
||||
cfg.hsync_back_porch = ST7265_HSYNC_BACK_PORCH; //8;
|
||||
cfg.hsync_front_porch = ST7265_HSYNC_FRONT_PORCH; // 8;
|
||||
cfg.hsync_pulse_width = ST7265_HSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.hsync_back_porch = ST7265_HSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.vsync_polarity = ST7265_VSYNC_POLARITY; //0;
|
||||
cfg.vsync_front_porch = ST7265_VSYNC_FRONT_PORCH; //8;
|
||||
cfg.vsync_pulse_width = ST7265_VSYNC_PULSE_WIDTH; //4;
|
||||
cfg.vsync_back_porch = ST7265_VSYNC_BACK_PORCH; //8;
|
||||
cfg.vsync_polarity = ST7265_VSYNC_POLARITY; // 0;
|
||||
cfg.vsync_front_porch = ST7265_VSYNC_FRONT_PORCH; // 8;
|
||||
cfg.vsync_pulse_width = ST7265_VSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.vsync_back_porch = ST7265_VSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.pclk_idle_high = 1;
|
||||
cfg.pclk_active_neg = ST7265_PCLK_ACTIVE_NEG; //0;
|
||||
//cfg.pclk_idle_high = 0;
|
||||
//cfg.de_idle_high = 1;
|
||||
cfg.pclk_active_neg = ST7265_PCLK_ACTIVE_NEG; // 0;
|
||||
// cfg.pclk_idle_high = 0;
|
||||
// cfg.de_idle_high = 1;
|
||||
#endif
|
||||
|
||||
#ifdef ST7262_HSYNC_POLARITY
|
||||
cfg.hsync_polarity = ST7262_HSYNC_POLARITY;
|
||||
cfg.hsync_front_porch = ST7262_HSYNC_FRONT_PORCH; //8;
|
||||
cfg.hsync_pulse_width = ST7262_HSYNC_PULSE_WIDTH; //4;
|
||||
cfg.hsync_back_porch = ST7262_HSYNC_BACK_PORCH; //8;
|
||||
cfg.hsync_front_porch = ST7262_HSYNC_FRONT_PORCH; // 8;
|
||||
cfg.hsync_pulse_width = ST7262_HSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.hsync_back_porch = ST7262_HSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.vsync_polarity = ST7262_VSYNC_POLARITY; //0;
|
||||
cfg.vsync_front_porch = ST7262_VSYNC_FRONT_PORCH; //8;
|
||||
cfg.vsync_pulse_width = ST7262_VSYNC_PULSE_WIDTH; //4;
|
||||
cfg.vsync_back_porch = ST7262_VSYNC_BACK_PORCH; //8;
|
||||
cfg.vsync_polarity = ST7262_VSYNC_POLARITY; // 0;
|
||||
cfg.vsync_front_porch = ST7262_VSYNC_FRONT_PORCH; // 8;
|
||||
cfg.vsync_pulse_width = ST7262_VSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.vsync_back_porch = ST7262_VSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.pclk_idle_high = 1;
|
||||
cfg.pclk_active_neg = ST7262_PCLK_ACTIVE_NEG; //0;
|
||||
//cfg.pclk_idle_high = 0;
|
||||
//cfg.de_idle_high = 1;
|
||||
cfg.pclk_active_neg = ST7262_PCLK_ACTIVE_NEG; // 0;
|
||||
// cfg.pclk_idle_high = 0;
|
||||
// cfg.de_idle_high = 1;
|
||||
#endif
|
||||
|
||||
#ifdef SC7277_HSYNC_POLARITY
|
||||
cfg.hsync_polarity = SC7277_HSYNC_POLARITY;
|
||||
cfg.hsync_front_porch = SC7277_HSYNC_FRONT_PORCH; //8;
|
||||
cfg.hsync_pulse_width = SC7277_HSYNC_PULSE_WIDTH; //4;
|
||||
cfg.hsync_back_porch = SC7277_HSYNC_BACK_PORCH; //8;
|
||||
cfg.hsync_front_porch = SC7277_HSYNC_FRONT_PORCH; // 8;
|
||||
cfg.hsync_pulse_width = SC7277_HSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.hsync_back_porch = SC7277_HSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.vsync_polarity = SC7277_VSYNC_POLARITY; //0;
|
||||
cfg.vsync_front_porch = SC7277_VSYNC_FRONT_PORCH; //8;
|
||||
cfg.vsync_pulse_width = SC7277_VSYNC_PULSE_WIDTH; //4;
|
||||
cfg.vsync_back_porch = SC7277_VSYNC_BACK_PORCH; //8;
|
||||
cfg.vsync_polarity = SC7277_VSYNC_POLARITY; // 0;
|
||||
cfg.vsync_front_porch = SC7277_VSYNC_FRONT_PORCH; // 8;
|
||||
cfg.vsync_pulse_width = SC7277_VSYNC_PULSE_WIDTH; // 4;
|
||||
cfg.vsync_back_porch = SC7277_VSYNC_BACK_PORCH; // 8;
|
||||
|
||||
cfg.pclk_idle_high = 1;
|
||||
cfg.pclk_active_neg = SC7277_PCLK_ACTIVE_NEG; //0;
|
||||
//cfg.pclk_idle_high = 0;
|
||||
//cfg.de_idle_high = 1;
|
||||
cfg.pclk_active_neg = SC7277_PCLK_ACTIVE_NEG; // 0;
|
||||
// cfg.pclk_idle_high = 0;
|
||||
// cfg.de_idle_high = 1;
|
||||
#endif
|
||||
|
||||
_bus_instance.config(cfg);
|
||||
@ -426,7 +426,7 @@ class LGFX : public lgfx::LGFX_Device
|
||||
lgfx::Bus_SPI _bus_instance;
|
||||
lgfx::Light_PWM _light_instance;
|
||||
#if HAS_TOUCHSCREEN
|
||||
#ifdef T_WATCH_S3
|
||||
#if defined(T_WATCH_S3) || defined(ELECROW)
|
||||
lgfx::Touch_FT5x06 _touch_instance;
|
||||
#else
|
||||
lgfx::Touch_GT911 _touch_instance;
|
||||
@ -946,7 +946,7 @@ static LGFX *tft = nullptr;
|
||||
#endif
|
||||
|
||||
#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ST7789_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || \
|
||||
defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined (ST72xx_DE) || (ARCH_PORTDUINO && HAS_SCREEN != 0)
|
||||
defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST72xx_DE) || (ARCH_PORTDUINO && HAS_SCREEN != 0)
|
||||
#include "SPILock.h"
|
||||
#include "TFTDisplay.h"
|
||||
#include <SPI.h>
|
||||
|
Loading…
Reference in New Issue
Block a user