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.
This commit is contained in:
Ayke van Laethem
2020-10-16 14:00:14 +02:00
committed by Ron Evans
parent e376785596
commit df64ce8f50
8 changed files with 73 additions and 103 deletions
-3
View File
@@ -4,13 +4,10 @@ package ws2812
import (
"device"
"errors"
"machine"
"unsafe"
)
var errUnknownClockSpeed = errors.New("ws2812: unknown CPU clock speed")
func (d Device) WriteByte(c byte) error {
portSet, maskSet := d.Pin.PortMaskSet()
portClear, maskClear := d.Pin.PortMaskClear()