diff options
| author | Nathan Conrad <[email protected]> | 2019-09-21 12:04:49 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2019-09-21 12:05:57 -0400 |
| commit | a187f0268c9c42bfbfb22338692dfffed3f9bac5 (patch) | |
| tree | 38888374133c1990772091c00694ee97b649e3ba | |
| parent | be28a05409f80f9fe983306b1fc60e1ea30da0bc (diff) | |
When unstalling, EP must be marked as not busy. Also, mark EP as busy when stalling as xfer requests should fail.
| -rw-r--r-- | src/device/usbd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index b7a44d24e..e0148dc97 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -870,6 +870,7 @@ void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr) dcd_edpt_stall(rhport, ep_addr);
_usbd_dev.ep_stall_map[dir] = (uint8_t) tu_bit_set(_usbd_dev.ep_stall_map[dir], epnum);
+ _usbd_dev.ep_busy_map[dir] = (uint8_t) tu_bit_set(_usbd_dev.ep_busy_map[dir], epnum);
}
void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
@@ -878,6 +879,7 @@ void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) uint8_t const dir = tu_edpt_dir(ep_addr);
dcd_edpt_clear_stall(rhport, ep_addr);
+ _usbd_dev.ep_busy_map[dir] = (uint8_t) tu_bit_clear(_usbd_dev.ep_busy_map[dir], epnum);
_usbd_dev.ep_stall_map[dir] = (uint8_t) tu_bit_clear(_usbd_dev.ep_stall_map[dir], epnum);
}
|
