Ensure the compiler doesn't reorder things before calling the sampler
This commit is contained in:
parent
785030df96
commit
c7e426655d
@ -316,6 +316,8 @@ impl<'d, const N: usize> Saadc<'d, N> {
|
|||||||
WAKER.register(cx.waker());
|
WAKER.register(cx.waker());
|
||||||
|
|
||||||
if r.events_end.read().bits() != 0 {
|
if r.events_end.read().bits() != 0 {
|
||||||
|
compiler_fence(Ordering::SeqCst);
|
||||||
|
|
||||||
r.events_end.reset();
|
r.events_end.reset();
|
||||||
r.intenset.write(|w| w.end().set());
|
r.intenset.write(|w| w.end().set());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user