Skip to content

Commit feea757

Browse files
elagilferris
authored andcommitted
fix: only ISO EP is always double buffered
1 parent eebe4ff commit feea757

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

embassy-stm32/src/usb/usb.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,11 @@ impl<'d, T: Instance> Driver<'d, T> {
368368
return false; // reserved for control pipe
369369
}
370370
let used = ep.used_out || ep.used_in;
371-
if used && (ep.ep_type == EndpointType::Isochronous || ep.ep_type == EndpointType::Bulk) {
372-
// Isochronous and bulk endpoints are double-buffered.
371+
if used && (ep.ep_type == EndpointType::Isochronous) {
372+
// Isochronous endpoints are always double-buffered.
373373
// Their corresponding endpoint/channel registers are forced to be unidirectional.
374374
// Do not reuse this index.
375+
// FIXME: Bulk endpoints can be double buffered, but are not in the current implementation.
375376
return false;
376377
}
377378

0 commit comments

Comments
 (0)