pub fn drain_rx_fifo(&mut self, buf: &mut [u8]) -> usize {
        let mut count = 0;
        while let Ok(value) = self.read_byte() {
            buf[count] = value;
            count += 1;
            if count == buf.len() {
                break;
            }
        }
        count
    }
Read all available bytes from the RX FIFO into the provided buffer and
returns the number of read bytes. Never blocks. May stop early if the
number of bytes in the FIFO is larger than `buf`.
esp-hal/src/usb_serial_jtag.rs