RIOT
RIOT copied to clipboard
drivers/ws281x: simple DMA implementation through SPI
Contribution description
This is a simple way to drive the ws1812b using DMA through SPI. I tested it on a nucleo-f303k8 but it should work on any MCU with similar SPI/DMA peripherals and a 2.4 to 4 MHz SPI clock. It uses 0b1110 for bit '1' and 0b1000 for bit '0' which effectively divides the frequency by 4. However, this requires the generation of a buffer copy of four times the buffer size.
Testing procedure
https://github.com/RIOT-OS/RIOT/assets/67432403/1c4b513c-3059-4a76-8ff6-72de02a19ac5
Issues/PRs references
https://forum.riot-os.org/t/spi-through-dma/4083
Please rebase - you can drop the ESP8266 changes now.