File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -980,10 +980,11 @@ void USBDevice::out(usb_ep_t endpoint)
980
980
981
981
endpoint_info_t *info = &_endpoint_info[EP_TO_INDEX (endpoint)];
982
982
983
- MBED_ASSERT (info->pending >= 1 );
984
- info->pending -= 1 ;
985
- if (info->callback ) {
986
- info->callback ();
983
+ if (info->pending >= 1 ) {
984
+ info->pending -= 1 ;
985
+ if (info->callback ) {
986
+ info->callback ();
987
+ }
987
988
}
988
989
}
989
990
@@ -1007,10 +1008,11 @@ void USBDevice::in(usb_ep_t endpoint)
1007
1008
1008
1009
endpoint_info_t *info = &_endpoint_info[EP_TO_INDEX (endpoint)];
1009
1010
1010
- MBED_ASSERT (info->pending >= 1 );
1011
- info->pending -= 1 ;
1012
- if (info->callback ) {
1013
- info->callback ();
1011
+ if (info->pending >= 1 ) {
1012
+ info->pending -= 1 ;
1013
+ if (info->callback ) {
1014
+ info->callback ();
1015
+ }
1014
1016
}
1015
1017
}
1016
1018
You can’t perform that action at this time.
0 commit comments