File tree 2 files changed +8
-12
lines changed
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,7 @@ uint8_t Serial_::getShortName(char* name) {
117
117
return 32 ;
118
118
}
119
119
120
- void Serial_::handleEndpoint (int ep) {
121
- usbd.epAckPendingInterrupts (ep);
120
+ void Serial_::handleEndpoint (int /* ep */ ) {
122
121
}
123
122
124
123
bool Serial_::setup (USBSetup& setup)
Original file line number Diff line number Diff line change @@ -833,8 +833,6 @@ void USBDeviceClass::ISRHandler()
833
833
// Endpoint 0 Received Setup interrupt
834
834
if (usbd.epBank0IsSetupReceived (0 ))
835
835
{
836
- usbd.epBank0AckSetupReceived (0 );
837
-
838
836
USBSetup *setup = reinterpret_cast <USBSetup *>(udd_ep_out_cache_buffer[0 ]);
839
837
840
838
delayMicroseconds (10 );
@@ -859,24 +857,23 @@ void USBDeviceClass::ISRHandler()
859
857
860
858
if (usbd.epBank1IsStalled (0 ))
861
859
{
862
- usbd.epBank1AckStalled (0 );
863
-
864
860
// Remove stall request
865
861
usbd.epBank1DisableStalled (0 );
866
862
}
867
-
868
863
} // end Received Setup handler
864
+ usbd.epAckPendingInterrupts (0 );
869
865
870
- for (int i = 1 ; i < USB_EPT_NUM; i ++) {
866
+ for (int ep = 1 ; ep < USB_EPT_NUM; ep ++) {
871
867
// Endpoint Transfer Complete (0/1) Interrupt
872
- if (usbd.epBank0IsTransferComplete (i) || usbd. epBank1IsTransferComplete (i)) {
873
- if (epHandlers[i ]) {
874
- epHandlers[i ]->handleEndpoint ();
868
+ if (usbd.epHasPendingInterrupts (ep)) {
869
+ if (epHandlers[ep ]) {
870
+ epHandlers[ep ]->handleEndpoint ();
875
871
} else {
876
872
#if defined(PLUGGABLE_USB_ENABLED)
877
- PluggableUSB ().handleEndpoint (i );
873
+ PluggableUSB ().handleEndpoint (ep );
878
874
#endif
879
875
}
876
+ usbd.epAckPendingInterrupts (ep);
880
877
}
881
878
}
882
879
}
You can’t perform that action at this time.
0 commit comments