mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-09-10 08:39:27 +00:00
ws2812: rename WS2812 to Device
This is more consistent with the other drivers.
This commit is contained in:
@@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
// Send a single byte using the WS2812 protocol.
|
||||
func (p WS2812) WriteByte(c byte) {
|
||||
func (d Device) WriteByte(c byte) {
|
||||
// For the Cortex-M0 at 16MHz
|
||||
portSet, maskSet := p.Pin.PortMaskSet()
|
||||
portClear, maskClear := p.Pin.PortMaskClear()
|
||||
portSet, maskSet := d.Pin.PortMaskSet()
|
||||
portClear, maskClear := d.Pin.PortMaskClear()
|
||||
|
||||
value := uint32(c) << 24
|
||||
arm.AsmFull(`
|
||||
|
||||
Reference in New Issue
Block a user