hybridgroup.gobot/platforms/i2c/i2c.go

27 lines
423 B
Go
Raw Normal View History

2014-04-28 09:54:41 +08:00
package i2c
2014-11-30 04:10:23 +08:00
import (
"errors"
"github.com/hybridgroup/gobot"
)
var (
ErrEncryptedBytes = errors.New("Encrypted bytes")
ErrNotEnoughBytes = errors.New("Not enough bytes read")
)
const (
Error = "error"
Joystick = "joystick"
C = "c"
Z = "z"
)
type I2c interface {
gobot.Adaptor
2014-11-20 08:56:48 +08:00
I2cStart(address byte) (err error)
I2cRead(len uint) (data []byte, err error)
I2cWrite(buf []byte) (err error)
}