diff options
Diffstat (limited to 'cores/arduino/main.cpp')
-rwxr-xr-x | cores/arduino/main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp index 3c46f1e..34450f4 100755 --- a/cores/arduino/main.cpp +++ b/cores/arduino/main.cpp @@ -1,14 +1,19 @@ -#define ARDUINO_MAIN #include <Arduino.h> int main(void) { init(); +#if defined(USBCON) + USB.attach(); +#endif + setup(); - for (;;) + for (;;) { loop(); + if (serialEventRun) serialEventRun(); + } return 0; } |