Skip to content

Commit

Permalink
Merge pull request #797 from makermelissa/main
Browse files Browse the repository at this point in the history
Update Blinka to use rpi-lgpio for PWM
  • Loading branch information
dhalbert committed Mar 19, 2024
2 parents db9616f + 9840ec5 commit bf22167
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit bf22167

Please sign in to comment.