2014-04-30 23:10:44 +08:00
|
|
|
package gobot
|
2013-10-24 13:00:03 +08:00
|
|
|
|
2014-12-31 21:15:52 +08:00
|
|
|
// Driver is the interface that describes a driver in gobot
|
2014-11-21 10:00:32 +08:00
|
|
|
type Driver interface {
|
2014-12-31 21:15:52 +08:00
|
|
|
// Name returns the label for the Driver
|
|
|
|
Name() string
|
|
|
|
// Start initiates the Driver
|
2014-11-20 15:21:19 +08:00
|
|
|
Start() []error
|
2014-12-31 21:15:52 +08:00
|
|
|
// Halt terminates the Driver
|
2014-11-20 15:21:19 +08:00
|
|
|
Halt() []error
|
2014-12-31 21:15:52 +08:00
|
|
|
// Connection returns the Connection assiciated with the Driver
|
2014-11-21 10:00:32 +08:00
|
|
|
Connection() Connection
|
2014-06-07 05:44:16 +08:00
|
|
|
}
|
2014-11-22 11:35:01 +08:00
|
|
|
|
2014-12-31 21:15:52 +08:00
|
|
|
// Pinner is the interface that describes a driver's pin
|
2014-11-29 11:04:22 +08:00
|
|
|
type Pinner interface {
|
2014-11-22 11:35:01 +08:00
|
|
|
Pin() string
|
|
|
|
}
|