Skip to content

Commit c02578b

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

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ 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 = (
168+
self._armbian_id()
169+
or self._allwinner_variants_id()
170+
or self._orange_pi_id()
171+
)
168172
elif chip_id == chips.H616:
169173
board_id = self._armbian_id() or self._allwinner_variants_id()
170174
elif chip_id == chips.A33:
@@ -541,6 +545,8 @@ def _orange_pi_id(self) -> Optional[str]:
541545
return boards.ORANGE_PI_5
542546
if "Orange Pi 3B" in board_value:
543547
return boards.ORANGE_PI_3B
548+
if "OrangePi Zero 2W" in board_value:
549+
return boards.ORANGE_PI_ZERO_2W
544550
return None
545551

546552
# 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)