This commit is contained in:
2022-12-30 18:42:48 +01:00
parent 5b25457224
commit 005b167f5e
6 changed files with 155 additions and 42 deletions

View File

@@ -0,0 +1,30 @@
//go:build !arm && !arm64
package PinControlService
type PinEmu struct {
}
func (*PinEmu) Toggle() {}
func (*PinEmu) High() {}
func (*PinEmu) Low() {}
func (*PinEmu) Input() {}
func (*PinEmu) Output() {}
func (*PinEmu) Detect(Edge) {}
func (*PinEmu) PullUp() {}
func (*PinEmu) PullDown() {}
func (*PinEmu) PullOff() {}
func (*PinEmu) Read() State { return LowState }
func (*PinEmu) EdgeDetected() bool { return false }
type HardwarePin struct {
Pin PinEmu
}
func NewHardwarePin(n int) HardwarePinInterface {
return &PinEmu{}
}
func HardwarePinOpen() error {
return nil
}