diff options
| author | James Munns <[email protected]> | 2023-12-27 19:12:44 +0100 |
|---|---|---|
| committer | James Munns <[email protected]> | 2023-12-27 19:12:44 +0100 |
| commit | a142be8bb8f90ea9935d452bbac692e678f0c9e7 (patch) | |
| tree | b90e08edcf41045381f6e513e237f96bb5ab9907 | |
| parent | 00f77c4a924b7254aa6cd7fb7aa2a6bbc6ef67f2 (diff) | |
Seems to help
| -rw-r--r-- | embassy-stm32/src/i2c/v1.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs index df5b44c2d..231d08f18 100644 --- a/embassy-stm32/src/i2c/v1.rs +++ b/embassy-stm32/src/i2c/v1.rs | |||
| @@ -375,6 +375,9 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 375 | T::regs().sr2().read(); | 375 | T::regs().sr2().read(); |
| 376 | Poll::Ready(Ok(())) | 376 | Poll::Ready(Ok(())) |
| 377 | } else { | 377 | } else { |
| 378 | // If we need to go around, then re-enable the interrupts, otherwise nothing | ||
| 379 | // can wake us up and we'll hang. | ||
| 380 | Self::enable_interrupts(); | ||
| 378 | Poll::Pending | 381 | Poll::Pending |
| 379 | } | 382 | } |
| 380 | } | 383 | } |
