Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neopixel_write: Use new pio-based code on pi5 #917

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0"]
# Pi 5
if b"brcm,bcm2712" in compat:
board_reqs = ["rpi_ws281x>=4.0.0", "rpi-lgpio"]
board_reqs = [
"rpi_ws281x>=4.0.0",
"rpi-lgpio",
"Adafruit-Blinka-Raspberry-Pi5-Neopixel",
]
if (
b"ti,am335x" in compat
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.
Expand Down
9 changes: 6 additions & 3 deletions src/neopixel_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@

* Author(s): ladyada
"""
# pylint: disable=too-many-boolean-expressions
# pylint: disable=too-many-boolean-expressions, ungrouped-imports
import sys

from adafruit_blinka.agnostic import detector
from adafruit_blinka.agnostic import detector, board_id

if detector.board.any_raspberry_pi:
from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel
if board_id == "RASPBERRY_PI_5":
import adafruit_raspberry_pi5_neopixel_write as _neopixel
else:
from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel
elif detector.board.pico_u2if:
from adafruit_blinka.microcontroller.rp2040_u2if import neopixel as _neopixel
elif detector.board.OS_AGNOSTIC_BOARD:
Expand Down
Loading