Skip to content

Commit f729e03

Browse files
committed
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
1 parent 18838fb commit f729e03

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

hardware/arduino/cores/arduino/Arduino.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
148148
#define NOT_A_PIN 0
149149
#define NOT_A_PORT 0
150150

151+
#ifdef ARDUINO_MAIN
151152
#define PA 1
152153
#define PB 2
153154
#define PC 3
@@ -159,6 +160,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
159160
#define PJ 10
160161
#define PK 11
161162
#define PL 12
163+
#endif
162164

163165
#define NOT_ON_TIMER 0
164166
#define TIMER0A 1

hardware/arduino/cores/arduino/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define ARDUINO_MAIN
21
#include <Arduino.h>
32

43
int main(void)

hardware/arduino/cores/arduino/wiring_digital.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
$Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
2525
*/
2626

27+
#define ARDUINO_MAIN
2728
#include "wiring_private.h"
2829
#include "pins_arduino.h"
2930

0 commit comments

Comments
 (0)