[gnoduino: 183/237] Moving ARDUINO_MAIN from main.cpp to wiring_digital.c and hiding PA, PB, etc.
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino: 183/237] Moving ARDUINO_MAIN from main.cpp to wiring_digital.c and hiding PA, PB, etc.
- Date: Sat, 31 Mar 2012 20:30:13 +0000 (UTC)
commit b2830b4f1d302db65eac8e128bfddd016c684fa3
Author: David A. Mellis <d mellis arduino cc>
Date: Mon Oct 24 16:50:15 2011 -0400
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
arduino/cores/arduino/Arduino.h | 2 ++
arduino/cores/arduino/main.cpp | 1 -
arduino/cores/arduino/wiring_digital.c | 1 +
3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/arduino/cores/arduino/Arduino.h b/arduino/cores/arduino/Arduino.h
index 07216f9..ebd374a 100755
--- a/arduino/cores/arduino/Arduino.h
+++ b/arduino/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/arduino/cores/arduino/main.cpp b/arduino/cores/arduino/main.cpp
index 0ef5256..34450f4 100755
--- a/arduino/cores/arduino/main.cpp
+++ b/arduino/cores/arduino/main.cpp
@@ -1,4 +1,3 @@
-#define ARDUINO_MAIN
#include <Arduino.h>
int main(void)
diff --git a/arduino/cores/arduino/wiring_digital.c b/arduino/cores/arduino/wiring_digital.c
index dd1b949..97ef134 100755
--- a/arduino/cores/arduino/wiring_digital.c
+++ b/arduino/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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]