From 034382b97e202b6655a58f240fbb32252fec2e2e Mon Sep 17 00:00:00 2001 From: johnnohj <166672127+johnnohj@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:14:09 -0400 Subject: [PATCH] Update board.py --- adafruit_platformdetect/board.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 7926720..c10a0be 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -832,8 +832,8 @@ class Board: # KB2040 Kee Board if product == 0x0105: return boards.KB2040_U2IF - if vendor == 0x2E8A and product == 0x111F: - return boards.WAVESHARE_RP2040_ONE_U2IF + if vendor == 0x2E8A and product == 0x103A: + return boards.RP2040_ONE_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.") @@ -1084,6 +1084,7 @@ class Board: yield self.board.QTPY_U2IF yield self.board.QT2040_TRINKEY_U2IF yield self.board.KB2040_U2IF + yield self.board.RP2040_ONE_U2IF yield self.board.OS_AGNOSTIC_BOARD return any(condition for condition in lazily_generate_conditions()) @@ -1212,6 +1213,10 @@ class Board: return self.id == boards.KB2040_U2IF @property + def rp2040_one_u2if(self) -> bool: + """Check whether the current board is an RP2040 One w/ u2if.""" + return self.id == boards.RP2040_ONE_U2IF + @property def binho_nova(self) -> bool: """Check whether the current board is an BINHO NOVA.""" return self.id == boards.BINHO_NOVA