Skip to content

Commit 2477c89

Browse files
authored
Merge pull request #281 from farski/ROC-RK3328-CC
Add Libre "Renegade" ROC-RK3328-CC compatibility
2 parents cd4800a + 66f7b39 commit 2477c89

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

adafruit_platformdetect/board.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def id(self) -> Optional[str]:
160160
elif chip_id == chips.RK3288:
161161
board_id = self._asus_tinker_board_id()
162162
elif chip_id == chips.RK3328:
163-
board_id = self._rock_pi_id()
163+
board_id = self._rock_pi_id() or self._libre_id()
164164
elif chip_id == chips.RK3566:
165165
board_id = self._rk3566_id()
166166
elif chip_id == chips.RK3568:
@@ -528,6 +528,14 @@ def _rock_pi_id(self) -> Optional[str]:
528528
board = boards.ROCK_PI_3A
529529
return board
530530

531+
def _libre_id(self) -> Optional[str]:
532+
"""Check what type of Libre Computer board."""
533+
board_value = self.detector.get_device_model()
534+
board = None
535+
if board_value and "Libre Computer ROC-RK3328-CC" in board_value:
536+
board = boards.ROC_RK3328_CC
537+
return board
538+
531539
def _clockwork_pi_id(self) -> Optional[str]:
532540
"""Check what type of Clockwork Pi board."""
533541
board_value = self.detector.get_device_model()

adafruit_platformdetect/constants/boards.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,10 @@
578578

579579
# Libre Computer Boards
580580
AML_S905X_CC = "AML-S905X-CC"
581+
ROC_RK3328_CC = "ROC-RK3328-CC"
581582

582583
# Libre Computer Boards
583-
_LIBRE_COMPUTER_IDS = (AML_S905X_CC,)
584+
_LIBRE_COMPUTER_IDS = (
585+
AML_S905X_CC,
586+
ROC_RK3328_CC,
587+
)

0 commit comments

Comments
 (0)