We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5557ec commit 3b38a41Copy full SHA for 3b38a41
cores/arduino/USB/USBAPI.h
@@ -58,6 +58,7 @@ class USBDeviceClass {
58
59
// USB Device API
60
void init();
61
+ bool end();
62
bool attach();
63
bool detach();
64
void setAddress(uint32_t addr);
cores/arduino/USB/USBCore.cpp
@@ -387,6 +387,13 @@ bool USBDeviceClass::detach()
387
return true;
388
}
389
390
+bool USBDeviceClass::end() {
391
+ if (!initialized)
392
+ return false;
393
+ usbd.disable();
394
+ return true;
395
+}
396
+
397
bool USBDeviceClass::configured()
398
{
399
return _usbConfiguration != 0;
0 commit comments