@@ -133,6 +133,130 @@ static const pin_map_t digitalPinMap[] = {
133133 {& DDRK , & PINK , & PORTK , 7 } // K7 69
134134};
135135//------------------------------------------------------------------------------
136+ #elif (defined(__AVR_ATmega644P__ ) || defined(__AVR_ATmega1284P__ )) && defined(CORE_MICRODUINO )
137+ // Microduino Core+
138+
139+ // Two Wire (aka I2C) ports
140+ uint8_t const SDA_PIN = 20 ;
141+ uint8_t const SCL_PIN = 21 ;
142+
143+ // SPI port
144+ uint8_t const SS_PIN = 10 ;
145+ uint8_t const MOSI_PIN = 11 ;
146+ uint8_t const MISO_PIN = 12 ;
147+ uint8_t const SCK_PIN = 13 ;
148+
149+ static const pin_map_t digitalPinMap [] = {
150+ {& DDRD , & PIND , & PORTD , 0 }, // D0 PD0
151+ {& DDRD , & PIND , & PORTD , 1 }, // D1 PD1
152+ {& DDRD , & PIND , & PORTD , 2 }, // D2 PD2
153+ {& DDRD , & PIND , & PORTD , 3 }, // D3 PD3
154+ {& DDRB , & PINB , & PORTB , 0 }, // D4 PB0
155+ {& DDRB , & PINB , & PORTB , 1 }, // D5 PB1
156+ {& DDRB , & PINB , & PORTB , 2 }, // D6 PB2
157+ {& DDRB , & PINB , & PORTB , 3 }, // D7 PB3
158+ {& DDRD , & PIND , & PORTD , 6 }, // D8 PD6
159+ {& DDRD , & PIND , & PORTD , 5 }, // D9 PD5
160+ {& DDRB , & PINB , & PORTB , 4 }, // D10 PB4
161+ {& DDRB , & PINB , & PORTB , 5 }, // D11 PB5
162+ {& DDRB , & PINB , & PORTB , 6 }, // D12 PB6
163+ {& DDRB , & PINB , & PORTB , 7 }, // D13 PB7
164+ {& DDRC , & PINC , & PORTC , 7 }, // D14 PC7
165+ {& DDRC , & PINC , & PORTC , 6 }, // D15 PC6
166+ {& DDRC , & PINC , & PORTC , 5 }, // D16 PC5
167+ {& DDRC , & PINC , & PORTC , 4 }, // D17 PC4
168+ {& DDRC , & PINC , & PORTC , 3 }, // D18 PC3
169+ {& DDRC , & PINC , & PORTC , 2 }, // D19 PC2
170+ {& DDRC , & PINC , & PORTC , 1 }, // D20 PC1
171+ {& DDRC , & PINC , & PORTC , 0 }, // D21 PC0
172+ {& DDRD , & PIND , & PORTD , 4 }, // D22 PD4
173+ {& DDRD , & PIND , & PORTD , 7 }, // D23 PD7
174+ {& DDRA , & PINA , & PORTA , 7 }, // D24 PA7
175+ {& DDRA , & PINA , & PORTA , 6 }, // D25 PA6
176+ {& DDRA , & PINA , & PORTA , 5 }, // D26 PA5
177+ {& DDRA , & PINA , & PORTA , 4 }, // D27 PA4
178+ {& DDRA , & PINA , & PORTA , 3 }, // D28 PA3
179+ {& DDRA , & PINA , & PORTA , 2 }, // D29 PA2
180+ {& DDRA , & PINA , & PORTA , 1 }, // D30 PA1
181+ {& DDRA , & PINA , & PORTA , 0 } // D31 PA0
182+ };
183+ //------------------------------------------------------------------------------
184+ #elif defined(__AVR_ATmega128RFA1__ ) && defined(CORE_MICRODUINO )
185+ // Microduino Core RF
186+
187+ // Two Wire (aka I2C) ports
188+ uint8_t const SDA_PIN = 18 ;
189+ uint8_t const SCL_PIN = 19 ;
190+
191+ // SPI port
192+ uint8_t const SS_PIN = 10 ;
193+ uint8_t const MOSI_PIN = 11 ;
194+ uint8_t const MISO_PIN = 12 ;
195+ uint8_t const SCK_PIN = 13 ;
196+
197+ static const pin_map_t digitalPinMap [] = {
198+ {& DDRD , & PINE , & PORTE , 0 }, // D0 PE0
199+ {& DDRD , & PINE , & PORTE , 1 }, // D1 PE1
200+ {& DDRD , & PIND , & PORTD , 2 }, // D2 PD2
201+ {& DDRD , & PIND , & PORTD , 3 }, // D3 PD3
202+ {& DDRB , & PINE , & PORTE , 3 }, // D4 PE3
203+ {& DDRB , & PINE , & PORTE , 4 }, // D5 PE4
204+ {& DDRB , & PINE , & PORTE , 5 }, // D6 PE5
205+ {& DDRB , & PINB , & PORTB , 7 }, // D7 PB7
206+ {& DDRD , & PINB , & PORTB , 6 }, // D8 PB6
207+ {& DDRD , & PINB , & PORTB , 5 }, // D9 PB5
208+ {& DDRB , & PINB , & PORTB , 4 }, // D10 PB4
209+ {& DDRB , & PINB , & PORTB , 2 }, // D11 PB2
210+ {& DDRB , & PINB , & PORTB , 3 }, // D12 PB3
211+ {& DDRB , & PINB , & PORTB , 1 }, // D13 PB1
212+ {& DDRF , & PINF , & PORTF , 7 }, // D14 PF7
213+ {& DDRF , & PINF , & PORTF , 6 }, // D15 PF6
214+ {& DDRF , & PINF , & PORTF , 5 }, // D16 PF5
215+ {& DDRF , & PINF , & PORTF , 4 }, // D17 PF4
216+ {& DDRD , & PIND , & PORTD , 1 }, // D18 PD1
217+ {& DDRD , & PIND , & PORTD , 0 }, // D19 PD0
218+ {& DDRF , & PINF , & PORTF , 3 }, // D20 PF3
219+ {& DDRF , & PINF , & PORTF , 2 }, // D21 PF2
220+ };
221+ //------------------------------------------------------------------------------
222+ #elif defined(__AVR_ATmega32U4__ ) && defined(CORE_MICRODUINO )
223+ // Microduino Core USB
224+
225+ // Two Wire (aka I2C) ports
226+ uint8_t const SDA_PIN = 18 ;
227+ uint8_t const SCL_PIN = 19 ;
228+
229+ // SPI port
230+ uint8_t const SS_PIN = 10 ;
231+ uint8_t const MOSI_PIN = 11 ;
232+ uint8_t const MISO_PIN = 12 ;
233+ uint8_t const SCK_PIN = 13 ;
234+
235+ static const pin_map_t digitalPinMap [] = {
236+ {& DDRD , & PIND , & PORTD , 2 }, // D0 - PD2
237+ {& DDRD , & PIND , & PORTD , 3 }, // D1 - PD3
238+ {& DDRE , & PINE , & PORTE , 6 }, // D2 - PE6
239+ {& DDRD , & PIND , & PORTD , 6 }, // D3 - PD6
240+ {& DDRD , & PIND , & PORTD , 7 }, // D4 - PD7
241+ {& DDRC , & PINC , & PORTC , 6 }, // D5 - PC6
242+ {& DDRC , & PINC , & PORTC , 7 }, // D6 - PC7
243+ {& DDRE , & PINE , & PORTE , 7 }, // D7 - PE7
244+ {& DDRB , & PINB , & PORTB , 6 }, // D8 - PB6
245+ {& DDRB , & PINB , & PORTB , 5 }, // D9 - PB5
246+ {& DDRB , & PINB , & PORTB , 0 }, // D10 - PB0
247+ {& DDRB , & PINB , & PORTB , 2 }, // D11 - MOSI - PB2
248+ {& DDRB , & PINB , & PORTB , 3 }, // D12 -MISO - PB3
249+ {& DDRB , & PINB , & PORTB , 1 }, // D13 -SCK - PB1
250+ {& DDRF , & PINF , & PORTF , 7 }, // D14 - A0 - PF7
251+ {& DDRF , & PINF , & PORTF , 6 }, // D15 - A1 - PF6
252+ {& DDRF , & PINF , & PORTF , 5 }, // D16 - A2 - PF5
253+ {& DDRF , & PINF , & PORTF , 4 }, // D17 - A3 - PF4
254+ {& DDRD , & PIND , & PORTD , 1 }, // D18 - PD1
255+ {& DDRD , & PIND , & PORTD , 0 }, // D19 - PD0
256+ {& DDRF , & PINF , & PORTF , 1 }, // D20 - A6 - PF1
257+ {& DDRF , & PINF , & PORTF , 0 }, // D21 - A7 - PF0
258+ };
259+ //------------------------------------------------------------------------------
136260#elif defined(__AVR_ATmega644P__ ) || defined(__AVR_ATmega644__ )
137261// Sanguino
138262
0 commit comments