pub async fn receive_async(&mut self) -> Result<EspTwaiFrame, EspTwaiError> {
            self.twai.enable_interrupts();
            poll_fn(|cx| {
                self.twai.async_state().err_waker.register(cx.waker());

                if let Poll::Ready(result) = self.twai.async_state().rx_queue.poll_receive(cx) {
                    return Poll::Ready(result);
                }

                let status = self.regs().status().read();

                // Check that the peripheral is not in a bus off state.
                if status.bus_off_st().bit_is_set() {
                    return Poll::Ready(Err(EspTwaiError::BusOff));
                }

                // Check if the packet in the receive buffer is valid or overrun.
                if status.miss_st().bit_is_set() {
                    return Poll::Ready(Err(EspTwaiError::EmbeddedHAL(ErrorKind::Overrun)));
                }

                Poll::Pending
            })
            .await
        }
Receives an `EspTwaiFrame` asynchronously over the TWAI bus.
esp-hal/src/twai/mod.rs