summaryrefslogtreecommitdiff
path: root/src/drivers/Cst816s.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-10-27 21:55:18 +0100
committerJF <jf@codingfield.com>2020-10-27 21:55:18 +0100
commit7de43a16608e599369867cb3cfa7d5776a5b6380 (patch)
tree1750edfed02f547102e468eca485caab3b08e98d /src/drivers/Cst816s.cpp
parent5983e33b8d7702800dc91a3229b9a7cee75eb006 (diff)
parentc5bf09d21b2ed8e2435ec625e351594f58713924 (diff)
Fix conflicts
Diffstat (limited to 'src/drivers/Cst816s.cpp')
-rw-r--r--src/drivers/Cst816s.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/Cst816s.cpp b/src/drivers/Cst816s.cpp
index f6816545..94db3b34 100644
--- a/src/drivers/Cst816s.cpp
+++ b/src/drivers/Cst816s.cpp
@@ -37,7 +37,9 @@ void Cst816S::Init() {
Cst816S::TouchInfos Cst816S::GetTouchInfo() {
Cst816S::TouchInfos info;
- twiMaster.Read(twiAddress, 0, touchData, 63);
+ auto ret = twiMaster.Read(twiAddress, 0, touchData, 63);
+ if(ret != TwiMaster::ErrorCodes::NoError) return {};
+
auto nbTouchPoints = touchData[2] & 0x0f;
// uint8_t i = 0;