Skip to content

Commit 67c8a46

Browse files
authored
Merge pull request #272 from etrevis/main
Add Rock Pi 3A compatibility
2 parents 11b7e58 + 94c5e95 commit 67c8a46

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ def _armbian_id(self) -> Optional[str]:
368368
board = boards.PCDUINO2
369369
elif board_value == "pcduino3":
370370
board = boards.PCDUINO3
371-
371+
elif board_value == "rock-3a":
372+
board = boards.ROCK_PI_3A
372373
return board
373374

374375
# pylint: enable=too-many-return-statements
@@ -499,6 +500,8 @@ def _rk3568_id(self) -> Optional[str]:
499500
board = None
500501
if board_value and "LubanCat2" in board_value:
501502
board = boards.LUBANCAT2
503+
if board_value and "ROCK3 Model A" in board_value:
504+
board = boards.ROCK_PI_3A
502505
return board
503506

504507
def _rock_pi_id(self) -> Optional[str]:
@@ -517,6 +520,8 @@ def _rock_pi_id(self) -> Optional[str]:
517520
board = boards.ROCK_PI_5
518521
if board_value and "RADXA ROCK 4C+" in board_value.upper():
519522
board = boards.ROCK_PI_4_C_PLUS
523+
if board_value and "ROCK3 Model A" in board_value:
524+
board = boards.ROCK_PI_3A
520525
return board
521526

522527
def _clockwork_pi_id(self) -> Optional[str]:

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
RADXA_ZERO = "RADXA_ZERO"
167167
RADXA_CM3 = "RADXA_CM3"
168168

169+
ROCK_PI_3A = "ROCK_PI_3A"
169170
ROCK_PI_S = "ROCK_PI_S"
170171
ROCK_PI_4 = "ROCK_PI_4"
171172
ROCK_PI_4_C_PLUS = "ROCK_PI_4C+"
@@ -550,6 +551,7 @@
550551
RADXA_ZERO,
551552
ROCK_PI_5,
552553
RADXA_CM3,
554+
ROCK_PI_3A,
553555
)
554556

555557
# UDOO

0 commit comments

Comments
 (0)