diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2010-05-16 04:05:40 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2010-05-16 04:05:40 +0000 |
commit | 04475f4bfed43d3e956ffeb28e8aa4b552f922f7 (patch) | |
tree | d3a36592fb7f90b88666c269cfe4cc12f66f0cf9 /cores/arduino/WProgram.h | |
parent | 336e8908231319e4566ce1d2a92616455511d2de (diff) |
Adding A0=14, A1=15, etc. aliases for analog input pins and modifying analogRead() to accept them (in addition to 0, 1, 2, etc.). Removing some unused code elsewhere.
Diffstat (limited to 'cores/arduino/WProgram.h')
-rwxr-xr-x | cores/arduino/WProgram.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cores/arduino/WProgram.h b/cores/arduino/WProgram.h index f5d3e29..39dc611 100755 --- a/cores/arduino/WProgram.h +++ b/cores/arduino/WProgram.h @@ -27,6 +27,35 @@ long random(long); long random(long, long); void randomSeed(unsigned int); long map(long, long, long, long, long); + +#if defined(__AVR_ATmega1280__) +const static uint8_t A0 = 54; +const static uint8_t A1 = 55; +const static uint8_t A2 = 56; +const static uint8_t A3 = 57; +const static uint8_t A4 = 58; +const static uint8_t A5 = 59; +const static uint8_t A6 = 60; +const static uint8_t A7 = 61; +const static uint8_t A8 = 62; +const static uint8_t A9 = 63; +const static uint8_t A10 = 64; +const static uint8_t A11 = 65; +const static uint8_t A12 = 66; +const static uint8_t A13 = 67; +const static uint8_t A14 = 68; +const static uint8_t A15 = 69; +#else +const static uint8_t A0 = 14; +const static uint8_t A1 = 15; +const static uint8_t A2 = 16; +const static uint8_t A3 = 17; +const static uint8_t A4 = 18; +const static uint8_t A5 = 19; +const static uint8_t A6 = 20; +const static uint8_t A7 = 21; +#endif + #endif #endif
\ No newline at end of file |