Skip to content

Commit acc0cfe

Browse files
Nasimovycaveman99
authored andcommitted
added SPI Speed to constructor+ cleaned up variant.h
1 parent f5e3acb commit acc0cfe

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/graphics/Screen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
15461546
#elif defined(USE_ST7796)
15471547
#ifdef ESP_PLATFORM
15481548
dispdev = new ST7796Spi(&SPI3, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7796_SDA,
1549-
ST7796_MISO, ST7796_SCK);
1549+
ST7796_MISO, ST7796_SCK, TFT_SPI_FREQUENCY);
15501550
#else
15511551
dispdev = new ST7796Spi(&SPI3, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
15521552
#endif
@@ -1687,13 +1687,13 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
16871687
#ifdef USE_ST7796
16881688
SPI3.end();
16891689
#if defined(ARCH_ESP32)
1690-
pinMode(VTFT_LEDA, ANALOG);
1690+
pinMode(VTFT_LEDA, OUTPUT);
1691+
digitalWrite(VTFT_LEDA, LOW);
16911692
pinMode(ST7796_RESET, ANALOG);
16921693
pinMode(ST7796_RS, ANALOG);
16931694
pinMode(ST7796_NSS, ANALOG);
16941695
#else
16951696
nrf_gpio_cfg_default(VTFT_LEDA);
1696-
nrf_gpio_cfg_default(VTFT_CTRL);
16971697
nrf_gpio_cfg_default(ST7796_RESET);
16981698
nrf_gpio_cfg_default(ST7796_RS);
16991699
nrf_gpio_cfg_default(ST7796_NSS);

variants/tbeam_TFT/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extends = esp32_base
44
board = ttgo-t-beam
55
board_check = true
66
lib_deps = ${esp32_base.lib_deps}
7-
https://github.com/Nasimovy/st7796/archive/refs/tags/1.0.4.zip ; display addon
7+
https://github.com/Nasimovy/st7796/archive/refs/tags/1.0.5.zip ; display addon
88
build_flags = ${esp32_base.build_flags}
99
-DTBEAM_V10
1010
-Ivariants/tbeam_TFT

variants/tbeam_TFT/variant.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
#define ST7796_MISO -1
1414
#define ST7796_BUSY -1
1515
#define VTFT_LEDA 4
16-
#define TFT_BACKLIGHT_ON HIGH
17-
#define ST7796_SPI_HOST VSPI_HOST
18-
#define SPI_FREQUENCY 10000000
19-
#define SPI_READ_FREQUENCY 4000000
16+
#define TFT_SPI_FREQUENCY 1000000
2017
#define TFT_HEIGHT 222
2118
#define TFT_WIDTH 480
2219
#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes

0 commit comments

Comments
 (0)