pub async fn read_async(&mut self, buf: &mut [u8]) -> Result<usize, RxError> {
        if buf.is_empty() {
            return Ok(0);
        }

        self.wait_for_buffered_data(1, buf.len(), true).await?;

        self.read_buffered(buf)
    }
Read data asynchronously.

This function reads data from the UART receive buffer into the
provided buffer. If the buffer is empty, the function waits
asynchronously for data to become available, or for an error to occur.

The function returns the number of bytes read into the buffer. This may
be less than the length of the buffer.

Note that this function may ignore the `rx_fifo_full_threshold` setting
to ensure that it does not wait for more data than the buffer can hold.

Upon an error, the function returns immediately and the contents of the
internal FIFO are not modified.

## Cancellation

This function is cancellation safe.
esp-hal/src/uart.rs