Skip to content

Commit 84c6bcb

Browse files
committed
neopixel_write: Use new pio-based code on pi5
1 parent b91d3fc commit 84c6bcb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0"]
3838
# Pi 5
3939
if b"brcm,bcm2712" in compat:
40-
board_reqs = ["rpi_ws281x>=4.0.0", "rpi-lgpio"]
40+
board_reqs = ["rpi_ws281x>=4.0.0", "rpi-lgpio", "Adafruit-Blinka-Raspberry-Pi5-Neopixel"]
4141
if (
4242
b"ti,am335x" in compat
4343
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.

src/neopixel_write.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
# pylint: disable=too-many-boolean-expressions
1414
import sys
1515

16-
from adafruit_blinka.agnostic import detector
16+
from adafruit_blinka.agnostic import detector, board_id
1717

1818
if detector.board.any_raspberry_pi:
19-
from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel
19+
if board_id == "RASPBERRY_PI_5":
20+
import adafruit_raspberry_pi5_neopixel_write as _neopixel
21+
else:
22+
from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel
2023
elif detector.board.pico_u2if:
2124
from adafruit_blinka.microcontroller.rp2040_u2if import neopixel as _neopixel
2225
elif detector.board.OS_AGNOSTIC_BOARD:

0 commit comments

Comments
 (0)