2014-04-30 08:10:44 -07:00
|
|
|
package gobot
|
2013-10-23 22:00:03 -07:00
|
|
|
|
2014-12-31 05:15:52 -08:00
|
|
|
// Driver is the interface that describes a driver in gobot
|
2014-11-20 18:00:32 -08:00
|
|
|
type Driver interface {
|
2014-12-31 05:15:52 -08:00
|
|
|
// Name returns the label for the Driver
|
|
|
|
Name() string
|
2023-12-03 18:03:02 +01:00
|
|
|
// SetName sets the label for the Driver.
|
2024-02-10 18:02:09 +01:00
|
|
|
// Please use options [aio.WithName, ble.WithName, gpio.WithName or serial.WithName] instead.
|
2016-09-25 11:46:55 +02:00
|
|
|
SetName(s string)
|
2014-12-31 05:15:52 -08:00
|
|
|
// Start initiates the Driver
|
2016-11-07 14:55:21 +01:00
|
|
|
Start() error
|
2014-12-31 05:15:52 -08:00
|
|
|
// Halt terminates the Driver
|
2016-11-07 14:55:21 +01:00
|
|
|
Halt() error
|
2017-04-24 18:18:01 +02:00
|
|
|
// Connection returns the Connection associated with the Driver
|
2014-11-20 18:00:32 -08:00
|
|
|
Connection() Connection
|
2014-06-06 14:44:16 -07:00
|
|
|
}
|
2014-11-21 19:35:01 -08:00
|
|
|
|
2014-12-31 05:15:52 -08:00
|
|
|
// Pinner is the interface that describes a driver's pin
|
2014-11-28 19:04:22 -08:00
|
|
|
type Pinner interface {
|
2014-11-21 19:35:01 -08:00
|
|
|
Pin() string
|
|
|
|
}
|