mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-21 06:59:00 +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) {
|
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()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user