Skip to content

Commit 86d2463

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/USB/USBCore.cpp

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy