Skip to content

Commit 7711eca

Browse files
committed
Added Onion Omega2 detection
1 parent 1819e60 commit 7711eca

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
BINHO_NOVA = "BINHO_NOVA"
7272

7373
ONION_OMEGA = "ONION_OMEGA"
74-
ONION_OMEGA2 = "ONION_OMEGA2"
74+
ONION_OMEGA2 = "ONION_OMEGA2"
7575

7676
# pylint: enable=bad-whitespace
7777

@@ -354,6 +354,8 @@ def id(self):
354354
board_id = BINHO_NOVA
355355
elif chip_id == ap_chip.MIPS24KC:
356356
board_id = ONION_OMEGA
357+
elif chip_id == ap_chip.MIPS24KEC:
358+
board_id = ONION_OMEGA2
357359
return board_id
358360
# pylint: enable=invalid-name
359361

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
MCP2221 = "MCP2221"
2424
BINHO = "BINHO"
2525
MIPS24KC = "MIPS24KC"
26+
MIPS24KEC = "MIPS24KEC"
2627

2728
class Chip:
2829
"""Attempt detection of current chip / CPU."""
@@ -108,6 +109,8 @@ def _linux_id(self): # pylint: disable=too-many-branches
108109

109110
if "MIPS 24Kc" in cpu_model:
110111
linux_id = MIPS24KC
112+
elif "MIPS 24KEc" in cpu_model:
113+
linux_id = MIPS24KEC
111114

112115
elif hardware in ("BCM2708", "BCM2709", "BCM2835"):
113116
linux_id = BCM2XXX

0 commit comments

Comments
 (0)