mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- 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
28 lines
675 B
C++
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));
|
|
}
|