aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino/main.cpp')
-rw-r--r--cores/arduino/main.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp
new file mode 100644
index 0000000..3d4e079
--- /dev/null
+++ b/cores/arduino/main.cpp
@@ -0,0 +1,20 @@
+#include <Arduino.h>
+
+int main(void)
+{
+ init();
+
+#if defined(USBCON)
+ USBDevice.attach();
+#endif
+
+ setup();
+
+ for (;;) {
+ loop();
+ if (serialEventRun) serialEventRun();
+ }
+
+ return 0;
+}
+