Add touch panel port to lvgl.

PoC of user interaction with 3 screen (clock, menu and app).
This commit is contained in:
JF
2020-02-16 18:32:36 +01:00
parent 52539a5ff1
commit 167a0ffc87
18 changed files with 540 additions and 68 deletions

View File

@@ -82,7 +82,7 @@ extern "C" {
void DebounceTimerCallback(TimerHandle_t xTimer) {
xTimerStop(xTimer, 0);
if(isSleeping) {
/*if(isSleeping) {
SystemTask_PushMessage(SystemTaskMessages::GoToRunning);
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToRunning);
isSleeping = false;
@@ -93,7 +93,8 @@ void DebounceTimerCallback(TimerHandle_t xTimer) {
SystemTask_PushMessage(SystemTaskMessages::GoToSleep);
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToSleep);
isSleeping = true;
}
}*/
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::ButtonPushed);
}
void SystemTask_PushMessage(SystemTaskMessages message) {
@@ -126,8 +127,9 @@ void SystemTask(void *) {
lcd.reset(new Pinetime::Drivers::St7789(*spi, pinLcdDataCommand));
gfx.reset(new Pinetime::Components::Gfx(*lcd));
lvgl.reset(new Pinetime::Components::LittleVgl(*lcd));
touchPanel.reset(new Pinetime::Drivers::Cst816S());
lvgl.reset(new Pinetime::Components::LittleVgl(*lcd, *touchPanel));
ptrLcd = lcd.get();
spi->Init();