Change interrupt modify into write

This commit is contained in:
Henrik Alsér 2022-11-22 02:03:34 +01:00
parent 9f870a5edf
commit 908eef2775

View file

@ -65,7 +65,7 @@ impl<'d> Adc<'d> {
irq.disable(); irq.disable();
irq.set_handler(|_| unsafe { irq.set_handler(|_| unsafe {
let r = Self::regs(); let r = Self::regs();
r.inte().modify(|w| w.set_fifo(false)); r.inte().write(|w| w.set_fifo(false));
WAKER.wake(); WAKER.wake();
}); });
irq.unpend(); irq.unpend();
@ -77,7 +77,7 @@ impl<'d> Adc<'d> {
async fn wait_for_ready() { async fn wait_for_ready() {
let r = Self::regs(); let r = Self::regs();
unsafe { unsafe {
r.inte().modify(|w| w.set_fifo(true)); r.inte().write(|w| w.set_fifo(true));
compiler_fence(Ordering::SeqCst); compiler_fence(Ordering::SeqCst);
poll_fn(|cx| { poll_fn(|cx| {
WAKER.register(cx.waker()); WAKER.register(cx.waker());