mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
Merge pull request #3104 from birdistheword96/main
Fix: Ensure I2C bus is free before master-write operation
This commit is contained in:
commit
976e9f7fba
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user