diff options
| -rw-r--r-- | embassy-rp/src/pio.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs index 31273b5d8..c2c144c00 100644 --- a/embassy-rp/src/pio.rs +++ b/embassy-rp/src/pio.rs | |||
| @@ -191,17 +191,10 @@ impl<'a, 'd, PIO: Instance> Future for IrqFuture<'a, 'd, PIO> { | |||
| 191 | //debug!("Poll {},{}", PIO::PIO_NO, SM); | 191 | //debug!("Poll {},{}", PIO::PIO_NO, SM); |
| 192 | 192 | ||
| 193 | // Check if IRQ flag is already set | 193 | // Check if IRQ flag is already set |
| 194 | if critical_section::with(|_| unsafe { | 194 | if unsafe { PIO::PIO.irq().read().0 & (1 << self.irq_no) != 0 } { |
| 195 | let irq_flags = PIO::PIO.irq(); | 195 | unsafe { |
| 196 | if irq_flags.read().0 & (1 << self.irq_no) != 0 { | 196 | PIO::PIO.irq().write(|m| m.0 = 1 << self.irq_no); |
| 197 | irq_flags.write(|m| { | ||
| 198 | m.0 = 1 << self.irq_no; | ||
| 199 | }); | ||
| 200 | true | ||
| 201 | } else { | ||
| 202 | false | ||
| 203 | } | 197 | } |
| 204 | }) { | ||
| 205 | return Poll::Ready(()); | 198 | return Poll::Ready(()); |
| 206 | } | 199 | } |
| 207 | 200 | ||
