aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBCore.cpp
diff options
context:
space:
mode:
authorAlexander Entinger <consulting@lxrobotics.com>2019-09-16 10:21:51 +0200
committerGitHub <noreply@github.com>2019-09-16 10:21:51 +0200
commit366b1b814702ec0da8951f9e13af882352442940 (patch)
tree597ffcfd6407f4b7c55639ee54f5b517c25c9e79 /cores/arduino/USBCore.cpp
parent0c5aa78ff40d208a1341b3dae84166e837901070 (diff)
parent742abcd9660d4b754fede51f098113fca918cb54 (diff)
Merge branch 'master' into patch-1
Diffstat (limited to 'cores/arduino/USBCore.cpp')
-rw-r--r--cores/arduino/USBCore.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp
index 81f689d..dc6bc38 100644
--- a/cores/arduino/USBCore.cpp
+++ b/cores/arduino/USBCore.cpp
@@ -496,14 +496,13 @@ bool SendConfiguration(int maxlen)
static
bool SendDescriptor(USBSetup& setup)
{
- int ret;
u8 t = setup.wValueH;
if (USB_CONFIGURATION_DESCRIPTOR_TYPE == t)
return SendConfiguration(setup.wLength);
InitControl(setup.wLength);
#ifdef PLUGGABLE_USB_ENABLED
- ret = PluggableUSB().getDescriptor(setup);
+ int ret = PluggableUSB().getDescriptor(setup);
if (ret != 0) {
return (ret > 0 ? true : false);
}
@@ -855,4 +854,10 @@ bool USBDevice_::wakeupHost()
return false;
}
+bool USBDevice_::isSuspended()
+{
+ return (_usbSuspendState & (1 << SUSPI));
+}
+
+
#endif /* if defined(USBCON) */