Skip to content

Commit 5d502c5

Browse files
committed
Fix from: unintended fall-through of case statment
1 parent e132b3e commit 5d502c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cores/arduino/USB/USBCore.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ bool USBDeviceClass::sendDescriptor(USBSetup &setup)
204204
{
205205
uint8_t t = setup.wValueH;
206206
uint8_t desc_length = 0;
207-
bool _cdcComposite;
207+
bool _cdcComposite = 0;
208208
int ret;
209209
const uint8_t *desc_addr = 0;
210210

@@ -559,7 +559,7 @@ void USBDeviceClass::flush(uint32_t ep)
559559
// RAM buffer is full, we can send data (IN)
560560
usbd.epBank1SetReady(ep);
561561

562-
// Clear the transfer complete flag
562+
// Clear the transfer complete flag
563563
usbd.epBank1AckTransferComplete(ep);
564564
}
565565
}
@@ -877,6 +877,7 @@ bool USBDeviceClass::handleStandardSetup(USBSetup &setup)
877877
sendZlp(0);
878878
return true;
879879
}
880+
return false;
880881

881882
case SET_ADDRESS:
882883
setAddress(setup.wValueL);
@@ -1010,7 +1011,6 @@ void USBDeviceClass::ISRHandler()
10101011
// Check if endpoint has a pending interrupt
10111012
if ((ept_int & (1 << i)) != 0)
10121013
{
1013-
10141014
// Endpoint Transfer Complete (0/1) Interrupt
10151015
if (usbd.epBank0IsTransferComplete(i) ||
10161016
usbd.epBank1IsTransferComplete(i))

libraries/HID/HID.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ bool HID_::setup(USBSetup& setup)
146146

147147
HID_::HID_(void) : PluggableUSBModule(1, 1, epType),
148148
rootNode(NULL), descriptorSize(0),
149-
protocol(1), idle(1)
149+
protocol(HID_REPORT_PROTOCOL), idle(1)
150150
{
151151
epType[0] = USB_ENDPOINT_TYPE_INTERRUPT | USB_ENDPOINT_IN(0);;
152152
PluggableUSB().plug(this);

0 commit comments

Comments
 (0)