summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-16 10:27:16 +0700
committerhathach <[email protected]>2024-04-16 10:27:16 +0700
commit5dabef79eeb7d6ca271b2a09abddb700bc59ca03 (patch)
tree6319e2fe570db412616debc53a0df9b7b7f171f4 /src
parent9588c3fac9e6625e73357f6edddd12f6d11cbd7d (diff)
don't check local endpoint stalled status, just carry the request for host.
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 034a9ae09..109c3462d 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -1306,12 +1306,10 @@ void usbd_edpt_stall(uint8_t rhport, uint8_t ep_addr) {
uint8_t const dir = tu_edpt_dir(ep_addr);
// only stalled if currently cleared
- if (!_usbd_dev.ep_status[epnum][dir].stalled) {
- TU_LOG_USBD(" Stall EP %02X\r\n", ep_addr);
- dcd_edpt_stall(rhport, ep_addr);
- _usbd_dev.ep_status[epnum][dir].stalled = 1;
- _usbd_dev.ep_status[epnum][dir].busy = 1;
- }
+ TU_LOG_USBD(" Stall EP %02X\r\n", ep_addr);
+ dcd_edpt_stall(rhport, ep_addr);
+ _usbd_dev.ep_status[epnum][dir].stalled = 1;
+ _usbd_dev.ep_status[epnum][dir].busy = 1;
}
void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) {
@@ -1321,12 +1319,10 @@ void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) {
uint8_t const dir = tu_edpt_dir(ep_addr);
// only clear if currently stalled
- if (_usbd_dev.ep_status[epnum][dir].stalled) {
- TU_LOG_USBD(" Clear Stall EP %02X\r\n", ep_addr);
- dcd_edpt_clear_stall(rhport, ep_addr);
- _usbd_dev.ep_status[epnum][dir].stalled = 0;
- _usbd_dev.ep_status[epnum][dir].busy = 0;
- }
+ TU_LOG_USBD(" Clear Stall EP %02X\r\n", ep_addr);
+ dcd_edpt_clear_stall(rhport, ep_addr);
+ _usbd_dev.ep_status[epnum][dir].stalled = 0;
+ _usbd_dev.ep_status[epnum][dir].busy = 0;
}
bool usbd_edpt_stalled(uint8_t rhport, uint8_t ep_addr) {