Skip to content

Commit 180e397

Browse files
authored
Merge pull request #397 from PleahMaCaka/rdk-x5
Added support for D-Robotics RDK-X5
2 parents a991a88 + 0ca46b6 commit 180e397

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def id(self) -> Optional[str]:
245245
board_id = self._rv1106_id()
246246
elif chip_id == chips.SUNRISE_X3:
247247
board_id = boards.RDK_X3
248+
elif chip_id == chips.SUNRISE_X5:
249+
board_id = boards.RDK_X5
248250
elif chip_id == chips.QCM6490:
249251
board_id = boards.PARTICLE_TACHYON
250252
self._board_id = board_id

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ def _linux_id(self) -> Optional[str]:
352352
if self.detector.check_dt_compatible_value("hobot,x3"):
353353
return chips.SUNRISE_X3
354354

355+
if self.detector.check_dt_compatible_value("Horizon, x5"):
356+
return chips.SUNRISE_X5
357+
355358
if self.detector.check_dt_compatible_value("particle,tachyon"):
356359
return chips.QCM6490
357360

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@
273273

274274
# Horizon
275275
RDK_X3 = "RDK_X3"
276+
RDK_X5 = "RDK_X5"
276277

277278
# Particle
278279
PARTICLE_TACHYON = "PARTICLE_TACHYON"
@@ -705,7 +706,7 @@
705706
)
706707

707708
# Horizon
708-
_HORIZON_IDS = (RDK_X3,)
709+
_HORIZON_IDS = (RDK_X3, RDK_X5)
709710

710711
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
711712

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
RZV2N = "RZV2N"
9191
RZV2H = "RZV2H"
9292
SUNRISE_X3 = "SUNRISE_X3"
93+
SUNRISE_X5 = "SUNRISE_X5"
9394
QCM6490 = "QCM6490"
9495

9596
BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}

bin/detect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,6 @@
125125

126126
if detector.board.any_walnutpi:
127127
print("Walnut Pi detected.")
128+
129+
if detector.board.any_horizon_board:
130+
print("Horizon detected.")

0 commit comments

Comments
 (0)