Skip to content
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

Added support for ATtiny416 #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 7 additions & 3 deletions Adafruit_seesaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bool Adafruit_seesaw::begin(uint8_t addr, int8_t flow, bool reset) {
if ((c == SEESAW_HW_ID_CODE_SAMD09) || (c == SEESAW_HW_ID_CODE_TINY817) ||
(c == SEESAW_HW_ID_CODE_TINY807) || (c == SEESAW_HW_ID_CODE_TINY816) ||
(c == SEESAW_HW_ID_CODE_TINY806) || (c == SEESAW_HW_ID_CODE_TINY1616) ||
(c == SEESAW_HW_ID_CODE_TINY1617)) {
(c == SEESAW_HW_ID_CODE_TINY1617) || (c == SEESAW_HW_ID_CODE_TINY416)) {
found = true;
_hardwaretype = c;
}
Expand Down Expand Up @@ -328,7 +328,8 @@ uint16_t Adafruit_seesaw::analogRead(uint8_t pin) {
default:
return 0;
}
} else if ((_hardwaretype == SEESAW_HW_ID_CODE_TINY807) ||
} else if ((_hardwaretype == SEESAW_HW_ID_CODE_TINY416) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY807) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY817) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY816) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY806) ||
Expand Down Expand Up @@ -527,6 +528,7 @@ void Adafruit_seesaw::analogWrite(uint8_t pin, uint16_t value, uint8_t width) {
return;
}
} else if ((_hardwaretype == SEESAW_HW_ID_CODE_SAMD09) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY416) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY817) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY807) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY816) ||
Expand Down Expand Up @@ -581,7 +583,8 @@ void Adafruit_seesaw::setPWMFreq(uint8_t pin, uint16_t freq) {
default:
break;
}
} else if ((_hardwaretype == SEESAW_HW_ID_CODE_TINY817) ||
} else if ((_hardwaretype == SEESAW_HW_ID_CODE_TINY416) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY817) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY807) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY816) ||
(_hardwaretype == SEESAW_HW_ID_CODE_TINY806) ||
Expand Down Expand Up @@ -653,6 +656,7 @@ uint8_t Adafruit_seesaw::getI2CaddrEEPROMloc() {
switch (_hardwaretype) {
case SEESAW_HW_ID_CODE_SAMD09:
return 0x3F;
case SEESAW_HW_ID_CODE_TINY416:
case SEESAW_HW_ID_CODE_TINY817:
case SEESAW_HW_ID_CODE_TINY807:
case SEESAW_HW_ID_CODE_TINY816:
Expand Down
1 change: 1 addition & 0 deletions Adafruit_seesaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ enum {
/*=========================================================================*/
// clang-format off
#define SEESAW_HW_ID_CODE_SAMD09 0x55 ///< seesaw HW ID code for SAMD09
#define SEESAW_HW_ID_CODE_TINY416 0x46 ///< seesaw HW ID code for ATtiny416
#define SEESAW_HW_ID_CODE_TINY806 0x84 ///< seesaw HW ID code for ATtiny806
#define SEESAW_HW_ID_CODE_TINY807 0x85 ///< seesaw HW ID code for ATtiny807
#define SEESAW_HW_ID_CODE_TINY816 0x86 ///< seesaw HW ID code for ATtiny816
Expand Down
Loading