a285810cb5
This patch is meant to test the link order, if the OTHER_OBJS variable gets used to add 3rd party archives, that depend on the Arduino core lib (the archive pointed to by the CORE_LIB variable). The examples/Blink3rdPartyLib directory contains a stripped down Blink and includes a library in the examples/Blink3rdPartyLib/Toggle sub-directory. The archive, built inside the Toggle directory mimics a 3rd party library. The archive gets built and linked in by using the OTHER_OBS variable in examples/Blink3rdPartyLib/Makefile.
23 lines
416 B
C++
23 lines
416 B
C++
// A derived Blink, that uses an example 3rd party library.
|
|
// Turns on an LED on for one second, then off for one second, repeatedly.
|
|
// This example code is in the public domain.
|
|
|
|
#include <TogglePin.h>
|
|
|
|
#ifdef ARDUINO
|
|
#if ARDUINO >= 100
|
|
#include "Arduino.h"
|
|
#else
|
|
#include "WProgram.h"
|
|
#endif
|
|
#endif // ARDUINO
|
|
|
|
int main()
|
|
{
|
|
init();
|
|
TogglePin led(13, false);
|
|
while (true) {
|
|
delay(1000);
|
|
led.toggle();
|
|
}
|
|
}
|