Skip to content

WIP: first pass at switching up pi 1 revision detection #5

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

Merged
merged 1 commit into from
Dec 21, 2018
Merged
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
28 changes: 15 additions & 13 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
NODEMCU = "NODEMCU"
ORANGE_PI_PC = "ORANGE_PI_PC"

RASPBERRY_PI_B = "RASPBERRY_PI_B"
RASPBERRY_PI_B_REV1 = "RASPBERRY_PI_B_REV1"
RASPBERRY_PI_B_REV2 = "RASPBERRY_PI_B_REV2"
RASPBERRY_PI_B_PLUS = "RASPBERRY_PI_B_PLUS"
RASPBERRY_PI_A = "RASPBERRY_PI_A"
RASPBERRY_PI_A_PLUS = "RASPBERRY_PI_A_PLUS"
Expand All @@ -40,6 +41,17 @@
RASPBERRY_PI_3A_PLUS = "RASPBERRY_PI_3A_PLUS"
# pylint: enable=bad-whitespace

_RASPBERRY_PI_40_PIN_IDS = (
RASPBERRY_PI_B_PLUS,
RASPBERRY_PI_A_PLUS,
RASPBERRY_PI_ZERO,
RASPBERRY_PI_ZERO_W,
RASPBERRY_PI_2B,
RASPBERRY_PI_3B,
RASPBERRY_PI_3B_PLUS,
RASPBERRY_PI_3A_PLUS
)

_BEAGLEBONE_IDS = (
BEAGLEBONE,
BEAGLEBONE_BLACK,
Expand All @@ -58,17 +70,6 @@
OSD3358_SM_RED,
)

_RASPBERRY_PI_40_PIN_IDS = (
RASPBERRY_PI_B_PLUS,
RASPBERRY_PI_A_PLUS,
RASPBERRY_PI_ZERO,
RASPBERRY_PI_ZERO_W,
RASPBERRY_PI_2B,
RASPBERRY_PI_3B,
RASPBERRY_PI_3B_PLUS,
RASPBERRY_PI_3A_PLUS
)

# BeagleBone eeprom board ids from:
# https://github.com/beagleboard/image-builder
# Thanks to zmatt on freenode #beagle for pointers.
Expand Down Expand Up @@ -138,7 +139,8 @@
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md

_PI_REV_CODES = {
RASPBERRY_PI_B: ('0002', '0003', '0004', '0005', '0006', '000d', '000e', '000f'),
RASPBERRY_PI_B_REV1: ('0002', '0003'),
RASPBERRY_PI_B_REV2: ('0005', '0006', '000d', '000e', '000f'),
RASPBERRY_PI_B_PLUS: ('0010', '0013', '900032'),
RASPBERRY_PI_A: ('0007', '0008', '0009'),
RASPBERRY_PI_A_PLUS: ('0012', '0015', '900021'),
Expand Down