1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 20:07:40 +02:00

i2c: added ReadBytes to I2CBus

This commit is contained in:
Gavin Cabbage 2015-08-29 00:42:44 -04:00
parent 5065e49386
commit 2e6bd46354
2 changed files with 24 additions and 0 deletions

2
i2c.go
View file

@ -4,6 +4,8 @@ package embd
// I2CBus interface is used to interact with the I2C bus.
type I2CBus interface {
// ReadByte reads a byte from the given address.
ReadBytes(addr byte, num int) (value []byte, err error)
// ReadByte reads a byte from the given address.
ReadByte(addr byte) (value byte, err error)
// WriteByte writes a byte to the given address.