Skip to content

x/exp/io: i2c support for reading/writing to registers #15858

@mattetti

Description

@mattetti

Some i2c devices function by reading and writing to registers, here is an example: http://www.seeedstudio.com/wiki/Grove_-_I2C_ADC

There is already a TODO inside the DeviceRead method but I think it's worth tracking as an issue since it will be needed to implement drivers and the API needs to be different (we'd need to pass the registry id). Suggestion API:

func (d *Device) ReadFromReg(reg byte, buf []byte) error{}
func (d *Device) WriteToReg(reg byte, buf []byte) error{}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions