Skip to content
Snippets Groups Projects
Commit 3a5de792 authored by Matt Johnston's avatar Matt Johnston
Browse files

Don't sent 64 byte USB packets

This should let us ignore ZLP problems.
Perhaps performance could be improved later.
parent 099928df
No related merge requests found
...@@ -88,7 +88,8 @@ pub async fn usb_serial(usb: embassy_rp::peripherals::USB, ...@@ -88,7 +88,8 @@ pub async fn usb_serial(usb: embassy_rp::peripherals::USB,
}; };
let io_rx = async { let io_rx = async {
let mut b = [0u8; 64]; // limit to 63 so we can ignore dealing with ZLPs for now
let mut b = [0u8; 63];
loop { loop {
let n = rx.read(&mut b).await.map_err(|_| IoDone)?; let n = rx.read(&mut b).await.map_err(|_| IoDone)?;
if n == 0 { if n == 0 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment