jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.77k stars 621 forks source link

Support for using the RPi PCM hardware instead of the PWM hardware. #123

Closed tvoverbeek closed 7 years ago

tvoverbeek commented 7 years ago

Based on the version of rpi-ws281x used by Pimoroni's UnicornHat (https://github.com/pimoroni/unicorn-hat/tree/master/library/rpi-ws281x) I have made a version which uses the PCM hardware (https://github.com/tvoverbeek/rpi-pcm-ws281x). I plan to merge this with the PWM version and, when ready, to submit a pull-request so this library (https://github.com/jgarff/rpi_ws281x) supports both PWM and PCM. Comments?

penfold42 commented 7 years ago

More options are always good.

Do you want to add SPI support as a third option ? https://github.com/penfold42/stuff/blob/master/ws2812_spi.c

tvoverbeek commented 7 years ago

@penfold42 No plans at the moment. I'll first want to integrate my PCM code. I looked quickly at your ws2812_spi code, and it should be doable. However no promises yet.

tvoverbeek commented 7 years ago

Pull request submitted. See https://github.com/jgarff/rpi_ws281x/pull/135. Includes both PCM and SPI support. SPI support inspired by @penfold42 implementation.

tvoverbeek commented 7 years ago

Pull request now in dev branch. Please test.