Skip to content

Commit 00973a2

Browse files
committed
Added support for Radxa Rock 5C
1 parent 715e573 commit 00973a2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,11 @@ def _rock_pi_id(self) -> Optional[str]:
636636
if self.detector.check_board_name_value() == "ROCK Pi X":
637637
board = boards.ROCK_PI_X
638638
if board_value and "ROCK 5" in board_value.upper():
639-
board = boards.ROCK_PI_5
639+
rock_board_value = board_value.upper()
640+
if "ROCK 5C" in rock_board_value:
641+
board = boards.ROCK_PI_5C
642+
else:
643+
board = boards.ROCK_PI_5
640644
if board_value and "RADXA ROCK 4C+" in board_value.upper():
641645
board = boards.ROCK_PI_4_C_PLUS
642646
if board_value and "RADXA ROCK 4SE" in board_value.upper():

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
ROCK_PI_X = "ROCK_PI_X"
207207
ROCK_PI_E = "ROCK_PI_E"
208208
ROCK_PI_5 = "ROCK_PI_5"
209+
ROCK_PI_5C = "ROCK_PI_5C"
209210

210211
GREATFET_ONE = "GREATFET_ONE"
211212

@@ -539,6 +540,7 @@
539540
RADXA_ZERO,
540541
RADXA_ZERO3,
541542
ROCK_PI_5,
543+
ROCK_PI_5C,
542544
RADXA_CM3,
543545
ROCK_PI_3A,
544546
ROCK_PI_3C,

0 commit comments

Comments
 (0)