Skip to content

Added support for ATtiny416 #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion adafruit_seesaw/seesaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def const(x):
_TOUCH_CHANNEL_OFFSET = const(0x10)

_SAMD09_HW_ID_CODE = const(0x55)
_ATTINY416_HW_ID_CODE = const(0x46)
_ATTINY806_HW_ID_CODE = const(0x84)
_ATTINY807_HW_ID_CODE = const(0x85)
_ATTINY816_HW_ID_CODE = const(0x86)
Expand Down Expand Up @@ -150,6 +151,7 @@ def __init__(self, i2c_bus, addr=0x49, drdy=None, reset=True):

self.chip_id = self.read8(_STATUS_BASE, _STATUS_HW_ID)
if self.chip_id not in (
_ATTINY416_HW_ID_CODE,
_ATTINY806_HW_ID_CODE,
_ATTINY807_HW_ID_CODE,
_ATTINY816_HW_ID_CODE,
Expand All @@ -175,7 +177,12 @@ def __init__(self, i2c_bus, addr=0x49, drdy=None, reset=True):
self.pin_mapping = MM1_Pinmap
elif (pid in (_5690_PID, _5681_PID, _5743_PID)) or (
self.chip_id
in (_ATTINY816_HW_ID_CODE, _ATTINY806_HW_ID_CODE, _ATTINY1616_HW_ID_CODE)
in (
_ATTINY416_HW_ID_CODE,
_ATTINY816_HW_ID_CODE,
_ATTINY806_HW_ID_CODE,
_ATTINY1616_HW_ID_CODE,
)
):
from adafruit_seesaw.attinyx16 import ATtinyx16_Pinmap

Expand Down Expand Up @@ -446,6 +453,7 @@ def _get_eeprom_i2c_addr(self):
"""Return the EEPROM address used to store I2C address."""
chip_id = self.chip_id
if chip_id in (
_ATTINY416_HW_ID_CODE,
_ATTINY806_HW_ID_CODE,
_ATTINY807_HW_ID_CODE,
_ATTINY816_HW_ID_CODE,
Expand Down