tinygo/src/machine/machine.go
Ayke van Laethem c4f0dc90dd machine: Rewrite most of the GPIO functionality
Split across device types (nrf, dummy) and use registers directly
instead of the HAL.
2018-05-05 20:05:53 +02:00

18 строки
171 Б
Go

package machine
type GPIOConfig struct {
Mode GPIOMode
}
type GPIO struct {
Pin uint8
}
func (p GPIO) High() {
p.Set(true)
}
func (p GPIO) Low() {
p.Set(false)
}