Re: addressable led driver
- Reply: Sulev-Madis Silber : "Re: addressable led driver"
- Reply: Tomek CEDRO : "Re: addressable led driver"
- In reply to: Sulev-Madis Silber : "addressable led driver"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Nov 2025 03:30:59 UTC
> On 14 Nov 2025, at 11:27, Sulev-Madis Silber <freebsd-hackers-freebsd-org952@ketas.si.pri.ee> wrote: > i want to create a proper driver together with userland tools to control all addressable leds directly from fbsd > > they all have different cursed protocols that don't fit spi at all > most popular is ws1812 which would mean if you want actual spi it would be clockless and this all kind of sucks > > i found gpiospi.c which is entirely undocumented. unsure how to get it working, i tried and failed gpiospi.c does bit banging - I think you will struggle to meet the timing requirements for WS2812 with it unless you do something horrible like disable all IRQs, send the bit stream and then enable them again. What actual SoC do you have? For example, the Beaglebone has PRUs which are simple coprocessors which can do this sort of bit banging (I have done it in Linux using LEDScape). If you don’t have something like that then SPI is probably the most reliable but be aware that you have to care a lot about the clock speed it uses so if the SoC changes clock speed for power saving it might make your clock speed wrong (I ran into this in the RPi4 for I2C). -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum