From 9fcb289643ed87f062569fb7fd2005edb5fdc11e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 18 Aug 2026 20:28:01 -0500 Subject: [PATCH] fix(thinknode_m9): define SPI_FREQUENCY for the non-MUI build (#11546) The M9's variant.h defines ST7789_CS, so TFTDisplay.cpp compiles its ST7789 LGFX branch, which reads SPI_FREQUENCY for the panel write clock (SPI_READ_FREQUENCY, its pair, is already in variant.h). The flag was only set in the -tft env, so `build (thinknode_m9, esp32s3)` has failed on develop since the board landed in #10908: src/graphics/TFTDisplay.cpp:504:30: error: 'SPI_FREQUENCY' was not declared in this scope; did you mean 'SD_SPI_FREQUENCY'? Move the flag up into thinknode_m9_base, keeping the 75 MHz the -tft env already used for the same panel and matching the SD card's 75 MHz on the bus they share. The -tft env inherits the base flags, so device-ui's LGFX_GENERIC.h - which falls back to 20 MHz when the macro is absent - still sees the identical value. --- variants/esp32s3/ELECROW-ThinkNode-M9/platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/esp32s3/ELECROW-ThinkNode-M9/platformio.ini b/variants/esp32s3/ELECROW-ThinkNode-M9/platformio.ini index fbd595dee..7aea2c5fb 100644 --- a/variants/esp32s3/ELECROW-ThinkNode-M9/platformio.ini +++ b/variants/esp32s3/ELECROW-ThinkNode-M9/platformio.ini @@ -31,6 +31,7 @@ build_flags = -D SDCARD_INIT_SPI -D SD_SPI_FREQUENCY=75000000U -D HAS_SCREEN=1 + -D SPI_FREQUENCY=75000000 ; -D COMPASS_SENSOR_DEBUG=1 lib_deps = ${esp32s3_base.lib_deps} # renovate: datasource=custom depName=LovyanGFX packageName=lovyan03/library/LovyanGFX @@ -82,7 +83,6 @@ build_flags = -D LGFX_SCREEN_WIDTH=240 -D LGFX_SCREEN_HEIGHT=320 -D LGFX_INVERT_LIGHT=true - -D SPI_FREQUENCY=75000000 ; -D MAP_FULL_REDRAW -D MUI_WIFI_PS_MIN_MODEM -D DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32=NETWORK_ESP32