You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Track which read endpoints have completed, so as to not
/// confuse the device and appear out of sync with poll() calls.
///
/// Persisting the ep_out mask across poll() calls lets us make
/// sure that results of ep_read calls match what's signaled from
/// poll() calls. During testing, we saw that poll() wouldn't signal
/// ep_out complete. But, the class could still call ep_read(), and
/// it would return data. The usb-device test_class treats that as
/// a failure, so we should keep behaviors consistent.
ep_out:u16,
I don't remember why we couldn't keep this state in ENDPTCOMPLETE[ERCE]. After a second glance, it seems like we could drop this bitmask and maintain the state in the registers. The flags persist in ERCE until ep_read returns data to the caller and schedules the next OUT transfer.
Figure out if this bitmask is still necessary. If it is necessary, add a comment to clarify why we can't keep the flags in ENDPTCOMPLETE[ERCE].
The text was updated successfully, but these errors were encountered:
Nevermind, I remember now. Had to read that comment a few times.
poll() called, no ep_out bit set.
Device receives OUT packet with data.
Something reads the endpoint, and finds data.
The mask hides the fact that the driver could receive data before poll() is called. From these notes, it sounds like the test class treats that as an error. I'm not sure why.
imxrt-usbd/src/full_speed/driver.rs
Lines 53 to 62 in 4c97f65
I don't remember why we couldn't keep this state in
ENDPTCOMPLETE[ERCE]
. After a second glance, it seems like we could drop this bitmask and maintain the state in the registers. The flags persist inERCE
untilep_read
returns data to the caller and schedules the next OUT transfer.Figure out if this bitmask is still necessary. If it is necessary, add a comment to clarify why we can't keep the flags in
ENDPTCOMPLETE[ERCE]
.The text was updated successfully, but these errors were encountered: