Skip to content

Commit 03c93a5

Browse files
committed
Use platform detect to see if board is Pi5
1 parent 41516d6 commit 03c93a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

adafruit_shell.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,14 @@ def get_board_model():
697697
detector = adafruit_platformdetect.Detector()
698698
return detector.board.id
699699

700+
@staticmethod
701+
def is_pi5_or_newer():
702+
"""
703+
Use PlatformDetect to check if this is a Raspberry Pi 5 or newer
704+
"""
705+
detector = adafruit_platformdetect.Detector()
706+
return detector.board.any_raspberry_pi_5_board
707+
700708
@staticmethod
701709
def get_architecture():
702710
"""

0 commit comments

Comments
 (0)