diff options
| author | JF <jf@codingfield.com> | 2020-02-12 18:57:04 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-02-12 18:57:04 (GMT) |
| commit | 52539a5ff1b6f52c65b032ef1668d43d4df2dc24 (patch) | |
| tree | d64d5f445c4776b82a19bcb79f7d762e09f528d7 /src/drivers/Cst816s.h | |
| parent | e65c9fa18138e8623d5f8e5e8f25fcf0e3d3cf67 (diff) | |
Log Touchpanel data (position + gesture!)
Diffstat (limited to 'src/drivers/Cst816s.h')
| -rw-r--r-- | src/drivers/Cst816s.h | 12 |
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]; |
