Skip to content

Commit bf22167

Browse files
authored
Merge pull request #797 from makermelissa/main
Update Blinka to use rpi-lgpio for PWM
2 parents db9616f + 9840ec5 commit bf22167

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import io
1212
import os
13-
import sys
1413

1514
from setuptools import setup, find_packages
1615

@@ -27,15 +26,18 @@
2726
compat = f.read()
2827
if b"nvidia,tegra" in compat:
2928
board_reqs = ["Jetson.GPIO"]
29+
# Pi 4 and Earlier
3030
if (
3131
b"brcm,bcm2835" in compat
3232
or b"brcm,bcm2836" in compat
3333
or b"brcm,bcm2837" in compat
3434
or b"brcm,bcm2838" in compat
3535
or b"brcm,bcm2711" in compat
36-
or b"brcm,bcm2712" in compat
3736
):
3837
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0"]
38+
# Pi 5
39+
if b"brcm,bcm2712" in compat:
40+
board_reqs = ["rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0", "rpi-lgpio"]
3941
if (
4042
b"ti,am335x" in compat
4143
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.

src/pwmio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# pylint: disable=unused-import
1818

19-
if detector.board.any_raspberry_pi and not detector.board.RASPBERRY_PI_5:
19+
if detector.board.any_raspberry_pi:
2020
from adafruit_blinka.microcontroller.bcm283x.pwmio.PWMOut import PWMOut
2121
elif detector.board.any_coral_board:
2222
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut

0 commit comments

Comments
 (0)