Skip to content

Commit

Permalink
Merge pull request #272 from etrevis/main
Browse files Browse the repository at this point in the history
Add Rock Pi 3A compatibility
  • Loading branch information
makermelissa authored Jan 30, 2023
2 parents 11b7e58 + 94c5e95 commit 67c8a46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ def _armbian_id(self) -> Optional[str]:
board = boards.PCDUINO2
elif board_value == "pcduino3":
board = boards.PCDUINO3

elif board_value == "rock-3a":
board = boards.ROCK_PI_3A
return board

# pylint: enable=too-many-return-statements
Expand Down Expand Up @@ -499,6 +500,8 @@ def _rk3568_id(self) -> Optional[str]:
board = None
if board_value and "LubanCat2" in board_value:
board = boards.LUBANCAT2
if board_value and "ROCK3 Model A" in board_value:
board = boards.ROCK_PI_3A
return board

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

def _clockwork_pi_id(self) -> Optional[str]:
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
RADXA_ZERO = "RADXA_ZERO"
RADXA_CM3 = "RADXA_CM3"

ROCK_PI_3A = "ROCK_PI_3A"
ROCK_PI_S = "ROCK_PI_S"
ROCK_PI_4 = "ROCK_PI_4"
ROCK_PI_4_C_PLUS = "ROCK_PI_4C+"
Expand Down Expand Up @@ -550,6 +551,7 @@
RADXA_ZERO,
ROCK_PI_5,
RADXA_CM3,
ROCK_PI_3A,
)

# UDOO
Expand Down

0 comments on commit 67c8a46

Please sign in to comment.