Skip to content

I2CBusConnection needs an available() method #15

@pdibona

Description

@pdibona

Currently, the I2CBusConnection allows reading and writing data. But I see no way to check if data is available before invoking the readByte() method.

I tried using the connection.getInputStream().available() method, but that always throws an IOException about an invalid seek.

If the slave device doesn't respond almost instantly, the readByte() method throws a timeout IOException.

(Otherwise -- you have a great library here! Thanks!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions