Skip to content

Commit d7ce69c

Browse files
committed
Add support for the CST836
1 parent 1fbb0a0 commit d7ce69c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_cst8xx.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
_CST_REG_CHIPTYPE = const(0xAA)
5454

5555
_CHIP_ID_CST826 = const(0x11)
56+
_CHIP_ID_CST836 = const(0x13)
5657

5758
# Untested Chip IDs which may use different registers
5859
# If future chips do use different registers, it would be best to
@@ -80,7 +81,7 @@ def __init__(self, i2c, address=_CST_DEFAULT_I2C_ADDR, debug=False, irq_pin=None
8081
fw_version, _, _, chip_type = struct.unpack("<HBBH", chip_data)
8182
print("fw_version: {:02X}, chip_type: {:02X}".format(fw_version, chip_type))
8283

83-
if chip_type not in (_CHIP_ID_CST826,):
84+
if chip_type not in (_CHIP_ID_CST826, _CHIP_ID_CST836):
8485
raise RuntimeError("Did not find CST8XX chip")
8586

8687
if debug:

0 commit comments

Comments
 (0)