hybridgroup.gobot/driver.go

22 lines
586 B
Go
Raw Normal View History

2014-04-30 23:10:44 +08:00
package gobot
2013-10-24 13:00:03 +08:00
// Driver is the interface that describes a driver in gobot
type Driver interface {
// Name returns the label for the Driver
Name() string
// SetName sets the label for the Driver.
// Please prefer to use options [gpio.WithName or aio.WithName] instead, if possible.
SetName(s string)
// Start initiates the Driver
Start() error
// Halt terminates the Driver
Halt() error
// Connection returns the Connection associated with the Driver
Connection() Connection
2014-06-07 05:44:16 +08:00
}
2014-11-22 11:35:01 +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
}