I2cResult::Data is only given by I2c::check_isr_flags when the stop condition interrupt is generated. The problem being that the stop condition interrupt is not generated on a repeated start condition.
This fixes the issue by checking if there is pending data when an address interrupt is pending. This means that there wasn't a stop condition after the last address event.
I2cResult::Data also now returns the type of event which marked the end of the data. This is useful if special functionality is desired depending on the type of event. For example, some I2C interfaces require that the register and read/write commands be issued with no stop conditions between them.
I2cResult::Data
is only given by I2c::check_isr_flags when the stop condition interrupt is generated. The problem being that the stop condition interrupt is not generated on a repeated start condition.This fixes the issue by checking if there is pending data when an address interrupt is pending. This means that there wasn't a stop condition after the last address event.
I2cResult::Data
also now returns the type of event which marked the end of the data. This is useful if special functionality is desired depending on the type of event. For example, some I2C interfaces require that the register and read/write commands be issued with no stop conditions between them.Fixes #136