Closed
Description
I encountered this bug in rp-rs/rp-hal#825, and a look at the I2C code in embassy-rp shows that it has the same bug.
In essence an SR is sent between operations of equal type, this can cause unexpected behavior in e.g:
fn write(&mut self, mut reg: u16, data: &[u8]) -> Result<(), Error<I2C::Error>> {
self.i2c.transaction(self.address, &mut [Operation::Write(®.to_be_bytes()), Operation::Write(data)])?;
}
as to avoid the SR all data must be copied into a single slice.
Metadata
Metadata
Assignees
Labels
No labels