diff options
| -rw-r--r-- | embassy-stm32f4/src/exti.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32f4/src/exti.rs b/embassy-stm32f4/src/exti.rs index bf9cc582f..5782b8ebf 100644 --- a/embassy-stm32f4/src/exti.rs +++ b/embassy-stm32f4/src/exti.rs | |||
| @@ -60,9 +60,9 @@ impl<T: HalExtiPin + 'static, I: OwnedInterrupt + 'static> WaitForRisingEdge for | |||
| 60 | fn wait_for_rising_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { | 60 | fn wait_for_rising_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { |
| 61 | let s = unsafe { self.get_unchecked_mut() }; | 61 | let s = unsafe { self.get_unchecked_mut() }; |
| 62 | 62 | ||
| 63 | s.pin.clear_interrupt_pending_bit(); | ||
| 63 | async move { | 64 | async move { |
| 64 | let fut = InterruptFuture::new(&mut s.interrupt); | 65 | let fut = InterruptFuture::new(&mut s.interrupt); |
| 65 | s.pin.clear_interrupt_pending_bit(); | ||
| 66 | let mut exti: EXTI = unsafe { mem::transmute(()) }; | 66 | let mut exti: EXTI = unsafe { mem::transmute(()) }; |
| 67 | 67 | ||
| 68 | s.pin.trigger_on_edge(&mut exti, Edge::RISING); | 68 | s.pin.trigger_on_edge(&mut exti, Edge::RISING); |
| @@ -80,9 +80,9 @@ impl<T: HalExtiPin + 'static, I: OwnedInterrupt + 'static> WaitForFallingEdge fo | |||
| 80 | fn wait_for_falling_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { | 80 | fn wait_for_falling_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { |
| 81 | let s = unsafe { self.get_unchecked_mut() }; | 81 | let s = unsafe { self.get_unchecked_mut() }; |
| 82 | 82 | ||
| 83 | s.pin.clear_interrupt_pending_bit(); | ||
| 83 | async move { | 84 | async move { |
| 84 | let fut = InterruptFuture::new(&mut s.interrupt); | 85 | let fut = InterruptFuture::new(&mut s.interrupt); |
| 85 | s.pin.clear_interrupt_pending_bit(); | ||
| 86 | let mut exti: EXTI = unsafe { mem::transmute(()) }; | 86 | let mut exti: EXTI = unsafe { mem::transmute(()) }; |
| 87 | 87 | ||
| 88 | s.pin.trigger_on_edge(&mut exti, Edge::FALLING); | 88 | s.pin.trigger_on_edge(&mut exti, Edge::FALLING); |
