aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/Cst816s.h
diff options
context:
space:
mode:
authorhubmartin <hub.martin@gmail.com>2021-09-16 22:04:31 +0200
committerhubmartin <hub.martin@gmail.com>2021-09-16 22:04:31 +0200
commit27366bdfdf05a5fd3128ad8eabedbeba720ca885 (patch)
tree94bf7fe9e60c7c88d269e207acb197915eb98660 /src/drivers/Cst816s.h
parentdb50131ed49f2fdb639799ca12839862340f8396 (diff)
parent3eb73774a39e255cd4b5de76441a59f1525a989c (diff)
Merge branch 'develop' into wake-time
Diffstat (limited to 'src/drivers/Cst816s.h')
-rw-r--r--src/drivers/Cst816s.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h
index 14c296ea..7b46c5d5 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 = true;
};
Cst816S(TwiMaster& twiMaster, uint8_t twiAddress);
@@ -39,25 +36,23 @@ namespace Pinetime {
void Wakeup();
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
+}