Skip to content

Commit e637f2e

Browse files
committed
add USBCore_::configured
1 parent 7268144 commit e637f2e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cores/arduino/USBCore.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,4 +994,9 @@ bool USBCore_::isSuspended()
994994
{
995995
return USBCore().usbDev().cur_status == USBD_SUSPENDED;
996996
}
997+
998+
bool USBCore_::configured()
999+
{
1000+
return USBCore().usbDev().config != 0;
1001+
}
9971002
#endif

cores/arduino/USBCore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class USBCore_
147147
void connect();
148148
void disconnect();
149149
bool isSuspended();
150+
bool configured();
150151

151152
/*
152153
* PluggableUSB interface.

0 commit comments

Comments
 (0)