diff options
author | Cristian Maglie <c.maglie@bug.st> | 2014-06-19 19:49:47 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-06-19 19:49:47 +0200 |
commit | 7a31770a9ae88f9b0482fb8a1e4cc702cacaf86e (patch) | |
tree | cfa6d9e50517f43cf726854c7e27fe0b0243fccf | |
parent | f599d519967a938a407ad0daa6c39182f389ef91 (diff) |
Allow variants to define an initVariant() function that is called at startup.
See #2080
-rw-r--r-- | cores/arduino/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp index 0ad6962..091c365 100644 --- a/cores/arduino/main.cpp +++ b/cores/arduino/main.cpp @@ -19,10 +19,17 @@ #include <Arduino.h> +// Weak empty variant initialization function. +// May be redefined by variant files. +void initVariant() __attribute__((weak)); +void initVariant() { } + int main(void) { init(); + initVariant(); + #if defined(USBCON) USBDevice.attach(); #endif |