mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-21 15:09:00 +00:00
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:
@@ -34,6 +34,9 @@ func (d Device) WriteByte(c byte) error {
|
||||
case 150_000_000: // 150MHz, e.g. rp2350
|
||||
d.writeByte150(c)
|
||||
return nil
|
||||
case 160_000_000: // 160MHz, e.g. stm32u585
|
||||
d.writeByte160(c)
|
||||
return nil
|
||||
case 168_000_000: // 168MHz, e.g. stm32f405
|
||||
d.writeByte168(c)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user