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

Update Blinka to use rpi-lgpio for PWM #797

Merged
merged 2 commits into from Mar 19, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions setup.py
Expand Up @@ -10,7 +10,6 @@

import io
import os
import sys

from setuptools import setup, find_packages

Expand All @@ -27,15 +26,18 @@
compat = f.read()
if b"nvidia,tegra" in compat:
board_reqs = ["Jetson.GPIO"]
# Pi 4 and Earlier
if (
b"brcm,bcm2835" in compat
or b"brcm,bcm2836" in compat
or b"brcm,bcm2837" in compat
or b"brcm,bcm2838" in compat
or b"brcm,bcm2711" in compat
or b"brcm,bcm2712" in compat
):
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0"]
# Pi 5
if b"brcm,bcm2712" in compat:
board_reqs = ["rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0", "rpi-lgpio"]
if (
b"ti,am335x" in compat
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.
Expand Down
2 changes: 1 addition & 1 deletion src/pwmio.py
Expand Up @@ -16,7 +16,7 @@

# pylint: disable=unused-import

if detector.board.any_raspberry_pi and not detector.board.RASPBERRY_PI_5:
if detector.board.any_raspberry_pi:
from adafruit_blinka.microcontroller.bcm283x.pwmio.PWMOut import PWMOut
elif detector.board.any_coral_board:
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
Expand Down