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
|
2023-12-04 01:03:02 +08:00
|
|
|
// SetName sets the label for the Driver.
|
|
|
|
// Please prefer to use options [gpio.WithName or aio.WithName] instead, if possible.
|
2016-09-25 17:46:55 +08:00
|
|
|
SetName(s string)
|
2014-12-31 21:15:52 +08:00
|
|
|
// Start initiates the Driver
|
2016-11-07 21:55:21 +08:00
|
|
|
Start() error
|
2014-12-31 21:15:52 +08:00
|
|
|
// Halt terminates the Driver
|
2016-11-07 21:55:21 +08:00
|
|
|
Halt() error
|
2017-04-25 00:18:01 +08:00
|
|
|
// Connection returns the Connection associated 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
|
|
|
|
}
|