Skip to content

Commit 3c84f7c

Browse files
cmagliefacchinm
authored andcommitted
USBDevice: BULK-IN endpoints automatically clears BK1RDY flag
1 parent 02657fb commit 3c84f7c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

cores/arduino/USB/CDC.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,7 @@ uint8_t Serial_::getShortName(char* name) {
118118
}
119119

120120
void Serial_::handleEndpoint(int ep) {
121-
if (ep == CDC_ENDPOINT_IN)
122-
{
123-
// NAK on endpoint IN, the bank is not yet filled in.
124-
usbd.epBank1ResetReady(CDC_ENDPOINT_IN);
125-
usbd.epBank1AckTransferComplete(CDC_ENDPOINT_IN);
126-
}
127-
if (ep == CDC_ENDPOINT_ACM)
128-
{
129-
// NAK on endpoint IN, the bank is not yet filled in.
130-
usbd.epBank1ResetReady(CDC_ENDPOINT_ACM);
131-
usbd.epBank1AckTransferComplete(CDC_ENDPOINT_ACM);
132-
}
121+
usbd.epAckPendingInterrupts(ep);
133122
}
134123

135124
bool Serial_::setup(USBSetup& setup)

0 commit comments

Comments
 (0)