diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2011-08-12 18:27:00 -0400 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2011-08-12 18:27:00 -0400 |
commit | 39573e5cf7e5db5f0892fc6d33e0d53ede5e0d17 (patch) | |
tree | b2ba307118df780dbf05c6e02889d4f2983511c9 /pins/mega/pins_arduino.h | |
parent | cafbc48008ec9cb5cd68b29a93f59b81423322f7 (diff) |
Adding basic macros for analog + digital pin information.
http://code.google.com/p/arduino/issues/detail?id=495
Diffstat (limited to 'pins/mega/pins_arduino.h')
-rw-r--r-- | pins/mega/pins_arduino.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pins/mega/pins_arduino.h b/pins/mega/pins_arduino.h index b25f858..237173a 100644 --- a/pins/mega/pins_arduino.h +++ b/pins/mega/pins_arduino.h @@ -27,6 +27,11 @@ #include <avr/pgmspace.h> +#define NUM_DIGITAL_PINS 70 +#define NUM_ANALOG_INPUTS 16 +#define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1) +#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46)) + const static uint8_t SS = 53; const static uint8_t MOSI = 51; const static uint8_t MISO = 50; |