Merge pull request #3104 from birdistheword96/main

Fix: Ensure I2C bus is free before master-write operation
This commit is contained in:
Dario Nieuwenhuis 2024-07-01 23:18:55 +00:00 committed by GitHub
commit 976e9f7fba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,11 @@ impl<'d, M: Mode> I2c<'d, M> {
timeout.check()?;
}
// Wait for the bus to be free
while info.regs.isr().read().busy() {
timeout.check()?;
}
let reload = if reload {
i2c::vals::Reload::NOTCOMPLETED
} else {