Implement Channel::poll_receive(..) -> Poll<T>

This commit is contained in:
Ruben De Smet
2023-08-11 11:30:29 +02:00
parent f9d251cd5c
commit b1ec460b9a
2 changed files with 40 additions and 5 deletions

View File

@ -46,7 +46,7 @@ impl<'d> embassy_net_driver::Driver for Driver<'d> {
}
fn transmit(&mut self, cx: &mut Context) -> Option<Self::TxToken<'_>> {
if self.runner.tx_buf_channel.poll_ready_to_receive(cx) {
if self.runner.tx_buf_channel.poll_ready_to_receive(cx).is_ready() {
Some(TxToken {
tx: &self.runner.tx_channel,
tx_buf: &self.runner.tx_buf_channel,