imxrt-rs / imxrt-hal

Rust for NXP i.MX RT
Apache License 2.0
133 stars 33 forks source link

Read the OUT endpoint in the USB device logger #129

Closed mciantyre closed 1 year ago

mciantyre commented 1 year ago

If we don't read data that the hosts sends us, we buffer the data and NAK the host. The host might not like that. This commit resolves USB device logging issues observed on a Linux host. See here 1 for the troubleshooting and discussions.

Just by attempting to read, we mark the transfer as complete on our end. The driver doesn't attempt to copy anything, and it'll effectively discard the data by scheduling another transfer over whatever we received.