aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/usart/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs
index 83cdd66b9..0466065f1 100644
--- a/embassy-stm32/src/usart/mod.rs
+++ b/embassy-stm32/src/usart/mod.rs
@@ -106,6 +106,8 @@ impl<'d, T: Instance, TxDma> UartTx<'d, T, TxDma> {
106 reg.set_dmat(true); 106 reg.set_dmat(true);
107 }); 107 });
108 } 108 }
109 // If we don't assign future to a variable, the data register pointer
110 // is held across an await and makes the future non-Send.
109 let transfer = crate::dma::write(ch, request, buffer, tdr(T::regs())); 111 let transfer = crate::dma::write(ch, request, buffer, tdr(T::regs()));
110 transfer.await; 112 transfer.await;
111 Ok(()) 113 Ok(())
@@ -150,6 +152,8 @@ impl<'d, T: Instance, RxDma> UartRx<'d, T, RxDma> {
150 reg.set_dmar(true); 152 reg.set_dmar(true);
151 }); 153 });
152 } 154 }
155 // If we don't assign future to a variable, the data register pointer
156 // is held across an await and makes the future non-Send.
153 let transfer = crate::dma::read(ch, request, rdr(T::regs()), buffer); 157 let transfer = crate::dma::read(ch, request, rdr(T::regs()), buffer);
154 transfer.await; 158 transfer.await;
155 Ok(()) 159 Ok(())