Ensure the compiler doesn't reorder things before calling the sampler

This commit is contained in:
huntc 2021-10-18 11:28:43 +11:00
parent 785030df96
commit c7e426655d

View File

@ -316,6 +316,8 @@ impl<'d, const N: usize> Saadc<'d, N> {
WAKER.register(cx.waker());
if r.events_end.read().bits() != 0 {
compiler_fence(Ordering::SeqCst);
r.events_end.reset();
r.intenset.write(|w| w.end().set());