Stm flush required implementing also, along with std alloc split

This commit is contained in:
huntc 2021-12-10 15:11:41 +11:00
parent 5d502ec0af
commit 45ef944457
2 changed files with 17 additions and 0 deletions
embassy-stm32/src/usart

View file

@ -449,6 +449,20 @@ mod buffered {
}
poll
}
fn poll_flush(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), embassy::io::Error>> {
self.inner.with(|state| {
if !state.tx.is_empty() {
state.tx_waker.register(cx.waker());
return Poll::Pending;
}
Poll::Ready(Ok(()))
})
}
}
}