mirror of
https://github.com/kidoman/embd
synced 2025-07-03 11:57:38 +02:00
host specific drivers can now be loaded separately
this ensures cleaner abstractions/code and will ensure that the produced binary is as small as possible. a convenience package is provided to easily load all hosts easily: "github.com/kidoman/embd/host/all"
This commit is contained in:
parent
57328c979d
commit
c35deeb17c
44 changed files with 1184 additions and 1018 deletions
4
i2c.go
4
i2c.go
|
@ -24,6 +24,9 @@ type I2CBus interface {
|
|||
WriteByteToReg(addr, reg, value byte) error
|
||||
// WriteU16ToReg
|
||||
WriteWordToReg(addr, reg byte, value uint16) error
|
||||
|
||||
// Close releases the resources associated with the bus.
|
||||
Close() error
|
||||
}
|
||||
|
||||
// I2CDriver interface interacts with the host descriptors to allow us
|
||||
|
@ -31,6 +34,7 @@ type I2CBus interface {
|
|||
type I2CDriver interface {
|
||||
Bus(l byte) I2CBus
|
||||
|
||||
// Close releases the resources associated with the driver.
|
||||
Close() error
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue