Skip to content

Commit

Permalink
add USBCore_::configured
Browse files Browse the repository at this point in the history
  • Loading branch information
tlyu committed Jan 11, 2023
1 parent 1fc68d2 commit aa11db5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/arduino/USBCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,4 +998,9 @@ bool USBCore_::isSuspended()
{
return USBCore().usbDev().cur_status == USBD_SUSPENDED;
}

bool USBCore_::configured()
{
return USBCore().usbDev().config != 0;
}
#endif
1 change: 1 addition & 0 deletions cores/arduino/USBCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class USBCore_
void connect();
void disconnect();
bool isSuspended();
bool configured();

/*
* PluggableUSB interface.
Expand Down

0 comments on commit aa11db5

Please sign in to comment.