aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2011-10-24 16:50:15 -0400
committerDavid A. Mellis <d.mellis@arduino.cc>2011-10-24 16:50:15 -0400
commit8d48010edfd3a031045bc510c7bcd651cf30c6f8 (patch)
treed233031e6d839749c8e0fcf9fb202749b065dcfd /cores
parent85d70c4314bc38b736b6d88adcec6dadf43a0dba (diff)
Moving ARDUINO_MAIN from main.cpp to wiring_digital.c and hiding PA, PB, etc.
http://code.google.com/p/arduino/issues/detail?id=677 http://code.google.com/p/arduino/issues/detail?id=691
Diffstat (limited to 'cores')
-rwxr-xr-xcores/arduino/Arduino.h2
-rwxr-xr-xcores/arduino/main.cpp1
-rwxr-xr-xcores/arduino/wiring_digital.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h
index 07216f9..ebd374a 100755
--- a/cores/arduino/Arduino.h
+++ b/cores/arduino/Arduino.h
@@ -148,6 +148,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
#define NOT_A_PIN 0
#define NOT_A_PORT 0
+#ifdef ARDUINO_MAIN
#define PA 1
#define PB 2
#define PC 3
@@ -159,6 +160,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
#define PJ 10
#define PK 11
#define PL 12
+#endif
#define NOT_ON_TIMER 0
#define TIMER0A 1
diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp
index 0ef5256..34450f4 100755
--- a/cores/arduino/main.cpp
+++ b/cores/arduino/main.cpp
@@ -1,4 +1,3 @@
-#define ARDUINO_MAIN
#include <Arduino.h>
int main(void)
diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c
index dd1b949..97ef134 100755
--- a/cores/arduino/wiring_digital.c
+++ b/cores/arduino/wiring_digital.c
@@ -24,6 +24,7 @@
$Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
*/
+#define ARDUINO_MAIN
#include "wiring_private.h"
#include "pins_arduino.h"