mirror of
https://github.com/kidoman/embd
synced 2024-12-22 04:40:04 +01:00
build: fixed broken tests
This commit is contained in:
parent
2e6bd46354
commit
afa49bb2bc
@ -131,6 +131,7 @@ type mockI2CBus struct {
|
||||
closed bool
|
||||
}
|
||||
|
||||
func (bus *mockI2CBus) ReadBytes(addr byte, num int) ([]byte, error) { return []byte{0x00}, nil }
|
||||
func (bus *mockI2CBus) ReadByte(addr byte) (byte, error) { return 0x00, nil }
|
||||
func (bus *mockI2CBus) WriteBytes(addr byte, value []byte) error { return nil }
|
||||
func (bus *mockI2CBus) ReadFromReg(addr, reg byte, value []byte) error { return nil }
|
||||
|
2
i2c.go
2
i2c.go
@ -6,7 +6,7 @@ package embd
|
||||
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 reads a slice of bytes from the given address.
|
||||
ReadByte(addr byte) (value byte, err error)
|
||||
// WriteByte writes a byte to the given address.
|
||||
WriteByte(addr, value byte) error
|
||||
|
Loading…
x
Reference in New Issue
Block a user