machine: Rewrite most of the GPIO functionality

Split across device types (nrf, dummy) and use registers directly
instead of the HAL.
This commit is contained in:
Ayke van Laethem
2018-05-05 20:02:00 +02:00
parent 16489c0df6
commit c4f0dc90dd
5 changed files with 77 additions and 38 deletions
+21
View File
@@ -0,0 +1,21 @@
// +build !avr,!nrf
package machine
// Dummy machine package, filled with no-ops.
type GPIOMode uint8
const (
GPIO_INPUT = iota
GPIO_OUTPUT
)
const LED = 0
func (p GPIO) Configure(config GPIOConfig) {
}
func (p GPIO) Set(value bool) {
}