addressable led driver
- Reply: Daniel O'Connor : "Re: addressable led driver"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Nov 2025 00:57:08 UTC
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 i also looked into gpioths.c for references on pin control and sleeps to form my data stream i also want something better because trying to specify gpios via fdt overlays has already made me cursing like hell i mean as opposed to gpio config as seen in gpioctl -l it also needs to be secure it could use some existing packetized data formats i imagine being able to send data to kernel, telling it the the gpio pin (addresses aren't human readable), the 1 bit timing, the 0 bit timit, the reset timing. and then the binary or ascii formatted data. and kernel does it and tells when it's completed config data could be sent only once too. followed by raw bit data packets i have no idea how to do all of this maybe this bitbanging driver can be generalized for use in other purposes as well. software pwm or so from userland it could look like opening some device or something. unsure how to send config. but data would be just sent directly to pipe maybe existing tools allow it somehow, there's spi userland util. or they could be expanded generic tiny soc (armv7 h3, aarch64 h5) could allow bunch of those ~ 200kilobytes/s data streams, to my knowledge anyway those are my ideas, i have no idea how to start p.s.: in desperation i actually tried to get chatgpt to help me. at glance it gave me ideas similar to what i've seen in other drivers. but very likely i would end up cursing the hell out of it, rm -f'ing the ai.c and rewriting it with real brain. mine or somebody else's... then we could actually license it as original work too and include maybe