diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2011-03-03 23:54:33 -0500 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2011-03-03 23:54:33 -0500 |
commit | 6cd58c57dbf8b52d94b4fda3cb565856530b377d (patch) | |
tree | 9b6542b5cdefc46fe71352a8ff5107e360dcca2b /cores/arduino/Arduino.h | |
parent | b0ab2bc48bd3edd3b42d3a52f0995f220f77f814 (diff) |
Moving all pin definitions into pins_arduino.h.
This is a step towards providing portability across AVR's by simply including an appropriate header file.
Diffstat (limited to 'cores/arduino/Arduino.h')
-rwxr-xr-x | cores/arduino/Arduino.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 713347b..e877970 100755 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -5,13 +5,11 @@ #include <string.h> #include <math.h> -#include <avr/interrupt.h> - +#include <avr/pgmspace.h> #include <avr/io.h> #include <avr/interrupt.h> -#include <stdlib.h> + #include "binary.h" -#include "pins_arduino.h" #ifdef __cplusplus extern "C"{ @@ -141,6 +139,28 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) ) #define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) ) +#define NOT_A_PIN 0 +#define NOT_A_PORT 0 + +#define NOT_ON_TIMER 0 +#define TIMER0A 1 +#define TIMER0B 2 +#define TIMER1A 3 +#define TIMER1B 4 +#define TIMER2 5 +#define TIMER2A 6 +#define TIMER2B 7 + +#define TIMER3A 8 +#define TIMER3B 9 +#define TIMER3C 10 +#define TIMER4A 11 +#define TIMER4B 12 +#define TIMER4C 13 +#define TIMER5A 14 +#define TIMER5B 15 +#define TIMER5C 16 + #ifdef __cplusplus } // extern "C" #endif @@ -168,4 +188,6 @@ long map(long, long, long, long, long); #endif +#include "pins_arduino.h" + #endif
\ No newline at end of file |