fn copy(
    reader: &mut bsp::usb::Reader,
    writer: &mut bsp::usb::Writer,
) -> Result<(), bsp::usb::Error> {
    let mut buffer: [u8; 256] = [0; 256];
    loop {
        let available = reader.read(&mut buffer)?;
        if available == 0 {
            break;
        }
        writer.write(&buffer[..available])?;
    }
    Ok(())
}
/// Copy data from the reader to the writer
Copy data from the reader to the writer
Copy data from the reader to the writer
fn copy(
    reader: &mut bsp::usb::Reader,
    writer: &mut bsp::usb::Writer,
) -> Result<(), bsp::usb::Error> {
    let mut buffer: [u8; 256] = [0; 256];
    loop {
        let available = reader.read(&mut buffer)?;
        if available == 0 {
            break;
        }
        writer.write(&buffer[..available])?;
    }
    Ok(())
}
fn copy ( reader : & mut bsp :: usb :: Reader , writer : & mut bsp :: usb :: Writer , ) -> Result < ( ) , bsp :: usb :: Error > { let mut buffer : [ u8 ; 256 ] = [ 0 ; 256 ] ; loop { let available = reader . read ( & mut buffer ) ? ; if available == 0 { break ; } writer . write ( & buffer [ .. available ] ) ? ; } Ok ( ( ) ) }
Copy data from the reader to the writer
Copy data from the reader to the writer
reader
&mut bsp::usb::Reader
writer
&mut bsp::usb::Writer
reader
&mut bsp::usb::Reader
writer
&mut bsp::usb::Writer