diff options
author | Cristian Maglie <c.maglie@bug.st> | 2014-07-01 17:28:45 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-07-01 17:28:45 +0200 |
commit | 452cab0593ba0fcca89f56d57de6cee67bce78ac (patch) | |
tree | 506fec5846f97dfe5ef4c4f242bcb234b41687ba /cores/arduino/main.cpp | |
parent | 07ef56e3cbd6ffc9b083e84777d2ec4186514202 (diff) | |
parent | b4fc466b47e9d69f3d189987dcf0750713afff1a (diff) |
Merge pull request #2139 from cmaglie/init-variant
Allow variants to define an initVariant() function that is called at startup
Diffstat (limited to 'cores/arduino/main.cpp')
-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 |