Use platform detect to see if board is Pi5

This commit is contained in:
Melissa LeBlanc-Williams 2025-03-04 12:15:29 -08:00
parent 41516d60bf
commit 03c93a553d

View file

@ -697,6 +697,14 @@ class Shell:
detector = adafruit_platformdetect.Detector() detector = adafruit_platformdetect.Detector()
return detector.board.id return detector.board.id
@staticmethod
def is_pi5_or_newer():
"""
Use PlatformDetect to check if this is a Raspberry Pi 5 or newer
"""
detector = adafruit_platformdetect.Detector()
return detector.board.any_raspberry_pi_5_board
@staticmethod @staticmethod
def get_architecture(): def get_architecture():
""" """