aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-rp/src/adc.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-rp/src/adc.rs b/embassy-rp/src/adc.rs
index 8defb5231..1265a22a0 100644
--- a/embassy-rp/src/adc.rs
+++ b/embassy-rp/src/adc.rs
@@ -205,11 +205,13 @@ impl<'d> Adc<'d, Async> {
205 205
206 fn wait_for_ready() -> impl Future<Output = ()> { 206 fn wait_for_ready() -> impl Future<Output = ()> {
207 let r = Self::regs(); 207 let r = Self::regs();
208 r.inte().write(|w| w.set_fifo(true));
209 compiler_fence(Ordering::SeqCst);
210 208
211 poll_fn(move |cx| { 209 poll_fn(move |cx| {
212 WAKER.register(cx.waker()); 210 WAKER.register(cx.waker());
211
212 r.inte().write(|w| w.set_fifo(true));
213 compiler_fence(Ordering::SeqCst);
214
213 if r.cs().read().ready() { 215 if r.cs().read().ready() {
214 return Poll::Ready(()); 216 return Poll::Ready(());
215 } 217 }