aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBCore.cpp
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-10-01 17:35:26 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-10-02 11:59:24 +0200
commit8cab209ef91cbda34bae8afa880f152c4f1473b0 (patch)
tree8dd9e1d4a4ded2f4de3c578d60502e0a3e6fda89 /cores/arduino/USBCore.cpp
parent66d3eabe42fa4590b111d3fe8442c0e556acedcd (diff)
[PUSB] Fix static initialization order fiasco
For details see: https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
Diffstat (limited to 'cores/arduino/USBCore.cpp')
-rw-r--r--cores/arduino/USBCore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp
index ebdce36..5db9f52 100644
--- a/cores/arduino/USBCore.cpp
+++ b/cores/arduino/USBCore.cpp
@@ -362,7 +362,7 @@ bool ClassInterfaceRequest(USBSetup& setup)
return CDC_Setup(setup);
#ifdef PLUGGABLE_USB_ENABLED
- return PluggableUSB.setup(setup, i);
+ return PluggableUSB().setup(setup, i);
#endif
return false;
}
@@ -440,7 +440,7 @@ static u8 SendInterfaces()
CDC_GetInterface(&interfaces);
#ifdef PLUGGABLE_USB_ENABLED
- PluggableUSB.getInterface(&interfaces);
+ PluggableUSB().getInterface(&interfaces);
#endif
return interfaces;
@@ -476,7 +476,7 @@ bool SendDescriptor(USBSetup& setup)
InitControl(setup.wLength);
#ifdef PLUGGABLE_USB_ENABLED
- ret = PluggableUSB.getDescriptor(t);
+ ret = PluggableUSB().getDescriptor(t);
if (ret != 0) {
return (ret > 0 ? true : false);
}