Skip to content

Commit c5e9cfd

Browse files
committed
Added initVariant() hook
as in the other Arduino cores
1 parent 50bc786 commit c5e9cfd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cores/arduino/main.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014 Arduino. All right reserved.
2+
Copyright (c) 2015 Arduino LLC. All right reserved.
33
44
This library is free software; you can redistribute it and/or
55
modify it under the terms of the GNU Lesser General Public
@@ -19,13 +19,20 @@
1919
#define ARDUINO_MAIN
2020
#include "Arduino.h"
2121

22+
// Weak empty variant initialization function.
23+
// May be redefined by variant files.
24+
void initVariant() __attribute__((weak));
25+
void initVariant() { }
26+
2227
/*
2328
* \brief Main entry point of Arduino application
2429
*/
2530
int main( void )
2631
{
2732
init();
2833

34+
initVariant();
35+
2936
delay(1);
3037
#if defined(USBCON)
3138
USBDevice.init();

0 commit comments

Comments
 (0)