From 596a7e19045c0fc2c3ceaf79df21d436e4613929 Mon Sep 17 00:00:00 2001 From: daid303 Date: Thu, 13 Dec 2012 13:24:55 +0100 Subject: [PATCH] Fix compiling for Arduin < 1.0.0 --- Marlin/Marlin.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 4de3b3fb7..c81c95e13 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -26,14 +26,12 @@ #define HardwareSerial_h // trick to disable the standard HWserial #endif -#if ARDUINO >= 100 - #if defined(__AVR_ATmega644P__) - #include "WProgram.h" - #else - #include "Arduino.h" - #endif +#if (ARDUINO >= 100) && !defined(__AVR_ATmega644P__) +# include "Arduino.h" #else - #include "WProgram.h" +# include "WProgram.h" + //Arduino < 1.0.0 does not define this, so we need to do it ourselfs +# define analogInputToDigitalPin(p) ((p) + A0) #endif #include "MarlinSerial.h"