Skip to content

Commit 4f0e22e

Browse files
committed
add coral edge tpu dev board code name "Phanbell"
1 parent b743d14 commit 4f0e22e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,16 @@
2828
ORANGE_PI_PC = "ORANGE_PI_PC"
2929
GIANT_BOARD = "GIANT_BOARD"
3030

31+
# NVIDIA Jetson boards
3132
JETSON_TX1 = 'JETSON_TX1'
3233
JETSON_TX2 = 'JETSON_TX2'
3334
JETSON_XAVIER = 'JETSON_XAVIER'
3435
JETSON_NANO = 'JETSON_NANO'
3536

37+
# Google Coral dev board
38+
CORAL_EDGE_TPU_DEV = "CORAL_EDGE_TPU_DEV"
39+
40+
# Various Raspberry Pi models
3641
RASPBERRY_PI_B_REV1 = "RASPBERRY_PI_B_REV1"
3742
RASPBERRY_PI_B_REV2 = "RASPBERRY_PI_B_REV2"
3843
RASPBERRY_PI_B_PLUS = "RASPBERRY_PI_B_PLUS"
@@ -54,6 +59,10 @@
5459
FTDI_FT232H = "FT232H"
5560
# pylint: enable=bad-whitespace
5661

62+
_CORAL_IDS = (
63+
CORAL_EDGE_TPU_DEV,
64+
)
65+
5766
_JETSON_IDS = (
5867
JETSON_TX1,
5968
JETSON_TX2,
@@ -259,6 +268,8 @@ def id(self):
259268
board_id = self._armbian_id()
260269
elif chip_id == ap_chip.SAMA5:
261270
board_id = self._sama5_id()
271+
elif chip_id == ap_chip.IMX8MX:
272+
board_id = self._imx8mx_id()
262273
elif chip_id == ap_chip.ESP8266:
263274
board_id = FEATHER_HUZZAH
264275
elif chip_id == ap_chip.SAMD21:
@@ -332,6 +343,13 @@ def _sama5_id(self):
332343
return GIANT_BOARD
333344
return None
334345

346+
def _imx8mx_id(self):
347+
"""Check what type iMX8M board."""
348+
board_value = self.detector.get_device_model()
349+
if "Phanbell" in board_value:
350+
return CORAL_EDGE_TPU_DEV
351+
return None
352+
335353
def _tegra_id(self):
336354
"""Try to detect the id of aarch64 board."""
337355
board_value = self.detector.get_device_model()

bin/detect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
print("Is this a BBB?", detector.board.BEAGLEBONE_BLACK)
1414
print("Is this an Orange Pi PC?", detector.board.ORANGE_PI_PC)
1515
print("Is this a Giant Board?", detector.board.GIANT_BOARD)
16+
print("Is this a Coral Edge TPU?", detector.board.CORAL_EDGE_TPU_DEV)
1617
print("Is this an embedded Linux system?", detector.board.any_embedded_linux)
1718
print("Is this a generic Linux PC?", detector.board.GENERIC_LINUX_PC)
1819

0 commit comments

Comments
 (0)