diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 55444e8..2a7a6fb 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -695,6 +695,9 @@ class Board: # Feather RP2040 CAN if product == 0x8130: return boards.FEATHER_CAN_U2IF + # KB2040 Kee Board + if product == 0x0105: + return boards.KB2040_U2IF # Will only reach here if a device was added in chip.py but here. raise RuntimeError("RP2040_U2IF device was added to chip but not board.") @@ -889,6 +892,7 @@ class Board: yield self.board.MACROPAD_U2IF yield self.board.QTPY_U2IF yield self.board.QT2040_TRINKEY_U2IF + yield self.board.KB2040_U2IF return any(condition for condition in lazily_generate_conditions()) @@ -997,6 +1001,11 @@ class Board: """Check whether the current board is a QT Py w/ u2if.""" return self.id == boards.QT2040_TRINKEY_U2IF + @property + def kb2040_u2if(self) -> bool: + """Check whether the current board is a KB2040 w/ u2if.""" + return self.id == boards.KB2040_U2IF + @property def binho_nova(self) -> bool: """Check whether the current board is an BINHO NOVA.""" diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index 3063caf..07b2b45 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -131,6 +131,7 @@ class Chip: 0x812C, 0x812E, 0x8130, + 0x0105, ) ): self._chip_id = chips.RP2040_U2IF diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 9b0bbc7..8188eb2 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -162,6 +162,7 @@ ITSYBITSY_U2IF = "ITSYBITSY_U2IF" MACROPAD_U2IF = "MACROPAD_U2IF" QTPY_U2IF = "QTPY_U2IF" QT2040_TRINKEY_U2IF = "QT2040_TRINKEY_U2IF" +KB2040_U2IF = "KB2040_U2IF" BINHO_NOVA = "BINHO_NOVA"