diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-07-15 21:07:55 (GMT) |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2021-07-15 21:07:55 (GMT) |
| commit | 2a3e1263906d1145d6b539ff019362f0077d8097 (patch) | |
| tree | 1fdfa2947ccba67f1f62bf0660e6d578f35d366a /src/drivers/Cst816s.h | |
| parent | 0d24d2b81e995d37bb7fb363df21a19b195107b8 (diff) | |
Fix most issues
Diffstat (limited to 'src/drivers/Cst816s.h')
| -rw-r--r-- | src/drivers/Cst816s.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h index 14c296e..26bdf4e 100644 --- a/src/drivers/Cst816s.h +++ b/src/drivers/Cst816s.h @@ -19,12 +19,9 @@ namespace Pinetime { struct TouchInfos { uint16_t x = 0; uint16_t y = 0; - uint8_t action = 0; - uint8_t finger = 0; - uint8_t pressure = 0; - uint8_t area = 0; Gestures gesture = Gestures::None; - bool isTouch = false; + bool touching = false; + bool isValid = false; }; Cst816S(TwiMaster& twiMaster, uint8_t twiAddress); @@ -41,23 +38,24 @@ namespace Pinetime { private: static constexpr uint8_t pinIrq = 28; static constexpr uint8_t pinReset = 10; - static constexpr uint8_t lastTouchId = 0x0f; + + // Unused/Unavailable commented out + static constexpr uint8_t gestureIndex = 1; static constexpr uint8_t touchPointNumIndex = 2; - static constexpr uint8_t touchMiscIndex = 8; - static constexpr uint8_t touchXYIndex = 7; - static constexpr uint8_t touchEventIndex = 3; + //static constexpr uint8_t touchEventIndex = 3; static constexpr uint8_t touchXHighIndex = 3; static constexpr uint8_t touchXLowIndex = 4; + //static constexpr uint8_t touchIdIndex = 5; static constexpr uint8_t touchYHighIndex = 5; static constexpr uint8_t touchYLowIndex = 6; - static constexpr uint8_t touchIdIndex = 5; - static constexpr uint8_t touchStep = 6; - static constexpr uint8_t gestureIndex = 1; + //static constexpr uint8_t touchStep = 6; + //static constexpr uint8_t touchXYIndex = 7; + //static constexpr uint8_t touchMiscIndex = 8; - uint8_t touchData[10]; + uint8_t touchData[7]; TwiMaster& twiMaster; uint8_t twiAddress; }; } -}
\ No newline at end of file +} |
