diff options
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 80163c287..8c8df79dd 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -109,6 +109,11 @@ impl<'d, M: Mode> I2c<'d, M> { | |||
| 109 | timeout.check()?; | 109 | timeout.check()?; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | // Wait for the bus to be free | ||
| 113 | while info.regs.isr().read().busy() { | ||
| 114 | timeout.check()?; | ||
| 115 | } | ||
| 116 | |||
| 112 | let reload = if reload { | 117 | let reload = if reload { |
| 113 | i2c::vals::Reload::NOTCOMPLETED | 118 | i2c::vals::Reload::NOTCOMPLETED |
| 114 | } else { | 119 | } else { |
