Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 86d2463

Browse filesBrowse files
authored
Merge pull request #664 from pillilz/master
Fix USBDevice.connected()
2 parents ed21e12 + b2102c8 commit 86d2463
Copy full SHA for 86d2463

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎cores/arduino/USB/USBCore.cpp

Copy file name to clipboardExpand all lines: cores/arduino/USB/USBCore.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ void USBDeviceClass::stall(uint32_t ep)
480480
bool USBDeviceClass::connected()
481481
{
482482
// Count frame numbers
483-
uint8_t f = USB->DEVICE.FNUM.bit.FNUM;
484-
//delay(3);
483+
uint16_t f = USB->DEVICE.FNUM.bit.FNUM;
484+
delay(1); // wait for next SOF
485485
return f != USB->DEVICE.FNUM.bit.FNUM;
486486
}
487487

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.