aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-12-28 23:56:40 +0100
committerGitHub <[email protected]>2023-12-28 23:56:40 +0100
commita2faa9e14a6964a7b27be65a841f686f6bee0271 (patch)
treec4ef9ac0e2c2b1fa86ff89e689950a60b86320fe /embassy-stm32
parenta7eb6a44da09a48b3fd57f1bd4d4d095685a06b5 (diff)
parenta142be8bb8f90ea9935d452bbac692e678f0c9e7 (diff)
Merge pull request #2364 from embassy-rs/james/reenable-stm32-i2cv1-ints
STM32: Re-enable I2Cv1 Interrupts if poll-fn is not ready
Diffstat (limited to 'embassy-stm32')
-rw-r--r--embassy-stm32/src/i2c/v1.rs3
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 }