fix I2C controller problems after NACK

This commit is contained in:
Glenn Dirkx 2023-04-10 16:20:47 +02:00
parent df17a88448
commit 6760258ec3

View file

@ -262,7 +262,7 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> {
if T::regs().isr().read().txis() {
T::regs().txdr().write(|w| w.set_txdata(0));
}
if T::regs().isr().read().txe() {
if !T::regs().isr().read().txe() {
T::regs().isr().modify(|w| w.set_txe(true))
}
}