Merge develop into main (#391)

## Improvements

- Created new base driver classes: `EspLcdDisplayV2' and `EspLcdSpiDisplay`
- Updated `St7789Display` to implement `EspLcdSpiDisplay`
- Updated all boards with ST7789 display

## Fixes

- Ensure that `tmp/` is created on startup (for all writeable filesystems)
- Fix for `lv_list` padding on small screen devices
- Fix for `PreferencesEsp` not processing result when writing string to NVS

## Other

- Remove unused build scripts
This commit is contained in:
Ken Van Hoeylandt
2025-10-26 13:50:17 +01:00
committed by GitHub
parent 37420db000
commit db6d3b4acb
43 changed files with 851 additions and 784 deletions
@@ -7,12 +7,12 @@ constexpr auto* TAG = "CYD";
static std::shared_ptr<tt::hal::touch::TouchDevice> createTouch() {
auto configuration = std::make_unique<Xpt2046SoftSpi::Configuration>(
CYD_TOUCH_MOSI_PIN,
CYD_TOUCH_MISO_PIN,
CYD_TOUCH_SCK_PIN,
CYD_TOUCH_CS_PIN,
CYD2432S028RV3_LCD_HORIZONTAL_RESOLUTION, // 240
CYD2432S028RV3_LCD_VERTICAL_RESOLUTION, // 320
TOUCH_MOSI_PIN,
TOUCH_MISO_PIN,
TOUCH_SCK_PIN,
TOUCH_CS_PIN,
LCD_HORIZONTAL_RESOLUTION, // 240
LCD_VERTICAL_RESOLUTION, // 320
false, // swapXY
true, // mirrorX
false // mirrorY
@@ -31,24 +31,28 @@ static std::shared_ptr<tt::hal::touch::TouchDevice> createTouch() {
}
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
auto touch = createTouch();
St7789Display::Configuration panel_configuration = {
.horizontalResolution = LCD_HORIZONTAL_RESOLUTION,
.verticalResolution = LCD_VERTICAL_RESOLUTION,
.gapX = 0,
.gapY = 0,
.swapXY = false,
.mirrorX = false,
.mirrorY = false,
.invertColor = false,
.bufferSize = LCD_BUFFER_SIZE,
.touch = createTouch(),
.backlightDutyFunction = driver::pwmbacklight::setBacklightDuty,
.resetPin = GPIO_NUM_NC
};
auto configuration = std::make_unique<St7789Display::Configuration>(
CYD2432S028RV3_LCD_SPI_HOST,
CYD2432S028RV3_LCD_PIN_CS,
CYD2432S028RV3_LCD_PIN_DC,
CYD2432S028RV3_LCD_HORIZONTAL_RESOLUTION,
CYD2432S028RV3_LCD_VERTICAL_RESOLUTION,
touch,
false, // swapXY
false, // mirrorX
false, // mirrorY
false, // invertColor
CYD2432S028RV3_LCD_DRAW_BUFFER_SIZE
);
auto spi_configuration = std::make_shared<St7789Display::SpiConfiguration>(St7789Display::SpiConfiguration {
.spiHostDevice = LCD_SPI_HOST,
.csPin = LCD_PIN_CS,
.dcPin = LCD_PIN_DC,
.pixelClockFrequency = 80'000'000,
.transactionQueueDepth = 10
});
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
auto display = std::make_shared<St7789Display>(std::move(configuration));
return std::reinterpret_pointer_cast<tt::hal::display::DisplayDevice>(display);
return std::make_shared<St7789Display>(panel_configuration, spi_configuration);
}