summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-21 12:04:49 -0400
committerNathan Conrad <[email protected]>2019-09-21 12:05:57 -0400
commita187f0268c9c42bfbfb22338692dfffed3f9bac5 (patch)
tree38888374133c1990772091c00694ee97b649e3ba /src/device
parentbe28a05409f80f9fe983306b1fc60e1ea30da0bc (diff)
When unstalling, EP must be marked as not busy. Also, mark EP as busy when stalling as xfer requests should fail.
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c2
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);
}