Allow variants to define an initVariant() function that is called at startup.
See #2080
This commit is contained in:
parent
f599d51996
commit
7a31770a9a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue