Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit 10ad267

Browse files
committed
Modify USB assert patch to handle OUT ep
1 parent 463c58a commit 10ad267

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

patches/0002-HACK-avoid-10862-by-not-firing-the-assert.patch

+18
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,25 @@ index 3ee73c8ba7..c6a088069e 100644
2626
+ }
2727
}
2828
}
29+
30+
--- a/drivers/source/usb/USBDevice.cpp
31+
+++ b/drivers/source/usb/USBDevice.cpp
32+
@@ -1007,10 +1008,11 @@ void USBDevice::in(usb_ep_t endpoint)
33+
34+
endpoint_info_t *info = &_endpoint_info[EP_TO_INDEX(endpoint)];
2935

36+
- MBED_ASSERT(info->pending >= 1);
37+
- info->pending -= 1;
38+
- if (info->callback) {
39+
- info->callback();
40+
+ if (info->pending >= 1) {
41+
+ info->pending -= 1;
42+
+ if (info->callback) {
43+
+ info->callback();
44+
+ }
45+
}
46+
}
47+
3048
--
3149
2.23.0
3250

0 commit comments

Comments
 (0)