From acf7989c76b4bbba9ea3a7db08d058697e8a6f31 Mon Sep 17 00:00:00 2001 From: Szymon Sidor Date: Fri, 30 May 2014 02:02:28 -0400 Subject: [PATCH] Making code consistent with newest Arduino API --- examples/scanner/output/scanner.cpp | 8 ++++++-- tests/native/printf.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/scanner/output/scanner.cpp b/examples/scanner/output/scanner.cpp index 5eb1627a..a352e47c 100644 --- a/examples/scanner/output/scanner.cpp +++ b/examples/scanner/output/scanner.cpp @@ -1,4 +1,8 @@ -#include +#if defined(ARDUINO) && ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif #line 1 "scanner.pde" /* @@ -20,7 +24,7 @@ * See http://arduino.cc/forum/index.php/topic,54795.0.html */ -#include +#include "SPI.h" #include "nRF24L01.h" #include "RF24.h" #include "printf.h" diff --git a/tests/native/printf.h b/tests/native/printf.h index df6c46ae..5cefab40 100644 --- a/tests/native/printf.h +++ b/tests/native/printf.h @@ -16,7 +16,11 @@ #ifndef __PRINTF_H__ #define __PRINTF_H__ +#if defined(ARDUINO) && ARDUINO >= 100 +#include "Arduino.h" +#else #include "WProgram.h" +#endif int serial_putc( char c, FILE * ) {