Skip to content

Commit 50a11a7

Browse files
committed
update CST816S touch driver
1 parent 0ca8502 commit 50a11a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api_drivers/common_api_drivers/indev/cst816s.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
_ChipID = const(0xA7)
4343
_ChipIDValue = const(0xB5)
44+
_ChipIDValue2 = const(0xB6)
4445

4546
_ProjID = const(0xA8)
4647
_FwVersion = const(0xA9)
@@ -205,7 +206,7 @@ def __init__(
205206
self._read_reg(_FwVersion)
206207
print('FW Version:', hex(self._rx_buf[0]))
207208

208-
if chip_id != _ChipIDValue:
209+
if chip_id not in (_ChipIDValue, _ChipIDValue2):
209210
raise RuntimeError(f'Incorrect chip id ({hex(_ChipIDValue)})')
210211

211212
self._write_reg(_IrqCtl, _EnTouch | _EnChange)

0 commit comments

Comments
 (0)