Update board.py

This commit is contained in:
johnnohj 2024-08-07 16:14:09 -04:00 committed by GitHub
parent c49370196b
commit 034382b97e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -832,8 +832,8 @@ class Board:
# KB2040 Kee Board # KB2040 Kee Board
if product == 0x0105: if product == 0x0105:
return boards.KB2040_U2IF return boards.KB2040_U2IF
if vendor == 0x2E8A and product == 0x111F: if vendor == 0x2E8A and product == 0x103A:
return boards.WAVESHARE_RP2040_ONE_U2IF return boards.RP2040_ONE_U2IF
# Will only reach here if a device was added in chip.py but here. # 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.") 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.QTPY_U2IF
yield self.board.QT2040_TRINKEY_U2IF yield self.board.QT2040_TRINKEY_U2IF
yield self.board.KB2040_U2IF yield self.board.KB2040_U2IF
yield self.board.RP2040_ONE_U2IF
yield self.board.OS_AGNOSTIC_BOARD yield self.board.OS_AGNOSTIC_BOARD
return any(condition for condition in lazily_generate_conditions()) return any(condition for condition in lazily_generate_conditions())
@ -1212,6 +1213,10 @@ class Board:
return self.id == boards.KB2040_U2IF return self.id == boards.KB2040_U2IF
@property @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: def binho_nova(self) -> bool:
"""Check whether the current board is an BINHO NOVA.""" """Check whether the current board is an BINHO NOVA."""
return self.id == boards.BINHO_NOVA return self.id == boards.BINHO_NOVA