Allow variants to define an initVariant() function that is called at startup.

See #2080
This commit is contained in:
Cristian Maglie 2014-06-19 19:49:47 +02:00
parent f599d51996
commit 7a31770a9a
1 changed files with 7 additions and 0 deletions

View File

@ -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