-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdriver.go
More file actions
19 lines (18 loc) · 674 Bytes
/
driver.go
File metadata and controls
19 lines (18 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package dcc
// Driver can be implemented by any module to allow using go-dcc
// on different platforms. dcc.Driver modules are in charge of
// producing an electrical signal output (i.e. on a GPIO Pin)
type Driver interface {
// Low sets the output to low state.
Low()
// High sets the output to high.
High()
// TracksOn turns the tracks on. The exact procedure is left to the
// implementation, but tracks should be ready to receive packets from
// this point.
TracksOn()
// TracksOff disables the tracks. The exact procedure is left to the
// implementation, but tracks should not carry any power and all
// trains should stop after calling it.
TracksOff()
}