Skip to content

Commit 195069f

Browse files
committed
Add support for OrangePi Zero 2W
1 parent fa7d3b2 commit 195069f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def id(self) -> Optional[str]:
164164
elif chip_id == chips.T527:
165165
board_id = self._armbian_id() or self._allwinner_variants_id()
166166
elif chip_id == chips.H618:
167-
board_id = self._armbian_id() or self._allwinner_variants_id()
167+
board_id = self._armbian_id() or self._allwinner_variants_id() or self._orange_pi_id()
168168
elif chip_id == chips.H616:
169169
board_id = self._armbian_id() or self._allwinner_variants_id()
170170
elif chip_id == chips.A33:
@@ -541,6 +541,8 @@ def _orange_pi_id(self) -> Optional[str]:
541541
return boards.ORANGE_PI_5
542542
if "Orange Pi 3B" in board_value:
543543
return boards.ORANGE_PI_3B
544+
if "OrangePi Zero 2W" in board_value:
545+
return boards.ORANGE_PI_ZERO_2W
544546
return None
545547

546548
# pylint: enable=too-many-return-statements

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
ORANGE_PI_ZERO_PLUS_2H5 = "ORANGE_PI_ZERO_PLUS_2H5"
6161
ORANGE_PI_ZERO_PLUS = "ORANGE_PI_ZERO_PLUS"
6262
ORANGE_PI_ZERO_2 = "ORANGE_PI_ZERO_2"
63+
ORANGE_PI_ZERO_2W = "ORANGE_PI_ZERO_2W"
6364
ORANGE_PI_ZERO_3 = "ORANGE_PI_ZERO_3"
6465
ORANGE_PI_3 = "ORANGE_PI_3"
6566
ORANGE_PI_3B = "ORANGE_PI_3B"
@@ -317,6 +318,7 @@
317318
ORANGE_PI_ZERO_PLUS_2H5,
318319
ORANGE_PI_ZERO_PLUS,
319320
ORANGE_PI_ZERO_2,
321+
ORANGE_PI_ZERO_2W,
320322
ORANGE_PI_3,
321323
ORANGE_PI_3B,
322324
ORANGE_PI_3_LTS,

0 commit comments

Comments
 (0)