reformat
This commit is contained in:
parent
a5cf65a17b
commit
ea36029a3d
@ -246,8 +246,8 @@ where
|
|||||||
|
|
||||||
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<B> {
|
fn poll(self: core::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<B> {
|
||||||
let Self { uarte, rx_transfer } = unsafe { self.get_unchecked_mut() };
|
let Self { uarte, rx_transfer } = unsafe { self.get_unchecked_mut() };
|
||||||
|
let mut taken = rx_transfer.take().unwrap();
|
||||||
if true {
|
if taken.is_done() {
|
||||||
let (rx_stream, usart, buf, _) = rx_transfer.take().unwrap().free();
|
let (rx_stream, usart, buf, _) = rx_transfer.take().unwrap().free();
|
||||||
|
|
||||||
uarte.rx_stream.replace(rx_stream);
|
uarte.rx_stream.replace(rx_stream);
|
||||||
@ -257,7 +257,6 @@ where
|
|||||||
} else {
|
} else {
|
||||||
waker_interrupt!(DMA2_STREAM2, cx.waker().clone());
|
waker_interrupt!(DMA2_STREAM2, cx.waker().clone());
|
||||||
|
|
||||||
let mut taken = rx_transfer.take().unwrap();
|
|
||||||
taken.start(|usart| {});
|
taken.start(|usart| {});
|
||||||
rx_transfer.replace(taken);
|
rx_transfer.replace(taken);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user