From 6a15e01ff8235d45bcc9ccaab6d2edccbb51823f Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Fri, 23 Oct 2009 23:04:03 +0000 Subject: [PATCH] Passing the ARDUINO constant from the IDE to avr-gcc as a command line argument (so I don't forget to update the version in the .h file). --- app/src/processing/app/Base.java | 2 +- app/src/processing/app/debug/Compiler.java | 3 +++ hardware/cores/arduino/wiring.h | 4 ---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index e83e443c9..4d7e8dd1c 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -40,7 +40,7 @@ import processing.core.*; * files and images, etc) that comes from that. */ public class Base { - static final int REVISION = 18; + public static final int REVISION = 18; static String VERSION_NAME = "0018"; static HashMap platformNames = new HashMap(); diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 56b5d27ac..198fd9847 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -452,6 +452,7 @@ public class Compiler implements MessageConsumer { "-assembler-with-cpp", "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-DARDUINO=" + Base.REVISION, })); for (int i = 0; i < includePaths.size(); i++) { @@ -478,6 +479,7 @@ public class Compiler implements MessageConsumer { "-fdata-sections", "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-DARDUINO=" + Base.REVISION, })); for (int i = 0; i < includePaths.size(); i++) { @@ -505,6 +507,7 @@ public class Compiler implements MessageConsumer { "-fdata-sections", "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-DARDUINO=" + Base.REVISION, })); for (int i = 0; i < includePaths.size(); i++) { diff --git a/hardware/cores/arduino/wiring.h b/hardware/cores/arduino/wiring.h index df7c314f9..e6dcde17f 100755 --- a/hardware/cores/arduino/wiring.h +++ b/hardware/cores/arduino/wiring.h @@ -32,10 +32,6 @@ extern "C"{ #endif -#ifndef ARDUINO -#define ARDUINO 18 -#endif - #define HIGH 0x1 #define LOW 0x0