Skip to content

Missing test in TinyI2CMaster.cpp start() routine? #19

@nmcgann

Description

@nmcgann

Line 294 says:
if (TWI0.MSTATUS & TWI_ARBLOST_bm) { // Arbitration lost or bus error
but there is no test for the bus error via TWI_BUSERR_bm.

Line 283 in the write() routine has a similar comment, but is:
if (TWI0.MSTATUS & (TWI_ARBLOST_bm|TWI_BUSERR_bm))return false; // Fails if bus error or arblost

Should the condition in 294 be changed to TWI0.MSTATUS & (TWI_ARBLOST_bm|TWI_BUSERR_bm) so both bits are checked?

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