whoops, forgot to set isOut

This commit is contained in:
soypat
2025-10-13 18:32:25 -03:00
parent 293de2b61a
commit 25eecd27d1
+2
View File
@@ -14,12 +14,14 @@ func New(p machine.Pin) Device {
set: func(level bool) { set: func(level bool) {
if !isOut { if !isOut {
legacy.ConfigurePinOut(p) legacy.ConfigurePinOut(p)
isOut = true
} }
p.Set(level) p.Set(level)
}, },
get: func() (level bool) { get: func() (level bool) {
if isOut { if isOut {
legacy.ConfigurePinInputPullup(p) legacy.ConfigurePinInputPullup(p)
isOut = false
} }
return p.Get() return p.Get()
}, },