mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +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()?;
|
timeout.check()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait for the bus to be free
|
||||||
|
while info.regs.isr().read().busy() {
|
||||||
|
timeout.check()?;
|
||||||
|
}
|
||||||
|
|
||||||
let reload = if reload {
|
let reload = if reload {
|
||||||
i2c::vals::Reload::NOTCOMPLETED
|
i2c::vals::Reload::NOTCOMPLETED
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user