Skip to content

The OSError thrown by I2C doesn't have errno in args[0] #87

@deshipu

Description

@deshipu

In particular, when there is no ACK response to a start condition and address, it should raise OSError with errno=19 (ENODEV), otherwise it's impossible to distinguish the different kinds of errors.

I need this for the SI7021 sensor driver: that sensor signals its busyness by sending NACK to I2C requests until it finished the measurements, so I need to be able to tell this case from other I2C errors.

This works correctly in the latest version of MicroPython.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions