Replace Safe functions with legacy.PinOutput

This commit is contained in:
Yurii Soldak
2025-09-21 10:04:20 +02:00
parent c6d83b783f
commit 453ff96a66
16 changed files with 112 additions and 108 deletions
+5 -4
View File
@@ -10,6 +10,7 @@ import (
"errors"
"tinygo.org/x/drivers"
"tinygo.org/x/drivers/internal/legacy"
"tinygo.org/x/drivers/pixel"
)
@@ -73,10 +74,10 @@ func New(bus drivers.SPI, resetPin, dcPin, csPin, blPin drivers.PinOutput) Devic
func NewOf[T Color](bus drivers.SPI, resetPin, dcPin, csPin, blPin drivers.PinOutput) DeviceOf[T] {
return DeviceOf[T]{
bus: bus,
dcPin: drivers.SafePinOutput(dcPin),
resetPin: drivers.SafePinOutput(resetPin),
csPin: drivers.SafePinOutput(csPin),
blPin: drivers.SafePinOutput(blPin),
dcPin: legacy.PinOutput(dcPin),
resetPin: legacy.PinOutput(resetPin),
csPin: legacy.PinOutput(csPin),
blPin: legacy.PinOutput(blPin),
}
}