diff options
author | Arturo Guadalupi <a.guadalupi@arduino.cc> | 2016-07-07 17:51:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-07 17:51:31 +0200 |
commit | 5665f869770fa5be65eb8e48651199d14dccdf52 (patch) | |
tree | f30bed019a86ec810a44119df1b307ae308d4fc8 /variants/ethernet/pins_arduino.h | |
parent | 0c8151db1a3da4382ebb913c12cbfea833970191 (diff) | |
parent | 257ee3fd67f70a67b9568dfdbbe7677d06c13ff4 (diff) |
Merge pull request #4814 from sandeepmistry/avr-pin_
Add PIN_* defines to AVR variants
Diffstat (limited to 'variants/ethernet/pins_arduino.h')
-rw-r--r-- | variants/ethernet/pins_arduino.h | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/variants/ethernet/pins_arduino.h b/variants/ethernet/pins_arduino.h index a11ecfc..77fcc40 100644 --- a/variants/ethernet/pins_arduino.h +++ b/variants/ethernet/pins_arduino.h @@ -35,23 +35,41 @@ #define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11) #endif -static const uint8_t SS = 10; -static const uint8_t MOSI = 11; -static const uint8_t MISO = 12; -static const uint8_t SCK = 13; +#define PIN_SPI_SS (10) +#define PIN_SPI_MOSI (11) +#define PIN_SPI_MISO (12) +#define PIN_SPI_SCK (13) + +static const uint8_t SS = PIN_SPI_SS; +static const uint8_t MOSI = PIN_SPI_MOSI; +static const uint8_t MISO = PIN_SPI_MISO; +static const uint8_t SCK = PIN_SPI_SCK; + +#define PIN_WIRE_SDA (18) +#define PIN_WIRE_SCL (19) + +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; -static const uint8_t SDA = 18; -static const uint8_t SCL = 19; #define LED_BUILTIN 9 -static const uint8_t A0 = 14; -static const uint8_t A1 = 15; -static const uint8_t A2 = 16; -static const uint8_t A3 = 17; -static const uint8_t A4 = 18; -static const uint8_t A5 = 19; -static const uint8_t A6 = 20; -static const uint8_t A7 = 21; +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) +#define PIN_A6 (20) +#define PIN_A7 (21) + +static const uint8_t A0 = PIN_A0; +static const uint8_t A1 = PIN_A1; +static const uint8_t A2 = PIN_A2; +static const uint8_t A3 = PIN_A3; +static const uint8_t A4 = PIN_A4; +static const uint8_t A5 = PIN_A5; +static const uint8_t A6 = PIN_A6; +static const uint8_t A7 = PIN_A7; #define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1)) |