Make UART futures Send

This commit is contained in:
chemicstry 2022-03-17 18:23:47 +02:00
parent 75e5b39799
commit 051c6350ea

View File

@ -106,8 +106,8 @@ impl<'d, T: Instance, TxDma> UartTx<'d, T, TxDma> {
reg.set_dmat(true); reg.set_dmat(true);
}); });
} }
let dst = tdr(T::regs()); let transfer = crate::dma::write(ch, request, buffer, tdr(T::regs()));
crate::dma::write(ch, request, buffer, dst).await; transfer.await;
Ok(()) Ok(())
} }
@ -150,9 +150,8 @@ impl<'d, T: Instance, RxDma> UartRx<'d, T, RxDma> {
reg.set_dmar(true); reg.set_dmar(true);
}); });
} }
let r = T::regs(); let transfer = crate::dma::read(ch, request, rdr(T::regs()), buffer);
let src = rdr(r); transfer.await;
crate::dma::read(ch, request, src, buffer).await;
Ok(()) Ok(())
} }