From 3933d81dc2406cba83d1b7de24da68beae99036f Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Fri, 3 Apr 2026 14:56:35 -0600 Subject: [PATCH 01/11] Add cyd-2432s024r config --- .github/workflows/build.yml | 1 + Devices/cyd-2432s024r/CMakeLists.txt | 7 +++ .../cyd-2432s024r/Source/Configuration.cpp | 35 ++++++++++++++ .../cyd-2432s024r/Source/devices/Display.cpp | 46 +++++++++++++++++++ .../cyd-2432s024r/Source/devices/Display.h | 25 ++++++++++ .../cyd-2432s024r/Source/devices/SdCard.cpp | 23 ++++++++++ Devices/cyd-2432s024r/Source/devices/SdCard.h | 8 ++++ Devices/cyd-2432s024r/Source/module.cpp | 23 ++++++++++ Devices/cyd-2432s024r/cyd,2432s024r.dts | 31 +++++++++++++ Devices/cyd-2432s024r/device.properties | 19 ++++++++ Devices/cyd-2432s024r/devicetree.yaml | 3 ++ 11 files changed, 221 insertions(+) create mode 100644 Devices/cyd-2432s024r/CMakeLists.txt create mode 100644 Devices/cyd-2432s024r/Source/Configuration.cpp create mode 100644 Devices/cyd-2432s024r/Source/devices/Display.cpp create mode 100644 Devices/cyd-2432s024r/Source/devices/Display.h create mode 100644 Devices/cyd-2432s024r/Source/devices/SdCard.cpp create mode 100644 Devices/cyd-2432s024r/Source/devices/SdCard.h create mode 100644 Devices/cyd-2432s024r/Source/module.cpp create mode 100644 Devices/cyd-2432s024r/cyd,2432s024r.dts create mode 100644 Devices/cyd-2432s024r/device.properties create mode 100644 Devices/cyd-2432s024r/devicetree.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0c6cfe3f..3210ef955 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,7 @@ jobs: board: [ { id: btt-panda-touch, arch: esp32s3 }, { id: cyd-2432s024c, arch: esp32 }, + { id: cyd-2432s024r, arch: esp32 }, { id: cyd-2432s028r, arch: esp32 }, { id: cyd-2432s028rv3, arch: esp32 }, { id: cyd-e32r28t, arch: esp32 }, diff --git a/Devices/cyd-2432s024r/CMakeLists.txt b/Devices/cyd-2432s024r/CMakeLists.txt new file mode 100644 index 000000000..1e6393dd4 --- /dev/null +++ b/Devices/cyd-2432s024r/CMakeLists.txt @@ -0,0 +1,7 @@ +file(GLOB_RECURSE SOURCE_FILES Source/*.c*) + +idf_component_register( + SRCS ${SOURCE_FILES} + INCLUDE_DIRS "Source" + REQUIRES Tactility esp_lvgl_port ILI934x XPT2046 PwmBacklight driver vfs fatfs +) diff --git a/Devices/cyd-2432s024r/Source/Configuration.cpp b/Devices/cyd-2432s024r/Source/Configuration.cpp new file mode 100644 index 000000000..4111f82fe --- /dev/null +++ b/Devices/cyd-2432s024r/Source/Configuration.cpp @@ -0,0 +1,35 @@ +#include "devices/Display.h" +#include "devices/SdCard.h" +#include + +#include +#include +#include + +using namespace tt::hal; + +static bool initBoot() { + // Set the RGB LED Pins to output and turn them off + ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_27, GPIO_MODE_OUTPUT)); // Red + ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_12, GPIO_MODE_OUTPUT)); // Green + ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT)); // Blue + + // 0 on, 1 off + ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_27, 1)); // Red + ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_12, 1)); // Green + ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_13, 1)); // Blue + + return driver::pwmbacklight::init(LCD_PIN_BACKLIGHT); +} + +static DeviceVector createDevices() { + return { + createDisplay(), + createSdCard() + }; +} + +extern const Configuration hardwareConfiguration = { + .initBoot = initBoot, + .createDevices = createDevices +}; diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp new file mode 100644 index 000000000..3f88c85c6 --- /dev/null +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -0,0 +1,46 @@ +#include "Display.h" +#include "Xpt2046Touch.h" +#include +#include + +static std::shared_ptr createTouch(esp_lcd_spi_bus_handle_t spiDevice) { + auto configuration = std::make_unique( + spiDevice, + TOUCH_CS_PIN, + LCD_HORIZONTAL_RESOLUTION, + LCD_VERTICAL_RESOLUTION, + true, // swapXY + true, // mirrorX + false // mirrorY + ); + return std::make_shared(std::move(configuration)); +} + +std::shared_ptr createDisplay() { + auto spi_configuration = std::make_shared(Ili934xDisplay::SpiConfiguration { + .spiHostDevice = LCD_SPI_HOST, + .csPin = LCD_PIN_CS, + .dcPin = LCD_PIN_DC, + .pixelClockFrequency = 40'000'000, + .transactionQueueDepth = 10 + }); + + Ili934xDisplay::Configuration panel_configuration = { + .horizontalResolution = LCD_HORIZONTAL_RESOLUTION, + .verticalResolution = LCD_VERTICAL_RESOLUTION, + .gapX = 0, + .gapY = 0, + .swapXY = false, + .mirrorX = true, + .mirrorY = false, + .invertColor = false, + .swapBytes = true, + .bufferSize = LCD_BUFFER_SIZE, + .touch = createTouch(spi_configuration->spiHostDevice), + .backlightDutyFunction = driver::pwmbacklight::setBacklightDuty, + .resetPin = LCD_PIN_RST, + .rgbElementOrder = LCD_RGB_ELEMENT_ORDER_BGR + }; + + return std::make_shared(panel_configuration, spi_configuration, true); +} diff --git a/Devices/cyd-2432s024r/Source/devices/Display.h b/Devices/cyd-2432s024r/Source/devices/Display.h new file mode 100644 index 000000000..c0b5a7049 --- /dev/null +++ b/Devices/cyd-2432s024r/Source/devices/Display.h @@ -0,0 +1,25 @@ +#pragma once + +#include +#include +#include +#include + +// Display +constexpr auto LCD_SPI_HOST = SPI2_HOST; +constexpr auto LCD_PIN_CS = GPIO_NUM_15; +constexpr auto LCD_PIN_DC = GPIO_NUM_2; +constexpr auto LCD_PIN_RST = GPIO_NUM_4; +constexpr auto LCD_HORIZONTAL_RESOLUTION = 240; +constexpr auto LCD_VERTICAL_RESOLUTION = 320; +constexpr auto LCD_BUFFER_HEIGHT = LCD_VERTICAL_RESOLUTION / 10; +constexpr auto LCD_BUFFER_SIZE = LCD_HORIZONTAL_RESOLUTION * LCD_BUFFER_HEIGHT; + +// Backlight +constexpr auto LCD_PIN_BACKLIGHT = GPIO_NUM_27; + +// Touch (hardware SPI, shared bus) +constexpr auto TOUCH_CS_PIN = GPIO_NUM_21; +constexpr auto TOUCH_IRQ_PIN = GPIO_NUM_36; + +std::shared_ptr createDisplay(); diff --git a/Devices/cyd-2432s024r/Source/devices/SdCard.cpp b/Devices/cyd-2432s024r/Source/devices/SdCard.cpp new file mode 100644 index 000000000..8312a62f3 --- /dev/null +++ b/Devices/cyd-2432s024r/Source/devices/SdCard.cpp @@ -0,0 +1,23 @@ +#include "SdCard.h" +#include +#include + +using tt::hal::sdcard::SpiSdCardDevice; + +std::shared_ptr createSdCard() { + auto config = std::make_unique( + GPIO_NUM_5, // CS + GPIO_NUM_NC, + GPIO_NUM_NC, + GPIO_NUM_NC, + SdCardDevice::MountBehaviour::AtBoot, + nullptr, + std::vector(), + SPI2_HOST // shared bus + ); + + auto* spi_controller = device_find_by_name("spi0"); + check(spi_controller, "spi0 not found"); + + return std::make_shared(std::move(config), spi_controller); +} diff --git a/Devices/cyd-2432s024r/Source/devices/SdCard.h b/Devices/cyd-2432s024r/Source/devices/SdCard.h new file mode 100644 index 000000000..4da9f5b97 --- /dev/null +++ b/Devices/cyd-2432s024r/Source/devices/SdCard.h @@ -0,0 +1,8 @@ +#pragma once + +#include "Tactility/hal/sdcard/SdCardDevice.h" + +using tt::hal::sdcard::SdCardDevice; + +std::shared_ptr createSdCard(); + diff --git a/Devices/cyd-2432s024r/Source/module.cpp b/Devices/cyd-2432s024r/Source/module.cpp new file mode 100644 index 000000000..2cd4c7385 --- /dev/null +++ b/Devices/cyd-2432s024r/Source/module.cpp @@ -0,0 +1,23 @@ +#include + +extern "C" { + +static error_t start() { + // Empty for now + return ERROR_NONE; +} + +static error_t stop() { + // Empty for now + return ERROR_NONE; +} + +struct Module cyd_2432s024r_module = { + .name = "cyd-2432s024r", + .start = start, + .stop = stop, + .symbols = nullptr, + .internal = nullptr +}; + +} diff --git a/Devices/cyd-2432s024r/cyd,2432s024r.dts b/Devices/cyd-2432s024r/cyd,2432s024r.dts new file mode 100644 index 000000000..521edaaca --- /dev/null +++ b/Devices/cyd-2432s024r/cyd,2432s024r.dts @@ -0,0 +1,31 @@ +/dts-v1/; + +#include +#include +#include +#include + +/ { + compatible = "root"; + model = "ESP32-2.4TFT"; + + gpio0 { + compatible = "espressif,esp32-gpio"; + gpio-count = <40>; + }; + + shared_spi: spi0 { + compatible = "espressif,esp32-spi"; + host = ; + pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>; + pin-miso = <&gpio0 19 GPIO_FLAG_NONE>; + pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>; + }; + + uart1 { + compatible = "espressif,esp32-uart"; + port = ; + pin-tx = <&gpio0 1 GPIO_FLAG_NONE>; + pin-rx = <&gpio0 3 GPIO_FLAG_NONE>; + }; +}; diff --git a/Devices/cyd-2432s024r/device.properties b/Devices/cyd-2432s024r/device.properties new file mode 100644 index 000000000..fe56493f4 --- /dev/null +++ b/Devices/cyd-2432s024r/device.properties @@ -0,0 +1,19 @@ +[general] +vendor=CYD +name=2432S024R + +[apps] +launcherAppId=Launcher + +[hardware] +target=ESP32 +flashSize=4MB +spiRam=false + +[display] +size=2.4" +shape=rectangle +dpi=143 + +[lvgl] +colorDepth=16 diff --git a/Devices/cyd-2432s024r/devicetree.yaml b/Devices/cyd-2432s024r/devicetree.yaml new file mode 100644 index 000000000..ab75fd2c2 --- /dev/null +++ b/Devices/cyd-2432s024r/devicetree.yaml @@ -0,0 +1,3 @@ +dependencies: + - Platforms/platform-esp32 +dts: cyd,2432s024r.dts From 30d853e630200e5992883c558f568c34ca137484 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Fri, 3 Apr 2026 15:05:40 -0600 Subject: [PATCH 02/11] Rechecking manufacturer docs --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 2 +- Devices/cyd-2432s024r/Source/devices/Display.h | 13 ++++++++----- Devices/cyd-2432s024r/cyd,2432s024r.dts | 14 +++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 3f88c85c6..3ef6adbe9 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -9,7 +9,7 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ TOUCH_CS_PIN, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, - true, // swapXY + false, // swapXY true, // mirrorX false // mirrorY ); diff --git a/Devices/cyd-2432s024r/Source/devices/Display.h b/Devices/cyd-2432s024r/Source/devices/Display.h index c0b5a7049..d8a8ae6c4 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.h +++ b/Devices/cyd-2432s024r/Source/devices/Display.h @@ -7,9 +7,12 @@ // Display constexpr auto LCD_SPI_HOST = SPI2_HOST; -constexpr auto LCD_PIN_CS = GPIO_NUM_15; -constexpr auto LCD_PIN_DC = GPIO_NUM_2; -constexpr auto LCD_PIN_RST = GPIO_NUM_4; +constexpr auto LCD_PIN_CS = GPIO_NUM_15; +constexpr auto LCD_PIN_DC = GPIO_NUM_2; +constexpr auto LCD_PIN_RST = GPIO_NUM_NC; // tied to ESP32 RST +constexpr auto LCD_PIN_CLK = GPIO_NUM_14; +constexpr auto LCD_PIN_MOSI = GPIO_NUM_13; +constexpr auto LCD_PIN_MISO = GPIO_NUM_12; constexpr auto LCD_HORIZONTAL_RESOLUTION = 240; constexpr auto LCD_VERTICAL_RESOLUTION = 320; constexpr auto LCD_BUFFER_HEIGHT = LCD_VERTICAL_RESOLUTION / 10; @@ -18,8 +21,8 @@ constexpr auto LCD_BUFFER_SIZE = LCD_HORIZONTAL_RESOLUTION * LCD_BUFFER_HEIGHT; // Backlight constexpr auto LCD_PIN_BACKLIGHT = GPIO_NUM_27; -// Touch (hardware SPI, shared bus) -constexpr auto TOUCH_CS_PIN = GPIO_NUM_21; +// Touch +constexpr auto TOUCH_CS_PIN = GPIO_NUM_33; constexpr auto TOUCH_IRQ_PIN = GPIO_NUM_36; std::shared_ptr createDisplay(); diff --git a/Devices/cyd-2432s024r/cyd,2432s024r.dts b/Devices/cyd-2432s024r/cyd,2432s024r.dts index 521edaaca..0c151b587 100644 --- a/Devices/cyd-2432s024r/cyd,2432s024r.dts +++ b/Devices/cyd-2432s024r/cyd,2432s024r.dts @@ -7,16 +7,24 @@ / { compatible = "root"; - model = "ESP32-2.4TFT"; + model = "CYD 2432S024R"; gpio0 { compatible = "espressif,esp32-gpio"; gpio-count = <40>; }; - shared_spi: spi0 { + display_spi: spi0 { compatible = "espressif,esp32-spi"; host = ; + pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>; + pin-miso = <&gpio0 12 GPIO_FLAG_NONE>; + pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>; + }; + + sdcard_spi: spi1 { + compatible = "espressif,esp32-spi"; + host = ; pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>; pin-miso = <&gpio0 19 GPIO_FLAG_NONE>; pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>; @@ -28,4 +36,4 @@ pin-tx = <&gpio0 1 GPIO_FLAG_NONE>; pin-rx = <&gpio0 3 GPIO_FLAG_NONE>; }; -}; +}; \ No newline at end of file From cdd2770326a3374990c3074080119120b0f7be4b Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Fri, 3 Apr 2026 15:10:50 -0600 Subject: [PATCH 03/11] Should be correct now, enabling ci to test --- .github/workflows/build.yml | 1 + Devices/cyd-2432s024r/Source/Configuration.cpp | 16 ++++++++-------- Devices/cyd-2432s024r/Source/devices/SdCard.cpp | 8 ++++---- Devices/cyd-2432s024r/device.properties | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3210ef955..2ca782ec2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - cyd-2.4 tags: - v* pull_request: diff --git a/Devices/cyd-2432s024r/Source/Configuration.cpp b/Devices/cyd-2432s024r/Source/Configuration.cpp index 4111f82fe..4fe462d3a 100644 --- a/Devices/cyd-2432s024r/Source/Configuration.cpp +++ b/Devices/cyd-2432s024r/Source/Configuration.cpp @@ -9,15 +9,15 @@ using namespace tt::hal; static bool initBoot() { - // Set the RGB LED Pins to output and turn them off - ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_27, GPIO_MODE_OUTPUT)); // Red - ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_12, GPIO_MODE_OUTPUT)); // Green - ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT)); // Blue + // // Set the RGB LED Pins to output and turn them off + // ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_27, GPIO_MODE_OUTPUT)); // Red + // ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_12, GPIO_MODE_OUTPUT)); // Green + // ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT)); // Blue - // 0 on, 1 off - ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_27, 1)); // Red - ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_12, 1)); // Green - ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_13, 1)); // Blue + // // 0 on, 1 off + // ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_27, 1)); // Red + // ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_12, 1)); // Green + // ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_13, 1)); // Blue return driver::pwmbacklight::init(LCD_PIN_BACKLIGHT); } diff --git a/Devices/cyd-2432s024r/Source/devices/SdCard.cpp b/Devices/cyd-2432s024r/Source/devices/SdCard.cpp index 8312a62f3..cd8f648ab 100644 --- a/Devices/cyd-2432s024r/Source/devices/SdCard.cpp +++ b/Devices/cyd-2432s024r/Source/devices/SdCard.cpp @@ -6,18 +6,18 @@ using tt::hal::sdcard::SpiSdCardDevice; std::shared_ptr createSdCard() { auto config = std::make_unique( - GPIO_NUM_5, // CS + GPIO_NUM_5, GPIO_NUM_NC, GPIO_NUM_NC, GPIO_NUM_NC, SdCardDevice::MountBehaviour::AtBoot, nullptr, std::vector(), - SPI2_HOST // shared bus + SPI3_HOST ); - auto* spi_controller = device_find_by_name("spi0"); - check(spi_controller, "spi0 not found"); + auto* spi_controller = device_find_by_name("spi1"); + check(spi_controller, "spi1 not found"); return std::make_shared(std::move(config), spi_controller); } diff --git a/Devices/cyd-2432s024r/device.properties b/Devices/cyd-2432s024r/device.properties index fe56493f4..da517175a 100644 --- a/Devices/cyd-2432s024r/device.properties +++ b/Devices/cyd-2432s024r/device.properties @@ -13,7 +13,7 @@ spiRam=false [display] size=2.4" shape=rectangle -dpi=143 +dpi=167 [lvgl] colorDepth=16 From 7117e6cb869798ae11a959b31e175c13d83a92b5 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 00:25:34 -0600 Subject: [PATCH 04/11] Update display configuration for swapXY and rgbElementOrder --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 3ef6adbe9..1f90ee3e5 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -30,7 +30,7 @@ std::shared_ptr createDisplay() { .verticalResolution = LCD_VERTICAL_RESOLUTION, .gapX = 0, .gapY = 0, - .swapXY = false, + .swapXY = true, .mirrorX = true, .mirrorY = false, .invertColor = false, @@ -39,7 +39,7 @@ std::shared_ptr createDisplay() { .touch = createTouch(spi_configuration->spiHostDevice), .backlightDutyFunction = driver::pwmbacklight::setBacklightDuty, .resetPin = LCD_PIN_RST, - .rgbElementOrder = LCD_RGB_ELEMENT_ORDER_BGR + .rgbElementOrder = LCD_RGB_ELEMENT_ORDER_RGB }; return std::make_shared(panel_configuration, spi_configuration, true); From 5441340dd6e1e85fa443e25985e740cb456cb5fb Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 01:26:43 -0600 Subject: [PATCH 05/11] Modify display and touch configuration --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 1f90ee3e5..8e5b03e8a 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -9,9 +9,9 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ TOUCH_CS_PIN, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, - false, // swapXY - true, // mirrorX - false // mirrorY + true, // swapXY + false, // mirrorX + false // mirrorY ); return std::make_shared(std::move(configuration)); } @@ -31,8 +31,8 @@ std::shared_ptr createDisplay() { .gapX = 0, .gapY = 0, .swapXY = true, - .mirrorX = true, - .mirrorY = false, + .mirrorX = false, + .mirrorY = true, .invertColor = false, .swapBytes = true, .bufferSize = LCD_BUFFER_SIZE, From 5d11ade3e99653f66895bf1009341953dca095b3 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 02:24:20 -0600 Subject: [PATCH 06/11] Modify display settings for axis swapping and mirroring Updated display configuration to swap axes and mirror display. --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 8e5b03e8a..6e9948c4f 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -9,9 +9,9 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ TOUCH_CS_PIN, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, - true, // swapXY - false, // mirrorX - false // mirrorY + false, // swapXY + true, // mirrorX + true, // mirrorY ); return std::make_shared(std::move(configuration)); } @@ -31,7 +31,7 @@ std::shared_ptr createDisplay() { .gapX = 0, .gapY = 0, .swapXY = true, - .mirrorX = false, + .mirrorX = true, .mirrorY = true, .invertColor = false, .swapBytes = true, From 08dec05917e42404630d54192e573e76ab362471 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 02:39:22 -0600 Subject: [PATCH 07/11] Fix formatting of mirrorY parameter in Display.cpp --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 6e9948c4f..7e9b93aa3 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -11,7 +11,7 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ LCD_VERTICAL_RESOLUTION, false, // swapXY true, // mirrorX - true, // mirrorY + true // mirrorY ); return std::make_shared(std::move(configuration)); } From e92898a24ee21487c37a508ff8b5bd7d21cc0fc2 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 03:07:54 -0600 Subject: [PATCH 08/11] Change mirrorX and mirrorY settings to false --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 7e9b93aa3..1d333f165 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -10,8 +10,8 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, false, // swapXY - true, // mirrorX - true // mirrorY + false, // mirrorX + false // mirrorY ); return std::make_shared(std::move(configuration)); } From 4a1cf32544fa6428929ff9be578cf05ec4e01b67 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 03:28:21 -0600 Subject: [PATCH 09/11] This works but is uncalibrated --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 1d333f165..53901cb9f 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -9,7 +9,7 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ TOUCH_CS_PIN, LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, - false, // swapXY + true, // swapXY false, // mirrorX false // mirrorY ); From aea0d74991a9b3de2956e14c46fb6ea7103d6171 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 03:59:07 -0600 Subject: [PATCH 10/11] Mirror X --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 53901cb9f..3d4e68ea8 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -10,7 +10,7 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, true, // swapXY - false, // mirrorX + true, // mirrorX false // mirrorY ); return std::make_shared(std::move(configuration)); From 0a515cf57729abda9aa1498d3f9efc8f796ff505 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Sat, 4 Apr 2026 03:59:25 -0600 Subject: [PATCH 11/11] Mirror Y --- Devices/cyd-2432s024r/Source/devices/Display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Devices/cyd-2432s024r/Source/devices/Display.cpp b/Devices/cyd-2432s024r/Source/devices/Display.cpp index 3d4e68ea8..f8aef5e46 100644 --- a/Devices/cyd-2432s024r/Source/devices/Display.cpp +++ b/Devices/cyd-2432s024r/Source/devices/Display.cpp @@ -10,8 +10,8 @@ static std::shared_ptr createTouch(esp_lcd_spi_bus_ LCD_HORIZONTAL_RESOLUTION, LCD_VERTICAL_RESOLUTION, true, // swapXY - true, // mirrorX - false // mirrorY + false, // mirrorX + true // mirrorY ); return std::make_shared(std::move(configuration)); }