diff --git a/drivers/i2c/helpers_test.go b/drivers/i2c/helpers_test.go index 67e0dd1e..243258d0 100644 --- a/drivers/i2c/helpers_test.go +++ b/drivers/i2c/helpers_test.go @@ -36,7 +36,7 @@ func (t *i2cTestAdaptor) Close() error { return nil } -func (t *i2cTestAdaptor) ReadByte() (val uint8, err error) { +func (t *i2cTestAdaptor) ReadByte() (val byte, err error) { bytes := []byte{0} bytesRead, err := t.i2cReadImpl(bytes) if err != nil { @@ -82,7 +82,7 @@ func (t *i2cTestAdaptor) ReadBlockData(_ uint8, b []byte) (n int, err error) { return bytesRead, err } -func (t *i2cTestAdaptor) WriteByte(val uint8) (err error) { +func (t *i2cTestAdaptor) WriteByte(val byte) (err error) { t.written = append(t.written, val) bytes := []byte{val} _, err = t.i2cWriteImpl(bytes) diff --git a/drivers/i2c/i2c.go b/drivers/i2c/i2c.go index 48775c44..ea656ffe 100644 --- a/drivers/i2c/i2c.go +++ b/drivers/i2c/i2c.go @@ -60,7 +60,7 @@ func (c *i2cConnection) Close() error { return c.bus.Close() } -func (c *i2cConnection) ReadByte() (val uint8, err error) { +func (c *i2cConnection) ReadByte() (val byte, err error) { if err := c.bus.SetAddress(c.address); err != nil { return 0, err } @@ -88,7 +88,7 @@ func (c *i2cConnection) ReadBlockData(reg uint8, b []byte) (n int, err error) { return c.bus.ReadBlockData(reg, b) } -func (c *i2cConnection) WriteByte(val uint8) (err error) { +func (c *i2cConnection) WriteByte(val byte) (err error) { if err := c.bus.SetAddress(c.address); err != nil { return err }