31 lines
685 B
Go
31 lines
685 B
Go
//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
|
|
}
|