File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
hardware/arduino/sam/cores/arduino Expand file tree Collapse file tree 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.
4242* avr: Improved USB-CDC read code (Paul Brook)
4343* avr: Fixed race condition in USB-CDC transmit (Paul Brook)
4444* Fixed wrong NULL pointer handling in Stream class (Amulya Kumar Sahoo)
45+ * Added initVariant() hook to allow 3rd party variant-specific initialization
4546
4647[ide]
4748* Fix toolchain command line to compile assembler files (Jimmy Hedman)
@@ -302,6 +303,7 @@ ARDUINO 1.0.6 - not yet released
302303* Backported String class from IDE 1.5.x (Matt Jenkins)
303304* Backported Print class from IDE 1.5.x
304305* Backported digitalPinToInterrupt macro from IDE 1.5.x
306+ * Added initVariant() hook to allow 3rd party variant-specific initialization
305307
306308[ide]
307309* 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 )
3131}
3232*/
3333
34+ // Weak empty variant initialization function.
35+ // May be redefined by variant files.
36+ void initVariant () __attribute__((weak));
37+ void initVariant () { }
38+
3439/*
3540 * \brief Main entry point of Arduino application
3641 */
3742int main ( void )
3843{
3944 init ();
4045
46+ initVariant ();
47+
4148 delay (1 );
4249
4350#if defined(USBCON)
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ extern "C" {
2626/**
2727 *
2828 */
29+ extern void initVariant ( void ) ;
2930extern void init ( void ) ;
3031
3132/**
You can’t perform that action at this time.
0 commit comments