Skip to content

Unable to verify correct I2C communication #96

@Giermann

Description

@Giermann

The whole class is very vulnerable for communication problems on I2C bus!
The methods writeRegister() and readRegister() are using m_i2c_dev->write() and m_i2c_dev->read() which return a bool value, but these are never evaluated.

In this case, one would never recognize if read voltages are actual readings or simply the last successful reading or even the last (un?)successful writing.

It would be easy to convert writeRegister() to return the bool result of m_i2c_dev->write() and to handle this or simply also return the bool result in startComparator_SingleEnded() and startADCReading().

For readRegister() it would require some more refactoring, also read #75 for some thoughts on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions