Ken Van Hoeylandt 0563e42dc9
New board: Elecrow CrowPanel Avance 2.8" (#224)
- Added new board
- Extracted ST7789 driver and backlight PWM driver into separate subprojects
- Refactored T-Deck to use the shared driver modules
- Fix bug in WiFi service: searching for APs was broken
2025-02-19 21:01:13 +01:00

28 lines
675 B
C++

#include "TdeckDisplay.h"
#include "TdeckDisplayConstants.h"
#include "TdeckTouch.h"
#include <PwmBacklight.h>
#include <St7789Display.h>
#include <driver/spi_master.h>
#define TAG "tdeck_display"
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
auto touch = std::make_shared<TdeckTouch>();
auto configuration = std::make_unique<St7789Display::Configuration>(
TDECK_LCD_SPI_HOST,
TDECK_LCD_PIN_CS,
TDECK_LCD_PIN_DC,
320,
240,
touch
);
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
return std::make_shared<St7789Display>(std::move(configuration));
}