File tree 2 files changed +9
-29
lines changed
2 files changed +9
-29
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ class USBDeviceClass {
85
85
// Generic EndPoint API
86
86
void initEndpoints (void );
87
87
void initEP (uint32_t ep, uint32_t type);
88
- void handleEndpoint (uint8_t ep);
89
88
90
89
uint32_t send (uint32_t ep, const void *data, uint32_t len);
91
90
void sendZlp (uint32_t ep);
Original file line number Diff line number Diff line change @@ -257,14 +257,6 @@ void USBDeviceClass::standby() {
257
257
usbd.noRunInStandby ();
258
258
}
259
259
260
-
261
- void USBDeviceClass::handleEndpoint (uint8_t ep)
262
- {
263
- #if defined(PLUGGABLE_USB_ENABLED)
264
- PluggableUSB ().handleEndpoint (ep);
265
- #endif
266
- }
267
-
268
260
void USBDeviceClass::init ()
269
261
{
270
262
#ifdef PIN_LED_TXL
@@ -879,28 +871,17 @@ void USBDeviceClass::ISRHandler()
879
871
880
872
} // end Received Setup handler
881
873
882
- uint8_t i=0 ;
883
- uint8_t ept_int = usbd.epInterruptSummary () & 0xFE ; // Remove endpoint number 0 (setup)
884
- while (ept_int != 0 )
885
- {
886
- // Check if endpoint has a pending interrupt
887
- if ((ept_int & (1 << i)) != 0 )
888
- {
889
- // Endpoint Transfer Complete (0/1) Interrupt
890
- if (usbd.epBank0IsTransferComplete (i) ||
891
- usbd.epBank1IsTransferComplete (i))
892
- {
893
- if (epHandlers[i]) {
894
- epHandlers[i]->handleEndpoint ();
895
- } else {
896
- handleEndpoint (i);
897
- }
874
+ for (int i = 1 ; i < USB_EPT_NUM; i++) {
875
+ // Endpoint Transfer Complete (0/1) Interrupt
876
+ if (usbd.epBank0IsTransferComplete (i) || usbd.epBank1IsTransferComplete (i)) {
877
+ if (epHandlers[i]) {
878
+ epHandlers[i]->handleEndpoint ();
879
+ } else {
880
+ #if defined(PLUGGABLE_USB_ENABLED)
881
+ PluggableUSB ().handleEndpoint (i);
882
+ #endif
898
883
}
899
- ept_int &= ~(1 << i);
900
884
}
901
- i++;
902
- if (i > USB_EPT_NUM)
903
- break ; // fire exit
904
885
}
905
886
}
906
887
You can’t perform that action at this time.
0 commit comments