|
24 | 24 | if os.path.exists("/proc/device-tree/compatible"):
|
25 | 25 | with open("/proc/device-tree/compatible", "rb") as f:
|
26 | 26 | compat = f.read()
|
| 27 | + # Jetson Nano, TX2, Xavier, etc |
27 | 28 | if b"nvidia,tegra" in compat:
|
28 | 29 | board_reqs = ["Jetson.GPIO"]
|
| 30 | + # Pi 5 |
| 31 | + elif b"brcm,bcm2712" in compat: |
| 32 | + board_reqs = [ |
| 33 | + "rpi_ws281x>=4.0.0", |
| 34 | + "rpi-lgpio", |
| 35 | + "Adafruit-Blinka-Raspberry-Pi5-Neopixel", |
| 36 | + ] |
29 | 37 | # Pi 4 and Earlier
|
30 |
| - if ( |
| 38 | + elif ( |
31 | 39 | b"brcm,bcm2835" in compat
|
32 | 40 | or b"brcm,bcm2836" in compat
|
33 | 41 | or b"brcm,bcm2837" in compat
|
34 | 42 | or b"brcm,bcm2838" in compat
|
35 | 43 | or b"brcm,bcm2711" in compat
|
36 | 44 | ):
|
37 | 45 | board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0"]
|
38 |
| - # Pi 5 |
39 |
| - if b"brcm,bcm2712" in compat: |
40 |
| - board_reqs = [ |
41 |
| - "rpi_ws281x>=4.0.0", |
42 |
| - "rpi-lgpio", |
43 |
| - "Adafruit-Blinka-Raspberry-Pi5-Neopixel", |
44 |
| - ] |
45 |
| - if ( |
| 46 | + # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc. |
| 47 | + elif ( |
46 | 48 | b"ti,am335x" in compat
|
47 |
| - ): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc. |
| 49 | + ): |
48 | 50 | board_reqs = ["Adafruit_BBIO"]
|
49 | 51 |
|
50 | 52 | setup(
|
|
0 commit comments