File tree 3 files changed +10
-0
lines changed
hardware/arduino/sam/cores/arduino
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ The following changes are included also in the (not yet released) Arduino IDE 1.
42
42
* avr: Improved USB-CDC read code (Paul Brook)
43
43
* avr: Fixed race condition in USB-CDC transmit (Paul Brook)
44
44
* Fixed wrong NULL pointer handling in Stream class (Amulya Kumar Sahoo)
45
+ * Added initVariant() hook to allow 3rd party variant-specific initialization
45
46
46
47
[ide]
47
48
* Fix toolchain command line to compile assembler files (Jimmy Hedman)
@@ -302,6 +303,7 @@ ARDUINO 1.0.6 - not yet released
302
303
* Backported String class from IDE 1.5.x (Matt Jenkins)
303
304
* Backported Print class from IDE 1.5.x
304
305
* Backported digitalPinToInterrupt macro from IDE 1.5.x
306
+ * Added initVariant() hook to allow 3rd party variant-specific initialization
305
307
306
308
[ide]
307
309
* Added compatibility for IDE 1.5.x libraries layout
Original file line number Diff line number Diff line change @@ -31,13 +31,20 @@ extern void SysTick_Handler( void )
31
31
}
32
32
*/
33
33
34
+ // Weak empty variant initialization function.
35
+ // May be redefined by variant files.
36
+ void initVariant () __attribute__((weak));
37
+ void initVariant () { }
38
+
34
39
/*
35
40
* \brief Main entry point of Arduino application
36
41
*/
37
42
int main ( void )
38
43
{
39
44
init ();
40
45
46
+ initVariant ();
47
+
41
48
delay (1 );
42
49
43
50
#if defined(USBCON)
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ extern "C" {
26
26
/**
27
27
*
28
28
*/
29
+ extern void initVariant ( void ) ;
29
30
extern void init ( void ) ;
30
31
31
32
/**
You can’t perform that action at this time.
0 commit comments