1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00
deadprogram c186638973 aio: separate analog drivers from gpio drivers
Signed-off-by: deadprogram <ron@hybridgroup.com>
2016-12-20 13:25:22 +01:00

29 lines
577 B
Go

package aio
import (
"errors"
"gobot.io/x/gobot"
)
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 {
gobot.Adaptor
AnalogRead(string) (val int, err error)
}