Skip to content

Commit 3d795c3

Browse files
committed
Removed other unused variables in CDC.cpp and HID.cpp
See #1877
1 parent abbebed commit 3d795c3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Diff for: hardware/arduino/avr/cores/arduino/HID.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,11 @@ void Keyboard_::releaseAll(void)
510510

511511
size_t Keyboard_::write(uint8_t c)
512512
{
513-
uint8_t p = press(c); // Keydown
514-
uint8_t r = release(c); // Keyup
515-
return (p); // just return the result of press() since release() almost always returns 1
513+
uint8_t p = press(c); // Keydown
514+
release(c); // Keyup
515+
return p; // just return the result of press() since release() almost always returns 1
516516
}
517517

518518
#endif
519519

520-
#endif /* if defined(USBCON) */
520+
#endif /* if defined(USBCON) */

Diff for: hardware/arduino/avr/cores/arduino/USBCore.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ int USB_Send(u8 ep, const void* d, int len)
274274

275275
int r = len;
276276
const u8* data = (const u8*)d;
277-
u8 zero = ep & TRANSFER_ZERO;
278277
u8 timeout = 250; // 250ms timeout on send? TODO
279278
while (len)
280279
{

0 commit comments

Comments
 (0)