Skip to content

Commit 3c7bed3

Browse files
committed
Support for Particle Tachyon
1 parent c9518b0 commit 3c7bed3

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def id(self) -> Optional[str]:
230230
board_id = self._rv1106_id()
231231
elif chip_id == chips.SUNRISE_X3:
232232
board_id = boards.RDK_X3
233+
elif chip_id == chips.QCM6490:
234+
board_id = boards.PARTICLE_TACHYON
233235
self._board_id = board_id
234236
return board_id
235237

@@ -1126,6 +1128,11 @@ def any_horizon_board(self):
11261128
"""Check whether the current board is any Horizon device."""
11271129
return self.id in boards._HORIZON_IDS
11281130

1131+
@property
1132+
def any_particle_board(self):
1133+
"""Check whether the current board is any Particle device."""
1134+
return self.id in boards._PARTICLE_IDS
1135+
11291136
@property
11301137
def os_environ_board(self) -> bool:
11311138
"""Check whether the current board is an OS environment variable special case."""
@@ -1198,6 +1205,7 @@ def lazily_generate_conditions():
11981205
yield self.any_vivid_unit
11991206
yield self.any_starfive_id
12001207
yield self.any_horizon_board
1208+
yield self.any_particle_board
12011209

12021210
return any(condition for condition in lazily_generate_conditions())
12031211

adafruit_platformdetect/chip.py

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

327+
if self.detector.check_dt_compatible_value("particle,tachyon"):
328+
return chips.QCM6490
329+
327330
linux_id = None
328331
hardware = self.detector.get_cpuinfo_field("Hardware")
329332

adafruit_platformdetect/constants/boards.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@
257257
# Horizon
258258
RDK_X3 = "RDK_X3"
259259

260+
# Particle
261+
PARTICLE_TACHYON = "PARTICLE_TACHYON"
262+
260263
# StarFive boards
261264
_STARFIVE_BOARD_IDS = (VISIONFIVE2,)
262265
# Asus Tinkerboard
@@ -666,5 +669,8 @@
666669

667670
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
668671

672+
# Particle
673+
_PARTICLE_IDS = (PARTICLE_TACHYON,)
674+
669675
# Agnostic board
670676
OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
TH1520 = "TH1520"
8383
K1 = "K1"
8484
SUNRISE_X3 = "SUNRISE_X3"
85+
QCM6490 = "QCM6490"
8586

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

0 commit comments

Comments
 (0)