Browse Source

Env mega2560ext adds pins 70-85 (#19022)

ellensp 3 years ago
parent
commit
64e181979c
No account linked to committer's email address

+ 13
- 1
buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py View File

@@ -1,6 +1,7 @@
1 1
 import os,shutil
2 2
 from SCons.Script import DefaultEnvironment
3 3
 from platformio import util
4
+from platformio.managers.package import PackageManager
4 5
 
5 6
 def copytree(src, dst, symlinks=False, ignore=None):
6 7
     for item in os.listdir(src):
@@ -16,7 +17,18 @@ platform = env.PioPlatform()
16 17
 board = env.BoardConfig()
17 18
 variant = board.get("build.variant")
18 19
 
19
-FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32")
20
+platform_packages = env.GetProjectOption('platform_packages')
21
+# if there's no framework defined, take it from the class name of platform
22
+framewords = {
23
+    "Ststm32Platform": "framework-arduinoststm32",
24
+    "AtmelavrPlatform": "framework-arduino-avr"
25
+}
26
+if len(platform_packages) == 0:
27
+    platform_name = framewords[platform.__class__.__name__]
28
+else:
29
+    platform_name, _, _ = PackageManager.parse_pkg_uri(platform_packages[0])
30
+
31
+FRAMEWORK_DIR = platform.get_package_dir(platform_name)
20 32
 assert os.path.isdir(FRAMEWORK_DIR)
21 33
 assert os.path.isdir("buildroot/share/PlatformIO/variants")
22 34
 

+ 461
- 0
buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h View File

@@ -0,0 +1,461 @@
1
+/*
2
+  pins_arduino.h - Pin definition functions for Arduino
3
+  Part of Arduino - http://www.arduino.cc/
4
+
5
+  Copyright (c) 2007 David A. Mellis
6
+
7
+  This library is free software; you can redistribute it and/or
8
+  modify it under the terms of the GNU Lesser General Public
9
+  License as published by the Free Software Foundation; either
10
+  version 2.1 of the License, or (at your option) any later version.
11
+
12
+  This library is distributed in the hope that it will be useful,
13
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
+  Lesser General Public License for more details.
16
+
17
+  You should have received a copy of the GNU Lesser General
18
+  Public License along with this library; if not, write to the
19
+  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20
+  Boston, MA  02111-1307  USA
21
+*/
22
+
23
+#ifndef Pins_Arduino_h
24
+#define Pins_Arduino_h
25
+
26
+#include <avr/pgmspace.h>
27
+
28
+#define NUM_DIGITAL_PINS            86
29
+#define NUM_ANALOG_INPUTS           16
30
+#define analogInputToDigitalPin(p)  ((p < 16) ? (p) + 54 : -1)
31
+#define digitalPinHasPWM(p)         (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46))
32
+
33
+#define PIN_SPI_SS    (53)
34
+#define PIN_SPI_MOSI  (51)
35
+#define PIN_SPI_MISO  (50)
36
+#define PIN_SPI_SCK   (52)
37
+
38
+static const uint8_t SS   = PIN_SPI_SS;
39
+static const uint8_t MOSI = PIN_SPI_MOSI;
40
+static const uint8_t MISO = PIN_SPI_MISO;
41
+static const uint8_t SCK  = PIN_SPI_SCK;
42
+
43
+#define PIN_WIRE_SDA        (20)
44
+#define PIN_WIRE_SCL        (21)
45
+
46
+static const uint8_t SDA = PIN_WIRE_SDA;
47
+static const uint8_t SCL = PIN_WIRE_SCL;
48
+
49
+#define LED_BUILTIN 13
50
+
51
+#define PIN_A0   (54)
52
+#define PIN_A1   (55)
53
+#define PIN_A2   (56)
54
+#define PIN_A3   (57)
55
+#define PIN_A4   (58)
56
+#define PIN_A5   (59)
57
+#define PIN_A6   (60)
58
+#define PIN_A7   (61)
59
+#define PIN_A8   (62)
60
+#define PIN_A9   (63)
61
+#define PIN_A10  (64)
62
+#define PIN_A11  (65)
63
+#define PIN_A12  (66)
64
+#define PIN_A13  (67)
65
+#define PIN_A14  (68)
66
+#define PIN_A15  (69)
67
+
68
+static const uint8_t A0 = PIN_A0;
69
+static const uint8_t A1 = PIN_A1;
70
+static const uint8_t A2 = PIN_A2;
71
+static const uint8_t A3 = PIN_A3;
72
+static const uint8_t A4 = PIN_A4;
73
+static const uint8_t A5 = PIN_A5;
74
+static const uint8_t A6 = PIN_A6;
75
+static const uint8_t A7 = PIN_A7;
76
+static const uint8_t A8 = PIN_A8;
77
+static const uint8_t A9 = PIN_A9;
78
+static const uint8_t A10 = PIN_A10;
79
+static const uint8_t A11 = PIN_A11;
80
+static const uint8_t A12 = PIN_A12;
81
+static const uint8_t A13 = PIN_A13;
82
+static const uint8_t A14 = PIN_A14;
83
+static const uint8_t A15 = PIN_A15;
84
+
85
+// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
86
+// Only pins available for RECEIVE (TRANSMIT can be on any pin):
87
+// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
88
+// Pins: 10, 11, 12, 13,  50, 51, 52, 53,  62, 63, 64, 65, 66, 67, 68, 69
89
+
90
+#define digitalPinToPCICR(p)    ( (((p) >= 10) && ((p) <= 13)) || \
91
+                                  (((p) >= 50) && ((p) <= 53)) || \
92
+                                  (((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) )
93
+
94
+#define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \
95
+                                ( (((p) >= 62) && ((p) <= 69)) ? 2 : \
96
+                                0 ) )
97
+
98
+#define digitalPinToPCMSK(p)    ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \
99
+                                ( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \
100
+                                ((uint8_t *)0) ) )
101
+
102
+#define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \
103
+                                ( ((p) == 50) ? 3 : \
104
+                                ( ((p) == 51) ? 2 : \
105
+                                ( ((p) == 52) ? 1 : \
106
+                                ( ((p) == 53) ? 0 : \
107
+                                ( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
108
+                                0 ) ) ) ) ) )
109
+
110
+#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))
111
+
112
+#ifdef ARDUINO_MAIN
113
+
114
+const uint16_t PROGMEM port_to_mode_PGM[] = {
115
+	NOT_A_PORT,
116
+	(uint16_t) &DDRA,
117
+	(uint16_t) &DDRB,
118
+	(uint16_t) &DDRC,
119
+	(uint16_t) &DDRD,
120
+	(uint16_t) &DDRE,
121
+	(uint16_t) &DDRF,
122
+	(uint16_t) &DDRG,
123
+	(uint16_t) &DDRH,
124
+	NOT_A_PORT,
125
+	(uint16_t) &DDRJ,
126
+	(uint16_t) &DDRK,
127
+	(uint16_t) &DDRL,
128
+};
129
+
130
+const uint16_t PROGMEM port_to_output_PGM[] = {
131
+	NOT_A_PORT,
132
+	(uint16_t) &PORTA,
133
+	(uint16_t) &PORTB,
134
+	(uint16_t) &PORTC,
135
+	(uint16_t) &PORTD,
136
+	(uint16_t) &PORTE,
137
+	(uint16_t) &PORTF,
138
+	(uint16_t) &PORTG,
139
+	(uint16_t) &PORTH,
140
+	NOT_A_PORT,
141
+	(uint16_t) &PORTJ,
142
+	(uint16_t) &PORTK,
143
+	(uint16_t) &PORTL,
144
+};
145
+
146
+const uint16_t PROGMEM port_to_input_PGM[] = {
147
+	NOT_A_PIN,
148
+	(uint16_t) &PINA,
149
+	(uint16_t) &PINB,
150
+	(uint16_t) &PINC,
151
+	(uint16_t) &PIND,
152
+	(uint16_t) &PINE,
153
+	(uint16_t) &PINF,
154
+	(uint16_t) &PING,
155
+	(uint16_t) &PINH,
156
+	NOT_A_PIN,
157
+	(uint16_t) &PINJ,
158
+	(uint16_t) &PINK,
159
+	(uint16_t) &PINL,
160
+};
161
+
162
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
163
+	// PORTLIST		
164
+	// -------------------------------------------		
165
+	PE	, // PE 0 ** 0 ** USART0_RX	
166
+	PE	, // PE 1 ** 1 ** USART0_TX	
167
+	PE	, // PE 4 ** 2 ** PWM2	
168
+	PE	, // PE 5 ** 3 ** PWM3	
169
+	PG	, // PG 5 ** 4 ** PWM4	
170
+	PE	, // PE 3 ** 5 ** PWM5	
171
+	PH	, // PH 3 ** 6 ** PWM6	
172
+	PH	, // PH 4 ** 7 ** PWM7	
173
+	PH	, // PH 5 ** 8 ** PWM8	
174
+	PH	, // PH 6 ** 9 ** PWM9	
175
+	PB	, // PB 4 ** 10 ** PWM10	
176
+	PB	, // PB 5 ** 11 ** PWM11	
177
+	PB	, // PB 6 ** 12 ** PWM12	
178
+	PB	, // PB 7 ** 13 ** PWM13	
179
+	PJ	, // PJ 1 ** 14 ** USART3_TX	
180
+	PJ	, // PJ 0 ** 15 ** USART3_RX	
181
+	PH	, // PH 1 ** 16 ** USART2_TX	
182
+	PH	, // PH 0 ** 17 ** USART2_RX	
183
+	PD	, // PD 3 ** 18 ** USART1_TX	
184
+	PD	, // PD 2 ** 19 ** USART1_RX	
185
+	PD	, // PD 1 ** 20 ** I2C_SDA	
186
+	PD	, // PD 0 ** 21 ** I2C_SCL	
187
+	PA	, // PA 0 ** 22 ** D22	
188
+	PA	, // PA 1 ** 23 ** D23	
189
+	PA	, // PA 2 ** 24 ** D24	
190
+	PA	, // PA 3 ** 25 ** D25	
191
+	PA	, // PA 4 ** 26 ** D26	
192
+	PA	, // PA 5 ** 27 ** D27	
193
+	PA	, // PA 6 ** 28 ** D28	
194
+	PA	, // PA 7 ** 29 ** D29	
195
+	PC	, // PC 7 ** 30 ** D30	
196
+	PC	, // PC 6 ** 31 ** D31	
197
+	PC	, // PC 5 ** 32 ** D32	
198
+	PC	, // PC 4 ** 33 ** D33	
199
+	PC	, // PC 3 ** 34 ** D34	
200
+	PC	, // PC 2 ** 35 ** D35	
201
+	PC	, // PC 1 ** 36 ** D36	
202
+	PC	, // PC 0 ** 37 ** D37	
203
+	PD	, // PD 7 ** 38 ** D38	
204
+	PG	, // PG 2 ** 39 ** D39	
205
+	PG	, // PG 1 ** 40 ** D40	
206
+	PG	, // PG 0 ** 41 ** D41	
207
+	PL	, // PL 7 ** 42 ** D42	
208
+	PL	, // PL 6 ** 43 ** D43	
209
+	PL	, // PL 5 ** 44 ** D44	
210
+	PL	, // PL 4 ** 45 ** D45	
211
+	PL	, // PL 3 ** 46 ** D46	
212
+	PL	, // PL 2 ** 47 ** D47	
213
+	PL	, // PL 1 ** 48 ** D48	
214
+	PL	, // PL 0 ** 49 ** D49	
215
+	PB	, // PB 3 ** 50 ** SPI_MISO	
216
+	PB	, // PB 2 ** 51 ** SPI_MOSI	
217
+	PB	, // PB 1 ** 52 ** SPI_SCK	
218
+	PB	, // PB 0 ** 53 ** SPI_SS	
219
+	PF	, // PF 0 ** 54 ** A0	
220
+	PF	, // PF 1 ** 55 ** A1	
221
+	PF	, // PF 2 ** 56 ** A2	
222
+	PF	, // PF 3 ** 57 ** A3	
223
+	PF	, // PF 4 ** 58 ** A4	
224
+	PF	, // PF 5 ** 59 ** A5	
225
+	PF	, // PF 6 ** 60 ** A6	
226
+	PF	, // PF 7 ** 61 ** A7	
227
+	PK	, // PK 0 ** 62 ** A8	
228
+	PK	, // PK 1 ** 63 ** A9	
229
+	PK	, // PK 2 ** 64 ** A10	
230
+	PK	, // PK 3 ** 65 ** A11	
231
+	PK	, // PK 4 ** 66 ** A12	
232
+	PK	, // PK 5 ** 67 ** A13	
233
+	PK	, // PK 6 ** 68 ** A14	
234
+	PK	, // PK 7 ** 69 ** A15
235
+	PG 	, // PG 4 ** 70 ** D70
236
+	PG 	, // PG 3 ** 71 ** D71
237
+	PJ 	, // PJ 2 ** 72 ** D72
238
+	PJ 	, // PJ 3 ** 73 ** D73
239
+	PJ 	, // PJ 7 ** 74 ** D74
240
+	PJ 	, // PJ 4 ** 75 ** D75
241
+	PJ 	, // PJ 5 ** 76 ** D76
242
+	PJ 	, // PJ 6 ** 77 ** D77
243
+	PE 	, // PE 2 ** 78 ** D78
244
+	PE 	, // PE 6 ** 79 ** D79
245
+	PE 	, // PE 7 ** 80 ** D80
246
+	PD 	, // PD 4 ** 81 ** D81
247
+	PD 	, // PD 5 ** 82 ** D82
248
+	PD 	, // PD 6 ** 83 ** D83
249
+	PH 	, // PH 2 ** 84 ** D84
250
+	PH 	, // PH 7 ** 85 ** D85
251
+};
252
+
253
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
254
+	// PIN IN PORT		
255
+	// -------------------------------------------		
256
+	_BV( 0 )	, // PE 0 ** 0 ** USART0_RX	
257
+	_BV( 1 )	, // PE 1 ** 1 ** USART0_TX	
258
+	_BV( 4 )	, // PE 4 ** 2 ** PWM2	
259
+	_BV( 5 )	, // PE 5 ** 3 ** PWM3	
260
+	_BV( 5 )	, // PG 5 ** 4 ** PWM4	
261
+	_BV( 3 )	, // PE 3 ** 5 ** PWM5	
262
+	_BV( 3 )	, // PH 3 ** 6 ** PWM6	
263
+	_BV( 4 )	, // PH 4 ** 7 ** PWM7	
264
+	_BV( 5 )	, // PH 5 ** 8 ** PWM8	
265
+	_BV( 6 )	, // PH 6 ** 9 ** PWM9	
266
+	_BV( 4 )	, // PB 4 ** 10 ** PWM10	
267
+	_BV( 5 )	, // PB 5 ** 11 ** PWM11	
268
+	_BV( 6 )	, // PB 6 ** 12 ** PWM12	
269
+	_BV( 7 )	, // PB 7 ** 13 ** PWM13	
270
+	_BV( 1 )	, // PJ 1 ** 14 ** USART3_TX	
271
+	_BV( 0 )	, // PJ 0 ** 15 ** USART3_RX	
272
+	_BV( 1 )	, // PH 1 ** 16 ** USART2_TX	
273
+	_BV( 0 )	, // PH 0 ** 17 ** USART2_RX	
274
+	_BV( 3 )	, // PD 3 ** 18 ** USART1_TX	
275
+	_BV( 2 )	, // PD 2 ** 19 ** USART1_RX	
276
+	_BV( 1 )	, // PD 1 ** 20 ** I2C_SDA	
277
+	_BV( 0 )	, // PD 0 ** 21 ** I2C_SCL	
278
+	_BV( 0 )	, // PA 0 ** 22 ** D22	
279
+	_BV( 1 )	, // PA 1 ** 23 ** D23	
280
+	_BV( 2 )	, // PA 2 ** 24 ** D24	
281
+	_BV( 3 )	, // PA 3 ** 25 ** D25	
282
+	_BV( 4 )	, // PA 4 ** 26 ** D26	
283
+	_BV( 5 )	, // PA 5 ** 27 ** D27	
284
+	_BV( 6 )	, // PA 6 ** 28 ** D28	
285
+	_BV( 7 )	, // PA 7 ** 29 ** D29	
286
+	_BV( 7 )	, // PC 7 ** 30 ** D30	
287
+	_BV( 6 )	, // PC 6 ** 31 ** D31	
288
+	_BV( 5 )	, // PC 5 ** 32 ** D32	
289
+	_BV( 4 )	, // PC 4 ** 33 ** D33	
290
+	_BV( 3 )	, // PC 3 ** 34 ** D34	
291
+	_BV( 2 )	, // PC 2 ** 35 ** D35	
292
+	_BV( 1 )	, // PC 1 ** 36 ** D36	
293
+	_BV( 0 )	, // PC 0 ** 37 ** D37	
294
+	_BV( 7 )	, // PD 7 ** 38 ** D38	
295
+	_BV( 2 )	, // PG 2 ** 39 ** D39	
296
+	_BV( 1 )	, // PG 1 ** 40 ** D40	
297
+	_BV( 0 )	, // PG 0 ** 41 ** D41	
298
+	_BV( 7 )	, // PL 7 ** 42 ** D42	
299
+	_BV( 6 )	, // PL 6 ** 43 ** D43	
300
+	_BV( 5 )	, // PL 5 ** 44 ** D44	
301
+	_BV( 4 )	, // PL 4 ** 45 ** D45	
302
+	_BV( 3 )	, // PL 3 ** 46 ** D46	
303
+	_BV( 2 )	, // PL 2 ** 47 ** D47	
304
+	_BV( 1 )	, // PL 1 ** 48 ** D48	
305
+	_BV( 0 )	, // PL 0 ** 49 ** D49	
306
+	_BV( 3 )	, // PB 3 ** 50 ** SPI_MISO	
307
+	_BV( 2 )	, // PB 2 ** 51 ** SPI_MOSI	
308
+	_BV( 1 )	, // PB 1 ** 52 ** SPI_SCK	
309
+	_BV( 0 )	, // PB 0 ** 53 ** SPI_SS	
310
+	_BV( 0 )	, // PF 0 ** 54 ** A0	
311
+	_BV( 1 )	, // PF 1 ** 55 ** A1	
312
+	_BV( 2 )	, // PF 2 ** 56 ** A2	
313
+	_BV( 3 )	, // PF 3 ** 57 ** A3	
314
+	_BV( 4 )	, // PF 4 ** 58 ** A4	
315
+	_BV( 5 )	, // PF 5 ** 59 ** A5	
316
+	_BV( 6 )	, // PF 6 ** 60 ** A6	
317
+	_BV( 7 )	, // PF 7 ** 61 ** A7	
318
+	_BV( 0 )	, // PK 0 ** 62 ** A8	
319
+	_BV( 1 )	, // PK 1 ** 63 ** A9	
320
+	_BV( 2 )	, // PK 2 ** 64 ** A10	
321
+	_BV( 3 )	, // PK 3 ** 65 ** A11	
322
+	_BV( 4 )	, // PK 4 ** 66 ** A12	
323
+	_BV( 5 )	, // PK 5 ** 67 ** A13	
324
+	_BV( 6 )	, // PK 6 ** 68 ** A14	
325
+	_BV( 7 )	, // PK 7 ** 69 ** A15	
326
+	_BV( 4 )	, // PG 4 ** 70 ** D70
327
+	_BV( 3 )	, // PG 3 ** 71 ** D71
328
+	_BV( 2 )	, // PJ 2 ** 72 ** D72
329
+	_BV( 3 )	, // PJ 3 ** 73 ** D73
330
+	_BV( 7 )	, // PJ 7 ** 74 ** D74
331
+	_BV( 4 )	, // PJ 4 ** 75 ** D75
332
+	_BV( 5 )	, // PJ 5 ** 76 ** D76
333
+	_BV( 6 )	, // PJ 6 ** 77 ** D77
334
+	_BV( 2 )	, // PE 2 ** 78 ** D78
335
+	_BV( 6 )	, // PE 6 ** 79 ** D79
336
+	_BV( 7 )	, // PE 7 ** 80 ** D80
337
+	_BV( 4 )	, // PD 4 ** 81 ** D81
338
+	_BV( 5 ) 	, // PD 5 ** 82 ** D82
339
+	_BV( 6 ) 	, // PD 6 ** 83 ** D83
340
+	_BV( 2 ) 	, // PH 2 ** 84 ** D84
341
+	_BV( 7 ) 	, // PH 7 ** 85 ** D85
342
+};
343
+
344
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
345
+	// TIMERS		
346
+	// -------------------------------------------		
347
+	NOT_ON_TIMER	, // PE 0 ** 0 ** USART0_RX	
348
+	NOT_ON_TIMER	, // PE 1 ** 1 ** USART0_TX	
349
+	TIMER3B	, // PE 4 ** 2 ** PWM2	
350
+	TIMER3C	, // PE 5 ** 3 ** PWM3	
351
+	TIMER0B	, // PG 5 ** 4 ** PWM4	
352
+	TIMER3A	, // PE 3 ** 5 ** PWM5	
353
+	TIMER4A	, // PH 3 ** 6 ** PWM6	
354
+	TIMER4B	, // PH 4 ** 7 ** PWM7	
355
+	TIMER4C	, // PH 5 ** 8 ** PWM8	
356
+	TIMER2B	, // PH 6 ** 9 ** PWM9	
357
+	TIMER2A	, // PB 4 ** 10 ** PWM10	
358
+	TIMER1A	, // PB 5 ** 11 ** PWM11	
359
+	TIMER1B	, // PB 6 ** 12 ** PWM12	
360
+	TIMER0A	, // PB 7 ** 13 ** PWM13	
361
+	NOT_ON_TIMER	, // PJ 1 ** 14 ** USART3_TX	
362
+	NOT_ON_TIMER	, // PJ 0 ** 15 ** USART3_RX	
363
+	NOT_ON_TIMER	, // PH 1 ** 16 ** USART2_TX	
364
+	NOT_ON_TIMER	, // PH 0 ** 17 ** USART2_RX	
365
+	NOT_ON_TIMER	, // PD 3 ** 18 ** USART1_TX	
366
+	NOT_ON_TIMER	, // PD 2 ** 19 ** USART1_RX	
367
+	NOT_ON_TIMER	, // PD 1 ** 20 ** I2C_SDA	
368
+	NOT_ON_TIMER	, // PD 0 ** 21 ** I2C_SCL	
369
+	NOT_ON_TIMER	, // PA 0 ** 22 ** D22	
370
+	NOT_ON_TIMER	, // PA 1 ** 23 ** D23	
371
+	NOT_ON_TIMER	, // PA 2 ** 24 ** D24	
372
+	NOT_ON_TIMER	, // PA 3 ** 25 ** D25	
373
+	NOT_ON_TIMER	, // PA 4 ** 26 ** D26	
374
+	NOT_ON_TIMER	, // PA 5 ** 27 ** D27	
375
+	NOT_ON_TIMER	, // PA 6 ** 28 ** D28	
376
+	NOT_ON_TIMER	, // PA 7 ** 29 ** D29	
377
+	NOT_ON_TIMER	, // PC 7 ** 30 ** D30	
378
+	NOT_ON_TIMER	, // PC 6 ** 31 ** D31	
379
+	NOT_ON_TIMER	, // PC 5 ** 32 ** D32	
380
+	NOT_ON_TIMER	, // PC 4 ** 33 ** D33	
381
+	NOT_ON_TIMER	, // PC 3 ** 34 ** D34	
382
+	NOT_ON_TIMER	, // PC 2 ** 35 ** D35	
383
+	NOT_ON_TIMER	, // PC 1 ** 36 ** D36	
384
+	NOT_ON_TIMER	, // PC 0 ** 37 ** D37	
385
+	NOT_ON_TIMER	, // PD 7 ** 38 ** D38	
386
+	NOT_ON_TIMER	, // PG 2 ** 39 ** D39	
387
+	NOT_ON_TIMER	, // PG 1 ** 40 ** D40	
388
+	NOT_ON_TIMER	, // PG 0 ** 41 ** D41	
389
+	NOT_ON_TIMER	, // PL 7 ** 42 ** D42	
390
+	NOT_ON_TIMER	, // PL 6 ** 43 ** D43	
391
+	TIMER5C	, // PL 5 ** 44 ** D44	
392
+	TIMER5B	, // PL 4 ** 45 ** D45	
393
+	TIMER5A	, // PL 3 ** 46 ** D46	
394
+	NOT_ON_TIMER	, // PL 2 ** 47 ** D47	
395
+	NOT_ON_TIMER	, // PL 1 ** 48 ** D48	
396
+	NOT_ON_TIMER	, // PL 0 ** 49 ** D49	
397
+	NOT_ON_TIMER	, // PB 3 ** 50 ** SPI_MISO	
398
+	NOT_ON_TIMER	, // PB 2 ** 51 ** SPI_MOSI	
399
+	NOT_ON_TIMER	, // PB 1 ** 52 ** SPI_SCK	
400
+	NOT_ON_TIMER	, // PB 0 ** 53 ** SPI_SS	
401
+	NOT_ON_TIMER	, // PF 0 ** 54 ** A0	
402
+	NOT_ON_TIMER	, // PF 1 ** 55 ** A1	
403
+	NOT_ON_TIMER	, // PF 2 ** 56 ** A2	
404
+	NOT_ON_TIMER	, // PF 3 ** 57 ** A3	
405
+	NOT_ON_TIMER	, // PF 4 ** 58 ** A4	
406
+	NOT_ON_TIMER	, // PF 5 ** 59 ** A5	
407
+	NOT_ON_TIMER	, // PF 6 ** 60 ** A6	
408
+	NOT_ON_TIMER	, // PF 7 ** 61 ** A7	
409
+	NOT_ON_TIMER	, // PK 0 ** 62 ** A8	
410
+	NOT_ON_TIMER	, // PK 1 ** 63 ** A9	
411
+	NOT_ON_TIMER	, // PK 2 ** 64 ** A10	
412
+	NOT_ON_TIMER	, // PK 3 ** 65 ** A11	
413
+	NOT_ON_TIMER	, // PK 4 ** 66 ** A12	
414
+	NOT_ON_TIMER	, // PK 5 ** 67 ** A13	
415
+	NOT_ON_TIMER	, // PK 6 ** 68 ** A14	
416
+	NOT_ON_TIMER	, // PK 7 ** 69 ** A15
417
+	NOT_ON_TIMER	, // PG 4 ** 70 ** D70
418
+	NOT_ON_TIMER	, // PG 3 ** 71 ** D71
419
+	NOT_ON_TIMER	, // PJ 2 ** 72 ** D72
420
+	NOT_ON_TIMER	, // PJ 3 ** 73 ** D73
421
+	NOT_ON_TIMER	, // PJ 7 ** 74 ** D74
422
+	NOT_ON_TIMER	, // PJ 4 ** 75 ** D75
423
+	NOT_ON_TIMER	, // PJ 5 ** 76 ** D76
424
+	NOT_ON_TIMER	, // PJ 6 ** 77 ** D77
425
+	NOT_ON_TIMER	, // PE 2 ** 78 ** D78
426
+	NOT_ON_TIMER	, // PE 6 ** 79 ** D79
427
+	NOT_ON_TIMER	, // PE 7 ** 80 ** D80
428
+	NOT_ON_TIMER	, // PD 4 ** 81 ** D81
429
+	NOT_ON_TIMER 	, // PD 5 ** 82 ** D82
430
+	NOT_ON_TIMER 	, // PD 6 ** 83 ** D83
431
+	NOT_ON_TIMER 	, // PH 2 ** 84 ** D84
432
+	NOT_ON_TIMER 	, // PH 7 ** 85 ** D85
433
+};
434
+
435
+#endif
436
+
437
+// These serial port names are intended to allow libraries and architecture-neutral
438
+// sketches to automatically default to the correct port name for a particular type
439
+// of use.  For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
440
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
441
+//
442
+// SERIAL_PORT_MONITOR        Port which normally prints to the Arduino Serial Monitor
443
+//
444
+// SERIAL_PORT_USBVIRTUAL     Port which is USB virtual serial
445
+//
446
+// SERIAL_PORT_LINUXBRIDGE    Port which connects to a Linux system via Bridge library
447
+//
448
+// SERIAL_PORT_HARDWARE       Hardware serial port, physical RX & TX pins.
449
+//
450
+// SERIAL_PORT_HARDWARE_OPEN  Hardware serial ports which are open for use.  Their RX & TX
451
+//                            pins are NOT connected to anything by default.
452
+#define SERIAL_PORT_MONITOR         Serial
453
+#define SERIAL_PORT_HARDWARE        Serial
454
+#define SERIAL_PORT_HARDWARE1       Serial1
455
+#define SERIAL_PORT_HARDWARE2       Serial2
456
+#define SERIAL_PORT_HARDWARE3       Serial3
457
+#define SERIAL_PORT_HARDWARE_OPEN   Serial1
458
+#define SERIAL_PORT_HARDWARE_OPEN1  Serial2
459
+#define SERIAL_PORT_HARDWARE_OPEN2  Serial3
460
+
461
+#endif

+ 14
- 3
platformio.ini View File

@@ -406,9 +406,20 @@ src_filter        = ${common.default_src_filter} +<src/HAL/AVR>
406 406
 # ATmega2560
407 407
 #
408 408
 [env:mega2560]
409
-platform      = atmelavr
410
-extends       = common_avr8
411
-board         = megaatmega2560
409
+platform            = atmelavr
410
+extends             = common_avr8
411
+board               = megaatmega2560
412
+
413
+#
414
+# ATmega2560 with extended pins 70-85 defined
415
+#
416
+[env:mega2560ext]
417
+platform            = atmelavr
418
+extends             = mega2560
419
+board               = megaatmega2560
420
+board_build.variant = megaextendedpins
421
+extra_scripts       = ${common.extra_scripts}
422
+                      pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
412 423
 
413 424
 #
414 425
 # ATmega1280

Loading…
Cancel
Save