Skip to content

Commit 6e6d6f6

Browse files
authored
Merge pull request #60 from pdp7/master
add condition to detect BeagleBone Green
2 parents a6be564 + a6a280a commit 6e6d6f6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ def _beaglebone_id(self):
130130
if eeprom_bytes[:4] != b'\xaaU3\xee':
131131
return None
132132

133+
# special condition for BeagleBone Green rev. 1A
134+
# refer to GitHub issue #57 in this repo for more info
135+
if eeprom_bytes == b'\xaaU3\xeeA335BNLT\x1a\x00\x00\x00':
136+
return boards.BEAGLEBONE_GREEN
137+
133138
id_string = eeprom_bytes[4:].decode("ascii")
134139
for model, bb_ids in boards._BEAGLEBONE_BOARD_IDS.items():
135140
for bb_id in bb_ids:

bin/detect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
print("Is this a Pi 4B?", detector.board.RASPBERRY_PI_4B)
1414
print("Is this a 40-pin Raspberry Pi?", detector.board.any_raspberry_pi_40_pin)
1515
print("Is this a Raspberry Pi Compute Module?", detector.board.any_raspberry_pi_cm)
16-
print("Is this a BBB?", detector.board.BEAGLEBONE_BLACK)
16+
print("Is this a BeagleBone Black?", detector.board.BEAGLEBONE_BLACK)
17+
print("Is this a BeagleBone Green?", detector.board.BEAGLEBONE_GREEN)
1718
print("Is this a Giant Board?", detector.board.GIANT_BOARD)
1819
print("Is this a Coral Edge TPU?", detector.board.CORAL_EDGE_TPU_DEV)
1920
print("Is this a SiFive Unleashed? ", detector.board.SIFIVE_UNLEASHED)

0 commit comments

Comments
 (0)