diff options
author | Cristian Maglie <c.maglie@bug.st> | 2014-02-12 17:17:33 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-02-12 17:17:33 +0100 |
commit | 9684557a0b8366511e110f1d234567f97d8e603e (patch) | |
tree | 0b6f602a240344a80b00877c55fe61d36885be32 /variants | |
parent | dfde3ec99f41c6333a8c475810f285ce2b1ab265 (diff) | |
parent | 23b682417ed04f4067f3c7625a2d5518bf7a1f46 (diff) |
Merge branch 'master' into ide-1.5.x
Diffstat (limited to 'variants')
-rw-r--r-- | variants/ethernet/pins_arduino.h | 28 | ||||
-rw-r--r-- | variants/leonardo/pins_arduino.h | 36 | ||||
-rw-r--r-- | variants/mega/pins_arduino.h | 44 | ||||
-rw-r--r-- | variants/robot_control/pins_arduino.h | 78 | ||||
-rw-r--r-- | variants/robot_motor/pins_arduino.h | 72 | ||||
-rw-r--r-- | variants/standard/pins_arduino.h | 28 |
6 files changed, 143 insertions, 143 deletions
diff --git a/variants/ethernet/pins_arduino.h b/variants/ethernet/pins_arduino.h index 1d54549..cdcb0ed 100644 --- a/variants/ethernet/pins_arduino.h +++ b/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 -#define SS 10 -#define MOSI 11 -#define MISO 12 -#define SCK 13 +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 SDA 18 -#define SCL 19 +static const uint8_t SDA = 18; +static const uint8_t SCL = 19; #define LED_BUILTIN 9 -#define A0 14 -#define A1 15 -#define A2 16 -#define A3 17 -#define A4 18 -#define A5 19 -#define A6 20 -#define A7 21 +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 digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1)) diff --git a/variants/leonardo/pins_arduino.h b/variants/leonardo/pins_arduino.h index be9d0f2..fd75373 100644 --- a/variants/leonardo/pins_arduino.h +++ b/variants/leonardo/pins_arduino.h @@ -99,30 +99,30 @@ #define RXLED0 PORTB |= (1<<0) #define RXLED1 PORTB &= ~(1<<0) -#define SDA 2 -#define SCL 3 +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; #define LED_BUILTIN 13 // Map SPI port to 'new' pins D14..D17 -#define SS 17 -#define MOSI 16 -#define MISO 14 -#define SCK 15 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -#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 +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 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/variants/mega/pins_arduino.h b/variants/mega/pins_arduino.h index 9b43971..a80991b 100644 --- a/variants/mega/pins_arduino.h +++ b/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)) -#define SS 53 -#define MOSI 51 -#define MISO 50 -#define SCK 52 +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 SDA 20 -#define SCL 21 +static const uint8_t SDA = 20; +static const uint8_t SCL = 21; #define LED_BUILTIN 13 -#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 +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; // 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/variants/robot_control/pins_arduino.h b/variants/robot_control/pins_arduino.h index 04a5dc5..b868064 100644 --- a/variants/robot_control/pins_arduino.h +++ b/variants/robot_control/pins_arduino.h @@ -43,52 +43,52 @@ #define D4 TKD4 #define D5 TKD5 -#define RX 0 -#define TX 1 -#define SDA 2 -#define SCL 3 +static const uint8_t RX = 0; +static const uint8_t TX = 1; +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; // Map SPI port to 'new' pins D14..D17 -#define SS 17 -#define MOSI 16 -#define MISO 14 -#define SCK 15 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -#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 +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 // Specific Mapping for the Control Board -#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 +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 // __AVR_ATmega32U4__ has an unusual mapping of pins to channels extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; diff --git a/variants/robot_motor/pins_arduino.h b/variants/robot_motor/pins_arduino.h index f159f1e..7dc4a79 100644 --- a/variants/robot_motor/pins_arduino.h +++ b/variants/robot_motor/pins_arduino.h @@ -41,49 +41,49 @@ #define D8 TK4 #define D7 TK3 -#define RX 0 -#define TX 1 -#define SDA 2 -#define SCL 3 +static const uint8_t RX = 0; +static const uint8_t TX = 1; +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; // Map SPI port to 'new' pins D14..D17 -#define SS 17 -#define MOSI 16 -#define MISO 14 -#define SCK 15 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; // Mapping of analog pins as digital I/O // A6-A11 share with digital pins -#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 +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 // Specific Mapping for the Motor Board -#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 +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 // __AVR_ATmega32U4__ has an unusual mapping of pins to channels extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; diff --git a/variants/standard/pins_arduino.h b/variants/standard/pins_arduino.h index d0eb464..3d4a9f6 100644 --- a/variants/standard/pins_arduino.h +++ b/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 -#define SS 10 -#define MOSI 11 -#define MISO 12 -#define SCK 13 +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 SDA 18 -#define SCL 19 +static const uint8_t SDA = 18; +static const uint8_t SCL = 19; #define LED_BUILTIN 13 -#define A0 14 -#define A1 15 -#define A2 16 -#define A3 17 -#define A4 18 -#define A5 19 -#define A6 20 -#define A7 21 +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 digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0)) #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1)) |