Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Raspberry Pi Pico detection for MicroPython #163

Merged
merged 1 commit into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def id(self):
board_id = boards.FEATHER_M0_EXPRESS
elif chip_id == chips.STM32F405:
board_id = boards.PYBOARD
elif chip_id == chips.RP2040:
board_id = boards.RASPBERRY_PI_PICO
elif chip_id == chips.S805:
board_id = boards.ODROID_C1
elif chip_id == chips.S905:
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def id(
if platform == "pyboard":
self._chip_id = chips.STM32F405
return self._chip_id
if platform == "rp2":
self._chip_id = chips.RP2040
return self._chip_id
# nothing found!
return None

Expand Down
1 change: 1 addition & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
GENERIC_LINUX_PC = "GENERIC_LINUX_PC"
PYBOARD = "PYBOARD"
NODEMCU = "NODEMCU"
RASPBERRY_PI_PICO = "RASPBERRY_PI_PICO"
GIANT_BOARD = "GIANT_BOARD"

# ASUS Tinker Boards
Expand Down
1 change: 1 addition & 0 deletions adafruit_platformdetect/constants/chips.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
RK3288 = "RK3288"
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
STM32F405 = "STM32F405"
RP2040 = "RP2040"
STM32MP157 = "STM32MP157"
MT8167 = "MT8167"
ATOM_X5_Z8350 = "X5-Z8350"
Expand Down