Skip to content

Commit 5f574b3

Browse files
committed
Swapped Dx assignment for MISO and SS to make numbering more sane (Dave Mellis). Also updated comments on pin numbers.
1 parent ba5d66c commit 5f574b3

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

hardware/arduino/variants/leonardo/pins_arduino.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const static uint8_t SDA = 2;
3939
const static uint8_t SCL = 3;
4040

4141
// Map SPI port to 'new' pins D14..D17
42-
const static uint8_t SS = 14;
42+
const static uint8_t SS = 17;
4343
const static uint8_t MOSI = 16;
44-
const static uint8_t MISO = 17;
44+
const static uint8_t MISO = 14;
4545
const static uint8_t SCK = 15;
4646

4747
// Mapping of analog pins as digital I/O
@@ -78,28 +78,28 @@ extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
7878
// D4 A6 PD4 ADC8
7979
// D5# PC6 ??? OC3A/#OC4A
8080
// D6# A7 PD7 FastPWM #OC4D/ADC10
81-
// D7 Ain0 PE6 INT6/AIN0
81+
// D7 PE6 INT6/AIN0
8282
//
83-
// D8 A11 PB4 ADC11/PCINT4
84-
// D9# A8 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
85-
// D10# A9 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
83+
// D8 A8 PB4 ADC11/PCINT4
84+
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
85+
// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
8686
// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
87-
// D12 A10 PD6 T1/#OC4D/ADC9
87+
// D12 A11 PD6 T1/#OC4D/ADC9
8888
// D13# PC7 PWM10 CLK0/OC4A
8989
//
90-
// A0 PF7 ADC7
91-
// A1 PF6 ADC6
92-
// A2 PF5 ADC5
93-
// A3 PF4 ADC4
94-
// A4 PF1 ADC1
95-
// A5 PF0 ADC0
90+
// A0 D18 PF7 ADC7
91+
// A1 D19 PF6 ADC6
92+
// A2 D20 PF5 ADC5
93+
// A3 D21 PF4 ADC4
94+
// A4 D22 PF1 ADC1
95+
// A5 D23 PF0 ADC0
9696
//
9797
// New pins D14..D17 to map SPI port to digitial pins
9898
//
99-
// D14 PB0 RXLED,SS/PCINT0
100-
// D15 PB1 SCK,PCINT1
101-
// D16 PB2 MOSI,PCINT2
102-
// D17 PB3 MISO,PCINT3
99+
// MISO D14 PB3 MISO,PCINT3
100+
// SCK D15 PB1 SCK,PCINT1
101+
// MOSI D16 PB2 MOSI,PCINT2
102+
// SS D17 PB0 RXLED,SS/PCINT0
103103
//
104104
// TXLED PD5
105105
// RXLED PB0

0 commit comments

Comments
 (0)