ws2812: add support for 160MHz cortex-m processors

This adds hardware timing support for driving WS2812 LEDs on Cortex-M microcontrollers running at 160MHz (such as the STM32U585).

- Updated `go:generate` directive to include 160MHz.
- Generated the corresponding `ws2812_writeByte160` assembly routine.
- Added a switch case in `WriteByte` to handle generic 160MHz processors.

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2026-05-06 18:41:29 +02:00
committed by Ron Evans
parent 62663c1832
commit f459992f3c
3 changed files with 385 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
// On RP2040/RP2350 it uses PIO for hardware-timed control.
package ws2812 // import "tinygo.org/x/drivers/ws2812"
//go:generate go run gen-ws2812.go -arch=cortexm 16 48 64 120 125 150 168 200
//go:generate go run gen-ws2812.go -arch=cortexm 16 48 64 120 125 150 160 168 200
//go:generate go run gen-ws2812.go -arch=tinygoriscv 160 320
import (