@@ -166,44 +166,43 @@ static const pin_map_t digitalPinMap[] = {
166166};
167167//------------------------------------------------------------------------------
168168#elif defined(__AVR_ATmega32U4__ )
169- // Teensy 2.0
169+ // Leonardo
170170
171171// Two Wire (aka I2C) ports
172- uint8_t const SDA_PIN = 6 ;
173- uint8_t const SCL_PIN = 5 ;
172+ uint8_t const SDA_PIN = 2 ;
173+ uint8_t const SCL_PIN = 3 ;
174174
175175// SPI port
176- uint8_t const SS_PIN = 0 ;
177- uint8_t const MOSI_PIN = 2 ;
178- uint8_t const MISO_PIN = 3 ;
179- uint8_t const SCK_PIN = 1 ;
176+ uint8_t const SS_PIN = 17 ;
177+ uint8_t const MOSI_PIN = 16 ;
178+ uint8_t const MISO_PIN = 14 ;
179+ uint8_t const SCK_PIN = 15 ;
180180
181181static const pin_map_t digitalPinMap [] = {
182- {& DDRB , & PINB , & PORTB , 0 }, // B0 0
183- {& DDRB , & PINB , & PORTB , 1 }, // B1 1
184- {& DDRB , & PINB , & PORTB , 2 }, // B2 2
185- {& DDRB , & PINB , & PORTB , 3 }, // B3 3
186- {& DDRB , & PINB , & PORTB , 7 }, // B7 4
187- {& DDRD , & PIND , & PORTD , 0 }, // D0 5
188- {& DDRD , & PIND , & PORTD , 1 }, // D1 6
189- {& DDRD , & PIND , & PORTD , 2 }, // D2 7
190- {& DDRD , & PIND , & PORTD , 3 }, // D3 8
191- {& DDRC , & PINC , & PORTC , 6 }, // C6 9
192- {& DDRC , & PINC , & PORTC , 7 }, // C7 10
193- {& DDRD , & PIND , & PORTD , 6 }, // D6 11
194- {& DDRD , & PIND , & PORTD , 7 }, // D7 12
195- {& DDRB , & PINB , & PORTB , 4 }, // B4 13
196- {& DDRB , & PINB , & PORTB , 5 }, // B5 14
197- {& DDRB , & PINB , & PORTB , 6 }, // B6 15
198- {& DDRF , & PINF , & PORTF , 7 }, // F7 16
199- {& DDRF , & PINF , & PORTF , 6 }, // F6 17
200- {& DDRF , & PINF , & PORTF , 5 }, // F5 18
201- {& DDRF , & PINF , & PORTF , 4 }, // F4 19
202- {& DDRF , & PINF , & PORTF , 1 }, // F1 20
203- {& DDRF , & PINF , & PORTF , 0 }, // F0 21
204- {& DDRD , & PIND , & PORTD , 4 }, // D4 22
205- {& DDRD , & PIND , & PORTD , 5 }, // D5 23
206- {& DDRE , & PINE , & PORTE , 6 } // E6 24
182+ {& DDRD , & PIND , & PORTD , 2 }, // D2 0
183+ {& DDRD , & PIND , & PORTD , 3 }, // D3 1
184+ {& DDRD , & PIND , & PORTD , 1 }, // D1 2
185+ {& DDRD , & PIND , & PORTD , 0 }, // D0 3
186+ {& DDRD , & PIND , & PORTD , 4 }, // D4 4
187+ {& DDRC , & PINC , & PORTC , 6 }, // C6 5
188+ {& DDRD , & PIND , & PORTD , 7 }, // D7 6
189+ {& DDRE , & PINE , & PORTE , 6 }, // E6 7
190+ {& DDRB , & PINB , & PORTB , 4 }, // B4 8
191+ {& DDRB , & PINB , & PORTB , 5 }, // B5 9
192+ {& DDRB , & PINB , & PORTB , 6 }, // B6 10
193+ {& DDRB , & PINB , & PORTB , 7 }, // B7 11
194+ {& DDRD , & PIND , & PORTD , 6 }, // D6 12
195+ {& DDRC , & PINC , & PORTC , 7 }, // C7 13
196+ {& DDRB , & PINB , & PORTB , 3 }, // B3 14
197+ {& DDRB , & PINB , & PORTB , 1 }, // B1 15
198+ {& DDRB , & PINB , & PORTB , 2 }, // B2 16
199+ {& DDRB , & PINB , & PORTB , 0 }, // B0 17
200+ {& DDRF , & PINF , & PORTF , 7 }, // F7 18
201+ {& DDRF , & PINF , & PORTF , 6 }, // F6 19
202+ {& DDRF , & PINF , & PORTF , 5 }, // F5 20
203+ {& DDRF , & PINF , & PORTF , 4 }, // F4 21
204+ {& DDRF , & PINF , & PORTF , 1 }, // F1 22
205+ {& DDRF , & PINF , & PORTF , 0 }, // F0 23
207206};
208207//------------------------------------------------------------------------------
209208#elif defined(__AVR_AT90USB646__ ) || defined(__AVR_AT90USB1286__ )
0 commit comments