Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

conn: Support common or canonical errors on buses #80

@tve

Description

@tve

conn.i2c should have an i2c.NoAckError defined such that an app can tell whether an error indicates that the device did not ack a transfer. An example for this is polling an eeprom until it's ready (done with the previous write).
conn.onewire has onewire.BusError to indicate that there was a problem on the 1-wire bus, which frequently happens with long buses that have poor electrical control (e.g. to high a slew rate).
Maybe it would be worth to have a conn.NoResponseError that is generic across buses.
(All these errors should follow the "interface" pattern in order to decouple types, i.e., the app tests whether an error implements an interface as opposed to testing the error's concrete type.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions