summaryrefslogtreecommitdiff
path: root/src/drivers/Cst816s.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-03-03 18:59:01 (GMT)
committerJF <jf@codingfield.com>2020-03-03 18:59:01 (GMT)
commit545636940f68108a361dda85e0e48a240909cf29 (patch)
treef471cf8f60976ab1fffce747db021e5706bf60c2 /src/drivers/Cst816s.h
parent79b4f006be8732663706f1177e17e52829eb661f (diff)
parentd2f725ec9bc6d848906b83ca539d873223d74648 (diff)
Merge branch 'littlevgl'
# Conflicts: # src/DisplayApp/Screens/Clock.cpp # src/DisplayApp/Screens/Clock.h
Diffstat (limited to 'src/drivers/Cst816s.h')
-rw-r--r--src/drivers/Cst816s.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h
index 0adb448..93b05df 100644
--- a/src/drivers/Cst816s.h
+++ b/src/drivers/Cst816s.h
@@ -6,6 +6,16 @@ namespace Pinetime {
namespace Drivers {
class Cst816S {
public :
+ enum class Gestures : uint8_t {
+ None = 0x00,
+ SlideDown = 0x01,
+ SlideUp = 0x02,
+ SlideLeft = 0x03,
+ SlideRight = 0x04,
+ SingleTap = 0x05,
+ DoubleTap = 0x0B,
+ LongPress = 0x0C
+ };
struct TouchInfos {
uint16_t x;
uint16_t y;
@@ -13,6 +23,7 @@ namespace Pinetime {
uint8_t finger;
uint8_t pressure;
uint8_t area;
+ Gestures gesture;
bool isTouch = false;
};
@@ -36,6 +47,7 @@ namespace Pinetime {
static constexpr uint8_t touchYLowIndex = 6;
static constexpr uint8_t touchIdIndex = 5;
static constexpr uint8_t touchStep = 6;
+ static constexpr uint8_t gestureIndex = 1;
uint8_t touchData[63];