Skip to content

Commit c2c122b

Browse files
committed
Merge branch 'master' into matthijskooijman-ide-1.5.x-timer-variant
Conflicts: app/src/processing/app/debug/Compiler.java hardware/arduino/sam/cores/arduino/main.cpp
2 parents e5f34e5 + 668559f commit c2c122b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

build/shared/revisions.txt

+2
Original file line numberDiff line numberDiff 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

hardware/arduino/sam/cores/arduino/main.cpp

+7
Original file line numberDiff line numberDiff 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
*/
3742
int main( void )
3843
{
3944
init();
4045

46+
initVariant();
47+
4148
delay(1);
4249

4350
#if defined(USBCON)

hardware/arduino/sam/cores/arduino/wiring.h

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extern "C" {
2626
/**
2727
*
2828
*/
29+
extern void initVariant( void ) ;
2930
extern void init( void ) ;
3031

3132
/**

0 commit comments

Comments
 (0)