mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
whoops, forgot to set isOut
This commit is contained in:
@@ -14,12 +14,14 @@ func New(p machine.Pin) Device {
|
||||
set: func(level bool) {
|
||||
if !isOut {
|
||||
legacy.ConfigurePinOut(p)
|
||||
isOut = true
|
||||
}
|
||||
p.Set(level)
|
||||
},
|
||||
get: func() (level bool) {
|
||||
if isOut {
|
||||
legacy.ConfigurePinInputPullup(p)
|
||||
isOut = false
|
||||
}
|
||||
return p.Get()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user