...
This commit is contained in:
39
internal/PinControlService/HardwarePinInterface.go
Normal file
39
internal/PinControlService/HardwarePinInterface.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package PinControlService
|
||||
|
||||
type Mode uint8
|
||||
type State uint8
|
||||
type Pull uint8
|
||||
type Edge uint8
|
||||
|
||||
type HardwarePinInterface interface {
|
||||
Toggle()
|
||||
High()
|
||||
Low()
|
||||
Input()
|
||||
Output()
|
||||
Detect(Edge)
|
||||
PullUp()
|
||||
PullDown()
|
||||
PullOff()
|
||||
Read() State
|
||||
EdgeDetected() bool
|
||||
}
|
||||
|
||||
const (
|
||||
ModeInput Mode = iota
|
||||
ModeOutput
|
||||
ModeClock
|
||||
ModePwm
|
||||
)
|
||||
|
||||
const (
|
||||
LowState State = iota
|
||||
HighState
|
||||
)
|
||||
|
||||
const (
|
||||
NoEdge Edge = iota
|
||||
RiseEdge
|
||||
FallEdge
|
||||
AnyEdge = RiseEdge | FallEdge
|
||||
)
|
||||
Reference in New Issue
Block a user