minor rework to get tx working (maybe)
This commit is contained in:
parent
60c7d112b1
commit
c6cf9b801d
1 changed files with 3 additions and 6 deletions
|
@ -207,10 +207,9 @@ where
|
||||||
|
|
||||||
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
|
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
|
||||||
let Self { uarte, tx_transfer } = unsafe { self.get_unchecked_mut() };
|
let Self { uarte, tx_transfer } = unsafe { self.get_unchecked_mut() };
|
||||||
|
let mut taken = tx_transfer.take().unwrap();
|
||||||
if true {
|
if taken.is_done() {
|
||||||
// tx_transfer.unwrap().is_done() {
|
let (tx_stream, usart, buf, _) = taken.free();
|
||||||
let (tx_stream, usart, buf, _) = tx_transfer.take().unwrap().free();
|
|
||||||
|
|
||||||
uarte.tx_stream.replace(tx_stream);
|
uarte.tx_stream.replace(tx_stream);
|
||||||
uarte.usart.replace(usart);
|
uarte.usart.replace(usart);
|
||||||
|
@ -218,8 +217,6 @@ where
|
||||||
Poll::Ready(())
|
Poll::Ready(())
|
||||||
} else {
|
} else {
|
||||||
waker_interrupt!(DMA2_STREAM7, cx.waker().clone());
|
waker_interrupt!(DMA2_STREAM7, cx.waker().clone());
|
||||||
// tx_transfer.take().start(|usart| {});
|
|
||||||
let mut taken = tx_transfer.take().unwrap();
|
|
||||||
taken.start(|usart| {});
|
taken.start(|usart| {});
|
||||||
tx_transfer.replace(taken);
|
tx_transfer.replace(taken);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue