Board implementations and fixes (#247)
- Implemented Elecrow Crowpanel Basic 5.0" - Implemented Elecrow Crowpanel Advance 5.0" - Implemented CYD 2432S032C - Fix for CYD 4848S040C rendering drift (lower transfer speed) - Fix for SD card locking mechanism for various boards
This commit is contained in:
committed by
GitHub
parent
21936f7e9e
commit
f85d0239ff
@@ -0,0 +1,39 @@
|
||||
#include "CydDisplay.h"
|
||||
|
||||
#include <Gt911Touch.h>
|
||||
#include <Ili934xDisplay.h>
|
||||
#include <PwmBacklight.h>
|
||||
|
||||
static std::shared_ptr<tt::hal::touch::TouchDevice> createTouch() {
|
||||
auto configuration = std::make_unique<Gt911Touch::Configuration>(
|
||||
I2C_NUM_0,
|
||||
240,
|
||||
320
|
||||
);
|
||||
|
||||
return std::make_shared<Gt911Touch>(std::move(configuration));
|
||||
}
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||
|
||||
auto touch = createTouch();
|
||||
|
||||
auto configuration = std::make_unique<Ili934xDisplay::Configuration>(
|
||||
SPI2_HOST,
|
||||
GPIO_NUM_15,
|
||||
GPIO_NUM_2,
|
||||
240,
|
||||
320,
|
||||
touch,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
0,
|
||||
LCD_RGB_ELEMENT_ORDER_RGB
|
||||
);
|
||||
|
||||
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
|
||||
|
||||
return std::make_shared<Ili934xDisplay>(std::move(configuration));
|
||||
}
|
||||
Reference in New Issue
Block a user