mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
17 lines
266 B
Go
17 lines
266 B
Go
//go:build baremetal && tinygo
|
|
|
|
package legacy
|
|
|
|
import (
|
|
"machine"
|
|
|
|
"tinygo.org/x/drivers"
|
|
)
|
|
|
|
func PinOutput(pin drivers.PinOutput) drivers.PinOutput {
|
|
if p, ok := pin.(machine.Pin); ok {
|
|
p.Configure(machine.PinConfig{Mode: machine.PinOutput})
|
|
}
|
|
return pin
|
|
}
|