Skip to content

Commit

Permalink
Merge pull request #7 from crazyquark/master
Browse files Browse the repository at this point in the history
Proposal for ODROID C1/C2 support
  • Loading branch information
ladyada authored Dec 22, 2018
2 parents d7cfe7f + 883642d commit 0f122a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
RASPBERRY_PI_3B_PLUS = "RASPBERRY_PI_3B_PLUS"
RASPBERRY_PI_CM3 = "RASPBERRY_PI_CM3"
RASPBERRY_PI_3A_PLUS = "RASPBERRY_PI_3A_PLUS"

ODROID_C1 = "ODROID_C1"
ODROID_C1_PLUS = "ODROID_C1_PLUS"
ODROID_C2 = "ODROID_C2"
# pylint: enable=bad-whitespace

_RASPBERRY_PI_40_PIN_IDS = (
Expand All @@ -52,6 +56,12 @@
RASPBERRY_PI_3A_PLUS
)

_ODROID_40_PIN_IDS = (
ODROID_C1,
ODROID_C1_PLUS,
ODROID_C2
)

_BEAGLEBONE_IDS = (
BEAGLEBONE,
BEAGLEBONE_BLACK,
Expand Down Expand Up @@ -181,6 +191,10 @@ def id(self):
board_id = FEATHER_M0_EXPRESS
elif chip_id == ap_chip.STM32:
board_id = PYBOARD
elif chip_id == ap_chip.S805:
board_id = ODROID_C1
elif chip_id == ap_chip.S905:
board_id = ODROID_C2

return board_id
# pylint: enable=invalid-name
Expand Down
6 changes: 6 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
SAMD21 = "SAMD21"
STM32 = "STM32"
SUN8I = "SUN8I"
S805 = "S805"
S905 = "S905"
GENERIC_X86 = "GENERIC_X86"

class Chip:
Expand Down Expand Up @@ -46,6 +48,10 @@ def _linux_id(self):
linux_id = AM33XX
elif "sun8i" in hardware:
linux_id = SUN8I
elif "ODROIDC" in hardware:
linux_id = S805
elif "ODROID-C2" in hardware:
linux_id = S905

return linux_id

Expand Down

0 comments on commit 0f122a7

Please sign in to comment.