diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 6690fbc..872435d 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -896,6 +896,8 @@ def _rp2040_u2if_id(self) -> Optional[str]: product = dev["product_id"] if vendor == 0xCAFE and product == 0x4005: return boards.PICO_U2IF + if vendor == 0xCAFF and product == 0x4005: + return boards.RADXA_X4_U2IF if vendor == 0x239A: # Feather RP2040 if product == 0x00F1: @@ -1203,6 +1205,7 @@ def lazily_generate_conditions(): yield self.board.QT2040_TRINKEY_U2IF yield self.board.KB2040_U2IF yield self.board.RP2040_ONE_U2IF + yield self.board.RADXA_X4_U2IF yield self.board.OS_AGNOSTIC_BOARD return any(condition for condition in lazily_generate_conditions()) @@ -1342,6 +1345,11 @@ 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 radxa_x4_u2if(self) -> bool: + """Check whether the current board is an RP2040 One w/ u2if.""" + return self.id == boards.RADXA_X4_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 e3d950e..0eba6bc 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -125,7 +125,8 @@ def id( if ( ( # Raspberry Pi Pico - vendor == 0xCAFE + # Radxa X4 + vendor in (0xCAFE, 0xCAFF) and product == 0x4005 ) or ( diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index f5024f2..de34414 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -195,6 +195,7 @@ KB2040_U2IF = "KB2040_U2IF" RP2040_ONE_U2IF = "RP2040_ONE_U2IF" +RADXA_X4_U2IF = "RADXA_X4_U2IF" BINHO_NOVA = "BINHO_NOVA"