mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
- Implement CrowPanel Advance 3.5" - New driver subproject: ILI9488 - New driver subproject: GT911 - Refactor T-Deck to use new driver subproject - Fix for `flash.ps1`: don't set flash speed
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#include "CrowPanelDisplay.h"
|
|
#include "CrowPanelDisplayConstants.h"
|
|
|
|
#include <Gt911Touch.h>
|
|
#include <PwmBacklight.h>
|
|
#include <Ili9488Display.h>
|
|
|
|
#define TAG "crowpanel_display"
|
|
|
|
static std::shared_ptr<tt::hal::touch::TouchDevice> createTouch() {
|
|
// Note for future changes: Reset pin is 48 and interrupt pin is 47
|
|
auto configuration = std::make_unique<Gt911Touch::Configuration>(
|
|
I2C_NUM_0,
|
|
320,
|
|
480
|
|
);
|
|
|
|
return std::make_shared<Gt911Touch>(std::move(configuration));
|
|
}
|
|
|
|
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
|
auto touch = createTouch();
|
|
|
|
auto configuration = std::make_unique<Ili9488Display::Configuration>(
|
|
CROWPANEL_LCD_SPI_HOST,
|
|
CROWPANEL_LCD_PIN_CS,
|
|
CROWPANEL_LCD_PIN_DC,
|
|
CROWPANEL_LCD_HORIZONTAL_RESOLUTION,
|
|
CROWPANEL_LCD_VERTICAL_RESOLUTION,
|
|
touch,
|
|
false,
|
|
false,
|
|
false,
|
|
true
|
|
);
|
|
|
|
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
|
|
|
|
return std::make_shared<Ili9488Display>(std::move(configuration));
|
|
}
|