mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
- Implemented Elecrow CrowPanel Basic 2.8" - Change default "invert" setting for ILI934x driver from `true` to `false` - Created `Xpt2046` driver subproject - Refactored unPhone to use new `Xpt2046` driver subproject
29 lines
720 B
C++
29 lines
720 B
C++
#include "CrowPanelDisplay.h"
|
|
#include "CrowPanelDisplayConstants.h"
|
|
#include "CrowPanelTouch.h"
|
|
#include "Ili934xDisplay.h"
|
|
|
|
#include <PwmBacklight.h>
|
|
|
|
#include <Tactility/Log.h>
|
|
|
|
#define TAG "crowpanel_display"
|
|
|
|
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
|
auto touch = createTouch();
|
|
|
|
auto configuration = std::make_unique<Ili934xDisplay::Configuration>(
|
|
CROWPANEL_LCD_SPI_HOST,
|
|
CROWPANEL_LCD_PIN_CS,
|
|
CROWPANEL_LCD_PIN_DC,
|
|
240,
|
|
320,
|
|
touch
|
|
);
|
|
|
|
configuration->mirrorX = true;
|
|
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
|
|
|
|
return std::make_shared<Ili934xDisplay>(std::move(configuration));
|
|
}
|