forked from reef-pi/rpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
digital_pin_windows.go
29 lines (23 loc) · 984 Bytes
/
digital_pin_windows.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// +build windows
package hal
import (
"time"
"github.com/reef-pi/embd"
)
func newDigitalPin(i int) (DigitalPin, error) {
pin := mockPin{i}
return pin, nil
}
type mockPin struct {
pinNumber int
}
func (p mockPin) InterruptPin() {}
func (p mockPin) N() int { return p.pinNumber }
func (p mockPin) Write(_ int) error { return nil }
func (p mockPin) Read() (int, error) { return 0, nil }
func (p mockPin) TimePulse(state int) (time.Duration, error) { return time.Duration(0), nil }
func (p mockPin) SetDirection(dir embd.Direction) error { return nil }
func (p mockPin) ActiveLow(b bool) error { return nil }
func (p mockPin) PullUp() error { return nil }
func (p mockPin) PullDown() error { return nil }
func (p mockPin) Close() error { return nil }