Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions adafruit_cst8xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
_CST_REG_CHIPTYPE = const(0xAA)

_CHIP_ID_CST826 = const(0x11)
_CHIP_ID_CST836 = const(0x13)

# Untested Chip IDs which may use different registers
# If future chips do use different registers, it would be best to
Expand Down Expand Up @@ -89,6 +90,10 @@ def __init__(self, i2c, address=_CST_DEFAULT_I2C_ADDR, debug=False, irq_pin=None
# this is a CST826
if debug:
print("CST826 chip found")
elif chip_data[5] in {_CHIP_ID_CST836}:
# this is a CST826
if debug:
print("CST836 chip found")
else:
raise RuntimeError("Did not find supported CST8XX chip")

Expand Down