1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00
hybridgroup.gobot/driver.go

22 lines
594 B
Go
Raw Normal View History

2014-04-30 08:10:44 -07:00
package gobot
2013-10-23 22:00:03 -07: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 use options [aio.WithName, ble.WithName, gpio.WithName or serial.WithName] instead.
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-06 14:44:16 -07:00
}
2014-11-21 19:35:01 -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
}