From ee530baaa05faeb246392cd2ac0ee66e79af49db Mon Sep 17 00:00:00 2001 From: JF Date: Fri, 3 Jan 2020 16:32:31 +0100 Subject: Add basic touch panel driver. Handle touch event in display app : draw a big square at the touch point coordinates. --- src/DisplayApp/DisplayApp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/DisplayApp/DisplayApp.h') diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 24b8e45d..75c74227 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -10,6 +10,8 @@ #include #include #include "lcdfont14.h" +#include "../drivers/Cst816s.h" + extern const FONT_INFO lCD_70ptFontInfo; @@ -18,7 +20,7 @@ namespace Pinetime { class DisplayApp { public: enum class States {Idle, Running}; - enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel} ; + enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent} ; DisplayApp(Controllers::Battery &batteryController, Controllers::Ble &bleController, Controllers::DateTime& dateTimeController); @@ -59,11 +61,11 @@ namespace Pinetime { bool batteryLevelUpdated = false; static char const *DaysString[]; - static char const *MonthsString[]; - bool dateUpdated = false; + Pinetime::Drivers::Cst816S touchPanel; + void OnTouchEvent(); }; } } -- cgit v1.2.3-70-g09d2