summaryrefslogtreecommitdiff
path: root/include/driver
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-05-26 09:36:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-05-26 09:36:26 +0200
commit965aa3eec1b6da26848d47f8b4fb591f0bc53709 (patch)
tree23bcf4179f1e72081877e67868b28ac413d8f7a0 /include/driver
parent0e79b4fd86cb79538ff916e625b37c98c34828b1 (diff)
sen5x: verify crc when reading data
Diffstat (limited to 'include/driver')
-rw-r--r--include/driver/sen5x.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/driver/sen5x.h b/include/driver/sen5x.h
index 47d92a0..bc7b54b 100644
--- a/include/driver/sen5x.h
+++ b/include/driver/sen5x.h
@@ -13,6 +13,9 @@ class SEN5x {
unsigned char txbuf[2];
unsigned char rxbuf[24];
+ unsigned char crcWord(unsigned char byte1, unsigned char byte2);
+ bool crcValid(unsigned char* data, unsigned char length);
+
public:
SEN5x() {}