From dd539bacf8c45e84ee3fd0c25dd7b7ab4bb2a5d8 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Thu, 18 Aug 2011 19:59:35 -0400 Subject: [PATCH] USB microcontrollers will call USB.attach() after init(), before setup() --- hardware/arduino/cores/arduino/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hardware/arduino/cores/arduino/main.cpp b/hardware/arduino/cores/arduino/main.cpp index 3c46f1e7a..ba00ae0fc 100755 --- a/hardware/arduino/cores/arduino/main.cpp +++ b/hardware/arduino/cores/arduino/main.cpp @@ -5,6 +5,10 @@ int main(void) { init(); +#if defined(USBCON) + USB.attach(); +#endif + setup(); for (;;)