22 Commits

Author SHA1 Message Date
deadprogram 1d695a231a ws2812: add support for the ESP32-C3 processor
This adds support to the WS2812 for the ESP32-C3 processor
which is a RISC-V processor from Espressif.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-06-04 19:49:50 +02:00
deadprogram f459992f3c 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>
2026-05-17 06:48:52 +01:00
Daniel Esteban e960a6ff57 fix issue #858 2026-04-17 10:27:04 +01:00
Carlos Henrique Guardão Gandarez 21a7d0a96a ws2812: add brightness control 2026-04-11 16:54:48 +01:00
Carlos Henrique Guardão Gandarez 4071028e85 ws2812: add PIO support for RP2040/RP2350
Integrate PIO support directly into the existing Device.
NewWS2812() now uses PIO for hardware-timed control
on RP2040/RP2350 and falls back to bit-banging on other platforms.

No changes to the exported API surface.
2026-04-07 21:38:57 +02:00
Ayke van Laethem 28d87eb0c5 ws2812: add RP2350 support
Adding 150MHz support for the RP2350
2025-08-10 10:05:18 +02:00
Leon Matthews dbc9022f6a ws2812: add 200MHz support for the Cortex-M0/rp2040 2025-05-20 13:09:35 +02:00
SoftTacos 3b183ad6ed added support for SK6812 to WS2812 device (#610)
sk6812: added support for SK6812 to WS2812 device
2023-12-04 11:17:20 +01:00
Olaf Flebbe df0d0d29a4 ws2812: support thingplus-rp2040 board
Added 125 MHz rp2040 timing
  Added unsafe.Pointer for pointer conversion
2022-05-28 10:22:26 +02:00
BCG 0ced12683c Revert "Added support for 125MHz to WS2812 for RP2040"
This reverts commit b4eb406a43 (erroneous
push).
2022-02-14 01:06:23 -05:00
BCG b4eb406a43 Added support for 125MHz to WS2812 for RP2040 2022-02-14 00:48:33 -05:00
Ayke van Laethem 94729a4f7d ws2812: add support for RISC-V
This commit adds support for two new chips using the RISC-V
architecture: the FE310 (used in the HiFive 1) and the ESP32-C3 from
Espressif.
2021-11-03 19:14:32 +01:00
Ayke van Laethem 050cf4dbbc ws2812: make assembly generator architecture independent 2021-11-03 19:14:32 +01:00
Ayke van Laethem b3af3f594e ws2812: generate assembly instead of handwriting it
Previously, a new implementation had to be written for each processor
speed. This is tedious and error-prone, therefore I've rewritten all of
the assembly code using a tool that will calculate exactly how many NOP
instructions are required.

I've also switched from build tags to a switch statement over all
processor speeds.

All in all, this means that:
  - Chips with a supported CPU performance will automatically be
    supported (no build tags necessary).
  - Adding a new chip is as easy as adding the MHz count to the
    generator script and to the switch statement.

Right now this is only for the Cortex-M, but it's certainly feasible to
extend this to other architectures such as the AVR.
2021-09-07 18:00:55 +02:00
Ayke van Laethem df64ce8f50 ws2812: make AVR support more robust
* Merge AVR support for Digispark and non-Digispark
* Fix the error "inline assembly requires more registers than available"
* Use a single file for all AVR targets, in a similar style as the
  Xtensa support.
2020-10-16 18:36:32 +02:00
Ron Evans c09f0a8075 all: switch to using custom domain for all drivers
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-29 13:33:50 +02:00
Ron Evans 3f946868e1 all: refactor all current drivers to use new machine.Pin interface
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-26 21:46:33 +02:00
Ayke van Laethem 4c21e79d0e ws2812: switch to different color format
Use image/color.RGBA to represent RGB colors. This is more standard.
2018-12-22 16:37:36 +01:00
Ayke van Laethem 0d692cfd0a ws2812: provide proper file-like interface in Device
* Return len and errors in the Write method, to implement io.Writer.
* Return a nil error in WriteByte, for compatibility with bufio.
2018-12-22 16:35:27 +01:00
Ayke van Laethem 16a5f82d44 ws2812: rename WS2812 to Device
This is more consistent with the other drivers.
2018-11-16 14:55:00 +01:00
Ayke van Laethem c23954059f ws2812: improve documentation 2018-11-16 12:21:17 +01:00
Ayke van Laethem 1f27817061 Initial commit 2018-10-15 20:47:33 +02:00