diff --git a/hardware/arduino/variants/ethernet/pins_arduino.h b/hardware/arduino/variants/ethernet/pins_arduino.h index cdcb0ed22..1d5454900 100644 --- a/hardware/arduino/variants/ethernet/pins_arduino.h +++ b/hardware/arduino/variants/ethernet/pins_arduino.h @@ -37,23 +37,23 @@ #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 SS 10 +#define MOSI 11 +#define MISO 12 +#define SCK 13 -static const uint8_t SDA = 18; -static const uint8_t SCL = 19; +#define SDA 18 +#define 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 A0 14 +#define A1 15 +#define A2 16 +#define A3 17 +#define A4 18 +#define A5 19 +#define A6 20 +#define A7 21 #define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1)) diff --git a/hardware/arduino/variants/leonardo/pins_arduino.h b/hardware/arduino/variants/leonardo/pins_arduino.h index 473b92e3b..fe736f5ce 100644 --- a/hardware/arduino/variants/leonardo/pins_arduino.h +++ b/hardware/arduino/variants/leonardo/pins_arduino.h @@ -99,30 +99,30 @@ #define RXLED0 PORTB |= (1<<0) #define RXLED1 PORTB &= ~(1<<0) -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; +#define SDA 2 +#define SCL 3 #define LED_BUILTIN 13 // Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; +#define SS 17 +#define MOSI 16 +#define MISO 14 +#define SCK 15 // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -static const uint8_t A0 = 18; -static const uint8_t A1 = 19; -static const uint8_t A2 = 20; -static const uint8_t A3 = 21; -static const uint8_t A4 = 22; -static const uint8_t A5 = 23; -static const uint8_t A6 = 24; // D4 -static const uint8_t A7 = 25; // D6 -static const uint8_t A8 = 26; // D8 -static const uint8_t A9 = 27; // D9 -static const uint8_t A10 = 28; // D10 -static const uint8_t A11 = 29; // D12 +#define A0 18 +#define A1 19 +#define A2 20 +#define A3 21 +#define A4 22 +#define A5 23 +#define A6 24 // D4 +#define A7 25 // D6 +#define A8 26 // D8 +#define A9 27 // D9 +#define A10 28 // D10 +#define A11 29 // D12 #define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) 0 diff --git a/hardware/arduino/variants/mega/pins_arduino.h b/hardware/arduino/variants/mega/pins_arduino.h index 9991a21c1..124444fd9 100644 --- a/hardware/arduino/variants/mega/pins_arduino.h +++ b/hardware/arduino/variants/mega/pins_arduino.h @@ -32,31 +32,31 @@ #define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1) #define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46)) -static const uint8_t SS = 53; -static const uint8_t MOSI = 51; -static const uint8_t MISO = 50; -static const uint8_t SCK = 52; +#define SS 53 +#define MOSI 51 +#define MISO 50 +#define SCK 52 -static const uint8_t SDA = 20; -static const uint8_t SCL = 21; +#define SDA 20 +#define SCL 21 #define LED_BUILTIN 13 -static const uint8_t A0 = 54; -static const uint8_t A1 = 55; -static const uint8_t A2 = 56; -static const uint8_t A3 = 57; -static const uint8_t A4 = 58; -static const uint8_t A5 = 59; -static const uint8_t A6 = 60; -static const uint8_t A7 = 61; -static const uint8_t A8 = 62; -static const uint8_t A9 = 63; -static const uint8_t A10 = 64; -static const uint8_t A11 = 65; -static const uint8_t A12 = 66; -static const uint8_t A13 = 67; -static const uint8_t A14 = 68; -static const uint8_t A15 = 69; +#define A0 54 +#define A1 55 +#define A2 56 +#define A3 57 +#define A4 58 +#define A5 59 +#define A6 60 +#define A7 61 +#define A8 62 +#define A9 63 +#define A10 64 +#define A11 65 +#define A12 66 +#define A13 67 +#define A14 68 +#define A15 69 // A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins) // Only pins available for RECEIVE (TRANSMIT can be on any pin): diff --git a/hardware/arduino/variants/robot_control/pins_arduino.h b/hardware/arduino/variants/robot_control/pins_arduino.h index 4acfc0df8..545ec3ab3 100644 --- a/hardware/arduino/variants/robot_control/pins_arduino.h +++ b/hardware/arduino/variants/robot_control/pins_arduino.h @@ -43,52 +43,52 @@ #define D4 TKD4 #define D5 TKD5 -static const uint8_t RX = 0; -static const uint8_t TX = 1; -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; +#define RX 0 +#define TX 1 +#define SDA 2 +#define SCL 3 // Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; +#define SS 17 +#define MOSI 16 +#define MISO 14 +#define SCK 15 // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -static const uint8_t A0 = 18; -static const uint8_t A1 = 19; -static const uint8_t A2 = 20; -static const uint8_t A3 = 21; -static const uint8_t A4 = 22; -static const uint8_t A5 = 23; -static const uint8_t A6 = 24; // D4 -static const uint8_t A7 = 25; // D6 -static const uint8_t A8 = 26; // D8 -static const uint8_t A9 = 27; // D9 -static const uint8_t A10 = 28; // D10 -static const uint8_t A11 = 29; // D12 +#define A0 18 +#define A1 19 +#define A2 20 +#define A3 21 +#define A4 22 +#define A5 23 +#define A6 24 // D4 +#define A7 25 // D6 +#define A8 26 // D8 +#define A9 27 // D9 +#define A10 28 // D10 +#define A11 29 // D12 // Specific Mapping for the Control Board -static const uint8_t KEY = 18; // AD0 -static const uint8_t MUX_IN = 24; // ADC8 - A6 -static const uint8_t MUXA = 6; // D5 - TKD4 -static const uint8_t MUXB = 11; // D11 -static const uint8_t MUXC = 12; // D12 - TKD5 -static const uint8_t MUXD = 13; // D13 -static const uint8_t BUZZ = 5; // D5 -static const uint8_t POT = 23; // AD5 -static const uint8_t DC_LCD = 10; // D10 -static const uint8_t LCD_CS = 9; // D9 -static const uint8_t RST_LCD = 7; // D6 -static const uint8_t CARD_CS = 8; // D8 -static const uint8_t TKD0 = 19; // ADC6 - A1 -static const uint8_t TKD1 = 20; // ADC5 - A2 -static const uint8_t TKD2 = 21; // ADC4 - A3 -static const uint8_t TKD3 = 22; // ADC1 - A4 -static const uint8_t TKD4 = 6; // D5 - MUXA -static const uint8_t TKD5 = 12; // D12 - MUXC -static const uint8_t LED1 = 17; // D17 - RX_Led +#define KEY 18 // AD0 +#define MUX_IN 24 // ADC8 - A6 +#define MUXA 6 // D5 - TKD4 +#define MUXB 11 // D11 +#define MUXC 12 // D12 - TKD5 +#define MUXD 13 // D13 +#define BUZZ 5 // D5 +#define POT 23 // AD5 +#define DC_LCD 10 // D10 +#define LCD_CS 9 // D9 +#define RST_LCD 7 // D6 +#define CARD_CS 8 // D8 +#define TKD0 19 // ADC6 - A1 +#define TKD1 20 // ADC5 - A2 +#define TKD2 21 // ADC4 - A3 +#define TKD3 22 // ADC1 - A4 +#define TKD4 6 // D5 - MUXA +#define TKD5 12 // D12 - MUXC +#define LED1 17 // D17 - RX_Led // __AVR_ATmega32U4__ has an unusual mapping of pins to channels extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; diff --git a/hardware/arduino/variants/robot_motor/pins_arduino.h b/hardware/arduino/variants/robot_motor/pins_arduino.h index fdb4c6773..ff7833af8 100644 --- a/hardware/arduino/variants/robot_motor/pins_arduino.h +++ b/hardware/arduino/variants/robot_motor/pins_arduino.h @@ -41,49 +41,49 @@ #define D8 TK4 #define D7 TK3 -static const uint8_t RX = 0; -static const uint8_t TX = 1; -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; +#define RX 0 +#define TX 1 +#define SDA 2 +#define SCL 3 // Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; +#define SS 17 +#define MOSI 16 +#define MISO 14 +#define SCK 15 // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -static const uint8_t A0 = 18; -static const uint8_t A1 = 19; -static const uint8_t A2 = 20; -static const uint8_t A3 = 21; -static const uint8_t A4 = 22; -static const uint8_t A5 = 23; -static const uint8_t A6 = 24; // D4 -static const uint8_t A7 = 25; // D6 -static const uint8_t A8 = 26; // D8 -static const uint8_t A9 = 27; // D9 -static const uint8_t A10 = 28; // D10 -static const uint8_t A11 = 29; // D12 +#define A0 18 +#define A1 19 +#define A2 20 +#define A3 21 +#define A4 22 +#define A5 23 +#define A6 24 // D4 +#define A7 25 // D6 +#define A8 26 // D8 +#define A9 27 // D9 +#define A10 28 // D10 +#define A11 29 // D12 // Specific Mapping for the Motor Board -static const uint8_t MUX_IN = 20; // A2 -static const uint8_t MUXA = 7; // D7 -static const uint8_t MUXB = 8; // D8 -static const uint8_t MUXC = 11; // D11 -static const uint8_t MUXI = 13; // D13 -static const uint8_t TRIM = 21; // A3 -static const uint8_t SENSE_A = 22; // A4 -static const uint8_t SENSE_B = 23; // A5 -static const uint8_t IN_A1 = 6; // D6 - A7 -static const uint8_t IN_A2 = 5; // D5 -static const uint8_t IN_B1 = 10; // D10 -static const uint8_t IN_B2 = 9; // D9 -static const uint8_t TK1 = 18; // A0 -static const uint8_t TK2 = 19; // A1 -static const uint8_t TK3 = 4; // A6 -static const uint8_t TK4 = 12; // A11 +#define MUX_IN 20 // A2 +#define MUXA 7 // D7 +#define MUXB 8 // D8 +#define MUXC 11 // D11 +#define MUXI 13 // D13 +#define TRIM 21 // A3 +#define SENSE_A 22 // A4 +#define SENSE_B 23 // A5 +#define IN_A1 6 // D6 - A7 +#define IN_A2 5 // D5 +#define IN_B1 10 // D10 +#define IN_B2 9 // D9 +#define TK1 18 // A0 +#define TK2 19 // A1 +#define TK3 4 // A6 +#define TK4 12 // A11 // __AVR_ATmega32U4__ has an unusual mapping of pins to channels extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; diff --git a/hardware/arduino/variants/standard/pins_arduino.h b/hardware/arduino/variants/standard/pins_arduino.h index 2e24e1979..2038cd4b2 100644 --- a/hardware/arduino/variants/standard/pins_arduino.h +++ b/hardware/arduino/variants/standard/pins_arduino.h @@ -37,23 +37,23 @@ #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 SS 10 +#define MOSI 11 +#define MISO 12 +#define SCK 13 -static const uint8_t SDA = 18; -static const uint8_t SCL = 19; +#define SDA 18 +#define SCL 19 #define LED_BUILTIN 13 -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 A0 14 +#define A1 15 +#define A2 16 +#define A3 17 +#define A4 18 +#define A5 19 +#define A6 20 +#define A7 21 #define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))