diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2014-06-25 15:58:38 +0200 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2014-06-25 16:56:19 +0200 |
commit | 4fdf87c0e8a801093d5f0513e4aab122e20bfc2e (patch) | |
tree | 39a44e929617cd3c8f58c843889dcb145213b553 /cores/arduino/main.cpp | |
parent | 3a48c9240d33a32f7afdcb06ac345fa24d4aa46b (diff) |
Allow variants to define an initVariant() function that is called at startup.
See #2080 and #2139.
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 |