Merge pull request #2364 from embassy-rs/james/reenable-stm32-i2cv1-ints

STM32: Re-enable I2Cv1 Interrupts if poll-fn is not ready
This commit is contained in:
Dario Nieuwenhuis 2023-12-28 23:56:40 +01:00 committed by GitHub
commit a2faa9e14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,6 +375,9 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> {
T::regs().sr2().read();
Poll::Ready(Ok(()))
} else {
// If we need to go around, then re-enable the interrupts, otherwise nothing
// can wake us up and we'll hang.
Self::enable_interrupts();
Poll::Pending
}
}