aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/ucpd.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/embassy-stm32/src/ucpd.rs b/embassy-stm32/src/ucpd.rs
index cbec85ff3..40aea75cb 100644
--- a/embassy-stm32/src/ucpd.rs
+++ b/embassy-stm32/src/ucpd.rs
@@ -347,15 +347,14 @@ impl<'d, T: Instance> PdPhy<'d, T> {
347 .read(r.rxdr().as_ptr() as *mut u8, buf, TransferOptions::default()) 347 .read(r.rxdr().as_ptr() as *mut u8, buf, TransferOptions::default())
348 }; 348 };
349 349
350 // Clear interrupt flags (possibly set from last receive).
351 r.icr().write(|w| {
352 w.set_rxorddetcf(true);
353 w.set_rxovrcf(true);
354 w.set_rxmsgendcf(true);
355 });
356
357 let _on_drop = OnDrop::new(|| { 350 let _on_drop = OnDrop::new(|| {
358 Self::enable_rx_interrupt(false); 351 Self::enable_rx_interrupt(false);
352 // Clear interrupt flags
353 r.icr().write(|w| {
354 w.set_rxorddetcf(true);
355 w.set_rxovrcf(true);
356 w.set_rxmsgendcf(true);
357 });
359 }); 358 });
360 359
361 poll_fn(|cx| { 360 poll_fn(|cx| {