2016-12-20 20:25:22 +08:00
|
|
|
package aio
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// ErrAnalogReadUnsupported is error resulting when a driver attempts to use
|
|
|
|
// hardware capabilities which a connection does not support
|
|
|
|
ErrAnalogReadUnsupported = errors.New("AnalogRead is not supported by this platform")
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Error event
|
|
|
|
Error = "error"
|
|
|
|
// Data event
|
|
|
|
Data = "data"
|
|
|
|
// Vibration event
|
|
|
|
Vibration = "vibration"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AnalogReader interface represents an Adaptor which has Analog capabilities
|
|
|
|
type AnalogReader interface {
|
2017-04-16 00:40:41 +08:00
|
|
|
//gobot.Adaptor
|
2016-12-20 20:25:22 +08:00
|
|
|
AnalogRead(string) (val int, err error)
|
|
|
|
}
|