Skip to content

Commit 11b7869

Browse files
authored
Merge pull request #390 from technobly/for-upstream
Support for Particle Tachyon
2 parents 80ec116 + 16e3e94 commit 11b7869

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
@@ -243,6 +243,8 @@ def id(self) -> Optional[str]:
243243
board_id = self._rv1106_id()
244244
elif chip_id == chips.SUNRISE_X3:
245245
board_id = boards.RDK_X3
246+
elif chip_id == chips.QCM6490:
247+
board_id = boards.PARTICLE_TACHYON
246248
self._board_id = board_id
247249
return board_id
248250

@@ -1198,6 +1200,11 @@ def any_horizon_board(self):
11981200
"""Check whether the current board is any Horizon device."""
11991201
return self.id in boards._HORIZON_IDS
12001202

1203+
@property
1204+
def any_particle_board(self):
1205+
"""Check whether the current board is any Particle device."""
1206+
return self.id in boards._PARTICLE_IDS
1207+
12011208
@property
12021209
def os_environ_board(self) -> bool:
12031210
"""Check whether the current board is an OS environment variable special case."""
@@ -1272,6 +1279,7 @@ def lazily_generate_conditions():
12721279
yield self.any_vivid_unit
12731280
yield self.any_starfive_id
12741281
yield self.any_horizon_board
1282+
yield self.any_particle_board
12751283

12761284
return any(condition for condition in lazily_generate_conditions())
12771285

adafruit_platformdetect/chip.py

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

352+
if self.detector.check_dt_compatible_value("particle,tachyon"):
353+
return chips.QCM6490
354+
352355
linux_id = None
353356
hardware = self.detector.get_cpuinfo_field("Hardware")
354357

adafruit_platformdetect/constants/boards.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@
270270
# Horizon
271271
RDK_X3 = "RDK_X3"
272272

273+
# Particle
274+
PARTICLE_TACHYON = "PARTICLE_TACHYON"
275+
273276
# StarFive boards
274277
_STARFIVE_BOARD_IDS = (VISIONFIVE2,)
275278
# Asus Tinkerboard
@@ -688,5 +691,8 @@
688691

689692
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
690693

694+
# Particle
695+
_PARTICLE_IDS = (PARTICLE_TACHYON,)
696+
691697
# Agnostic board
692698
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
@@ -87,6 +87,7 @@
8787
RZV2N = "RZV2N"
8888
RZV2H = "RZV2H"
8989
SUNRISE_X3 = "SUNRISE_X3"
90+
QCM6490 = "QCM6490"
9091

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

0 commit comments

Comments
 (0)