summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-02-16 18:32:36 +0100
committerJF <jf@codingfield.com>2020-02-16 18:32:36 +0100
commit167a0ffc873a2442af43d0347efd00f84932b8cc (patch)
tree2e131e3c97b1c67e0dff6bab516a1fe5958e1741 /src/main.cpp
parent52539a5ff1b6f52c65b032ef1668d43d4df2dc24 (diff)
Add touch panel port to lvgl.
PoC of user interaction with 3 screen (clock, menu and app).
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0d374c6b..2a272677 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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();