1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

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 11e02db954
commit 40270306e0
2 changed files with 28 additions and 12 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