Selaa lähdekoodia

Split up fastio.h, document pin mappings

Scott Lahteine 7 vuotta sitten
vanhempi
commit
1519b0e7c1
7 muutettua tiedostoa jossa 4119 lisäystä ja 3918 poistoa
  1. 27
    3918
      Marlin/fastio.h
  2. 1115
    0
      Marlin/fastio_1280.h
  3. 720
    0
      Marlin/fastio_1281.h
  4. 362
    0
      Marlin/fastio_168.h
  5. 531
    0
      Marlin/fastio_644.h
  6. 681
    0
      Marlin/fastio_AT90USB-Marlin.h
  7. 683
    0
      Marlin/fastio_AT90USB-Teensy.h

+ 27
- 3918
Marlin/fastio.h
File diff suppressed because it is too large
Näytä tiedosto


+ 1115
- 0
Marlin/fastio_1280.h
File diff suppressed because it is too large
Näytä tiedosto


+ 720
- 0
Marlin/fastio_1281.h Näytä tiedosto

@@ -0,0 +1,720 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Pin mapping for the 1281 and 2561
25
+ *
26
+ *   1281     38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
27
+ *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
28
+ *   Marlin   00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
29
+ */
30
+
31
+#ifndef _FASTIO_1281
32
+#define _FASTIO_1281
33
+
34
+#include "fastio.h"
35
+
36
+// change for your board
37
+#define DEBUG_LED   DIO46
38
+
39
+// UART
40
+#define RXD         DIO0
41
+#define TXD         DIO1
42
+
43
+// SPI
44
+#define SCK         DIO10
45
+#define MISO        DIO12
46
+#define MOSI        DIO11
47
+#define SS          DIO16
48
+
49
+// TWI (I2C)
50
+#define SCL         DIO17
51
+#define SDA         DIO18
52
+
53
+// Timers and PWM
54
+#define OC0A        DIO9
55
+#define OC0B        DIO4
56
+#define OC1A        DIO7
57
+#define OC1B        DIO8
58
+#define OC2A        DIO6
59
+#define OC3A        DIO5
60
+#define OC3B        DIO2
61
+#define OC3C        DIO3
62
+
63
+// Digital I/O
64
+
65
+#define DIO0_PIN    PINE0
66
+#define DIO0_RPORT  PINE
67
+#define DIO0_WPORT  PORTE
68
+#define DIO0_DDR    DDRE
69
+#define DIO0_PWM    NULL
70
+
71
+#define DIO1_PIN    PINE1
72
+#define DIO1_RPORT  PINE
73
+#define DIO1_WPORT  PORTE
74
+#define DIO1_DDR    DDRE
75
+#define DIO1_PWM    NULL
76
+
77
+#define DIO2_PIN    PINE4
78
+#define DIO2_RPORT  PINE
79
+#define DIO2_WPORT  PORTE
80
+#define DIO2_DDR    DDRE
81
+#define DIO2_PWM    &OCR3BL
82
+
83
+#define DIO3_PIN    PINE5
84
+#define DIO3_RPORT  PINE
85
+#define DIO3_WPORT  PORTE
86
+#define DIO3_DDR    DDRE
87
+#define DIO3_PWM    &OCR3CL
88
+
89
+#define DIO4_PIN    PING5
90
+#define DIO4_RPORT  PING
91
+#define DIO4_WPORT  PORTG
92
+#define DIO4_DDR    DDRG
93
+#define DIO4_PWM    &OCR0B
94
+
95
+#define DIO5_PIN    PINE3
96
+#define DIO5_RPORT  PINE
97
+#define DIO5_WPORT  PORTE
98
+#define DIO5_DDR    DDRE
99
+#define DIO5_PWM    &OCR3AL
100
+
101
+#define DIO6_PIN    PINB4
102
+#define DIO6_RPORT  PINB
103
+#define DIO6_WPORT  PORTB
104
+#define DIO6_DDR    DDRB
105
+#define DIO6_PWM    &OCR2AL
106
+
107
+#define DIO7_PIN    PINB5
108
+#define DIO7_RPORT  PINB
109
+#define DIO7_WPORT  PORTB
110
+#define DIO7_DDR    DDRB
111
+#define DIO7_PWM    &OCR1AL
112
+
113
+#define DIO8_PIN    PINB6
114
+#define DIO8_RPORT  PINB
115
+#define DIO8_WPORT  PORTB
116
+#define DIO8_DDR    DDRB
117
+#define DIO8_PWM    &OCR1BL
118
+
119
+#define DIO9_PIN    PINB7
120
+#define DIO9_RPORT  PINB
121
+#define DIO9_WPORT  PORTB
122
+#define DIO9_DDR    DDRB
123
+#define DIO9_PWM    &OCR0AL
124
+
125
+#define DIO10_PIN   PINB1
126
+#define DIO10_RPORT PINB
127
+#define DIO10_WPORT PORTB
128
+#define DIO10_DDR   DDRB
129
+#define DIO10_PWM   NULL
130
+
131
+#define DIO11_PIN   PINB2
132
+#define DIO11_RPORT PINB
133
+#define DIO11_WPORT PORTB
134
+#define DIO11_DDR   DDRB
135
+#define DIO11_PWM   NULL
136
+
137
+#define DIO12_PIN   PINB3
138
+#define DIO12_RPORT PINB
139
+#define DIO12_WPORT PORTB
140
+#define DIO12_DDR   DDRB
141
+#define DIO12_PWM   NULL
142
+
143
+#define DIO13_PIN   PINE2
144
+#define DIO13_RPORT PINE
145
+#define DIO13_WPORT PORTE
146
+#define DIO13_DDR   DDRE
147
+#define DIO13_PWM   NULL
148
+
149
+#define DIO14_PIN   PINE6
150
+#define DIO14_RPORT PINE
151
+#define DIO14_WPORT PORTE
152
+#define DIO14_DDR   DDRE
153
+#define DIO14_PWM   NULL
154
+
155
+#define DIO15_PIN   PINE7
156
+#define DIO15_RPORT PINE
157
+#define DIO15_WPORT PORTE
158
+#define DIO15_DDR   DDRE
159
+#define DIO15_PWM   NULL
160
+
161
+#define DIO16_PIN   PINB0
162
+#define DIO16_RPORT PINB
163
+#define DIO16_WPORT PORTB
164
+#define DIO16_DDR   DDRB
165
+#define DIO16_PWM   NULL
166
+
167
+#define DIO17_PIN   PIND0
168
+#define DIO17_RPORT PIND
169
+#define DIO17_WPORT PORTD
170
+#define DIO17_DDR   DDRD
171
+#define DIO17_PWM   NULL
172
+
173
+#define DIO18_PIN   PIND1
174
+#define DIO18_RPORT PIND
175
+#define DIO18_WPORT PORTD
176
+#define DIO18_DDR   DDRD
177
+#define DIO18_PWM   NULL
178
+
179
+#define DIO19_PIN   PIND2
180
+#define DIO19_RPORT PIND
181
+#define DIO19_WPORT PORTD
182
+#define DIO19_DDR   DDRD
183
+#define DIO19_PWM   NULL
184
+
185
+#define DIO20_PIN   PIND3
186
+#define DIO20_RPORT PIND
187
+#define DIO20_WPORT PORTD
188
+#define DIO20_DDR   DDRD
189
+#define DIO20_PWM   NULL
190
+
191
+#define DIO21_PIN   PIND4
192
+#define DIO21_RPORT PIND
193
+#define DIO21_WPORT PORTD
194
+#define DIO21_DDR   DDRD
195
+#define DIO21_PWM   NULL
196
+
197
+#define DIO22_PIN   PIND5
198
+#define DIO22_RPORT PIND
199
+#define DIO22_WPORT PORTD
200
+#define DIO22_DDR   DDRD
201
+#define DIO22_PWM   NULL
202
+
203
+#define DIO23_PIN   PIND6
204
+#define DIO23_RPORT PIND
205
+#define DIO23_WPORT PORTD
206
+#define DIO23_DDR   DDRD
207
+#define DIO23_PWM   NULL
208
+
209
+#define DIO24_PIN   PIND7
210
+#define DIO24_RPORT PIND
211
+#define DIO24_WPORT PORTD
212
+#define DIO24_DDR   DDRD
213
+#define DIO24_PWM   NULL
214
+
215
+#define DIO25_PIN   PING0
216
+#define DIO25_RPORT PING
217
+#define DIO25_WPORT PORTG
218
+#define DIO25_DDR   DDRG
219
+#define DIO25_PWM   NULL
220
+
221
+#define DIO26_PIN   PING1
222
+#define DIO26_RPORT PING
223
+#define DIO26_WPORT PORTG
224
+#define DIO26_DDR   DDRG
225
+#define DIO26_PWM   NULL
226
+
227
+#define DIO27_PIN   PING2
228
+#define DIO27_RPORT PING
229
+#define DIO27_WPORT PORTG
230
+#define DIO27_DDR   DDRG
231
+#define DIO27_PWM   NULL
232
+
233
+#define DIO28_PIN   PING3
234
+#define DIO28_RPORT PING
235
+#define DIO28_WPORT PORTG
236
+#define DIO28_DDR   DDRG
237
+#define DIO28_PWM   NULL
238
+
239
+#define DIO29_PIN   PING4
240
+#define DIO29_RPORT PING
241
+#define DIO29_WPORT PORTG
242
+#define DIO29_DDR   DDRG
243
+#define DIO29_PWM   NULL
244
+
245
+#define DIO30_PIN   PINC0
246
+#define DIO30_RPORT PINC
247
+#define DIO30_WPORT PORTC
248
+#define DIO30_DDR   DDRC
249
+#define DIO30_PWM   NULL
250
+
251
+#define DIO31_PIN   PINC1
252
+#define DIO31_RPORT PINC
253
+#define DIO31_WPORT PORTC
254
+#define DIO31_DDR   DDRC
255
+#define DIO31_PWM   NULL
256
+
257
+#define DIO32_PIN   PINC2
258
+#define DIO32_RPORT PINC
259
+#define DIO32_WPORT PORTC
260
+#define DIO32_DDR   DDRC
261
+#define DIO32_PWM   NULL
262
+
263
+#define DIO33_PIN   PINC3
264
+#define DIO33_RPORT PINC
265
+#define DIO33_WPORT PORTC
266
+#define DIO33_DDR   DDRC
267
+#define DIO33_PWM   NULL
268
+
269
+#define DIO34_PIN   PINC4
270
+#define DIO34_RPORT PINC
271
+#define DIO34_WPORT PORTC
272
+#define DIO34_DDR   DDRC
273
+#define DIO34_PWM   NULL
274
+
275
+#define DIO35_PIN   PINC5
276
+#define DIO35_RPORT PINC
277
+#define DIO35_WPORT PORTC
278
+#define DIO35_DDR   DDRC
279
+#define DIO35_PWM   NULL
280
+
281
+#define DIO36_PIN   PINC6
282
+#define DIO36_RPORT PINC
283
+#define DIO36_WPORT PORTC
284
+#define DIO36_DDR   DDRC
285
+#define DIO36_PWM   NULL
286
+
287
+#define DIO37_PIN   PINC7
288
+#define DIO37_RPORT PINC
289
+#define DIO37_WPORT PORTC
290
+#define DIO37_DDR   DDRC
291
+#define DIO37_PWM   NULL
292
+
293
+#define DIO38_PIN   PINA0
294
+#define DIO38_RPORT PINA
295
+#define DIO38_WPORT PORTA
296
+#define DIO38_DDR   DDRA
297
+#define DIO38_PWM   NULL
298
+
299
+#define DIO39_PIN   PINA1
300
+#define DIO39_RPORT PINA
301
+#define DIO39_WPORT PORTA
302
+#define DIO39_DDR   DDRA
303
+#define DIO39_PWM   NULL
304
+
305
+#define DIO40_PIN   PINA2
306
+#define DIO40_RPORT PINA
307
+#define DIO40_WPORT PORTA
308
+#define DIO40_DDR   DDRA
309
+#define DIO40_PWM   NULL
310
+
311
+#define DIO41_PIN   PINA3
312
+#define DIO41_RPORT PINA
313
+#define DIO41_WPORT PORTA
314
+#define DIO41_DDR   DDRA
315
+#define DIO41_PWM   NULL
316
+
317
+#define DIO42_PIN   PINA4
318
+#define DIO42_RPORT PINA
319
+#define DIO42_WPORT PORTA
320
+#define DIO42_DDR   DDRA
321
+#define DIO42_PWM   NULL
322
+
323
+#define DIO43_PIN   PINA5
324
+#define DIO43_RPORT PINA
325
+#define DIO43_WPORT PORTA
326
+#define DIO43_DDR   DDRA
327
+#define DIO43_PWM   NULL
328
+
329
+#define DIO44_PIN   PINA6
330
+#define DIO44_RPORT PINA
331
+#define DIO44_WPORT PORTA
332
+#define DIO44_DDR   DDRA
333
+#define DIO44_PWM   NULL
334
+
335
+#define DIO45_PIN   PINA7
336
+#define DIO45_RPORT PINA
337
+#define DIO45_WPORT PORTA
338
+#define DIO45_DDR   DDRA
339
+#define DIO45_PWM   NULL
340
+
341
+#define DIO46_PIN   PINF0
342
+#define DIO46_RPORT PINF
343
+#define DIO46_WPORT PORTF
344
+#define DIO46_DDR   DDRF
345
+#define DIO46_PWM   NULL
346
+
347
+#define DIO47_PIN   PINF1
348
+#define DIO47_RPORT PINF
349
+#define DIO47_WPORT PORTF
350
+#define DIO47_DDR   DDRF
351
+#define DIO47_PWM   NULL
352
+
353
+#define DIO48_PIN   PINF2
354
+#define DIO48_RPORT PINF
355
+#define DIO48_WPORT PORTF
356
+#define DIO48_DDR   DDRF
357
+#define DIO48_PWM   NULL
358
+
359
+#define DIO49_PIN   PINF3
360
+#define DIO49_RPORT PINF
361
+#define DIO49_WPORT PORTF
362
+#define DIO49_DDR   DDRF
363
+#define DIO49_PWM   NULL
364
+
365
+#define DIO50_PIN   PINF4
366
+#define DIO50_RPORT PINF
367
+#define DIO50_WPORT PORTF
368
+#define DIO50_DDR   DDRF
369
+#define DIO50_PWM   NULL
370
+
371
+#define DIO51_PIN   PINF5
372
+#define DIO51_RPORT PINF
373
+#define DIO51_WPORT PORTF
374
+#define DIO51_DDR   DDRF
375
+#define DIO51_PWM   NULL
376
+
377
+#define DIO52_PIN   PINF6
378
+#define DIO52_RPORT PINF
379
+#define DIO52_WPORT PORTF
380
+#define DIO52_DDR   DDRF
381
+#define DIO52_PWM   NULL
382
+
383
+#define DIO53_PIN   PINF7
384
+#define DIO53_RPORT PINF
385
+#define DIO53_WPORT PORTF
386
+#define DIO53_DDR   DDRF
387
+#define DIO53_PWM   NULL
388
+
389
+#undef PA0
390
+#define PA0_PIN     PINA0
391
+#define PA0_RPORT   PINA
392
+#define PA0_WPORT   PORTA
393
+#define PA0_DDR     DDRA
394
+#define PA0_PWM     NULL
395
+#undef PA1
396
+#define PA1_PIN     PINA1
397
+#define PA1_RPORT   PINA
398
+#define PA1_WPORT   PORTA
399
+#define PA1_DDR     DDRA
400
+#define PA1_PWM     NULL
401
+#undef PA2
402
+#define PA2_PIN     PINA2
403
+#define PA2_RPORT   PINA
404
+#define PA2_WPORT   PORTA
405
+#define PA2_DDR     DDRA
406
+#define PA2_PWM     NULL
407
+#undef PA3
408
+#define PA3_PIN     PINA3
409
+#define PA3_RPORT   PINA
410
+#define PA3_WPORT   PORTA
411
+#define PA3_DDR     DDRA
412
+#define PA3_PWM     NULL
413
+#undef PA4
414
+#define PA4_PIN     PINA4
415
+#define PA4_RPORT   PINA
416
+#define PA4_WPORT   PORTA
417
+#define PA4_DDR     DDRA
418
+#define PA4_PWM     NULL
419
+#undef PA5
420
+#define PA5_PIN     PINA5
421
+#define PA5_RPORT   PINA
422
+#define PA5_WPORT   PORTA
423
+#define PA5_DDR     DDRA
424
+#define PA5_PWM     NULL
425
+#undef PA6
426
+#define PA6_PIN     PINA6
427
+#define PA6_RPORT   PINA
428
+#define PA6_WPORT   PORTA
429
+#define PA6_DDR     DDRA
430
+#define PA6_PWM     NULL
431
+#undef PA7
432
+#define PA7_PIN     PINA7
433
+#define PA7_RPORT   PINA
434
+#define PA7_WPORT   PORTA
435
+#define PA7_DDR     DDRA
436
+#define PA7_PWM     NULL
437
+
438
+#undef PB0
439
+#define PB0_PIN     PINB0
440
+#define PB0_RPORT   PINB
441
+#define PB0_WPORT   PORTB
442
+#define PB0_DDR     DDRB
443
+#define PB0_PWM     NULL
444
+#undef PB1
445
+#define PB1_PIN     PINB1
446
+#define PB1_RPORT   PINB
447
+#define PB1_WPORT   PORTB
448
+#define PB1_DDR     DDRB
449
+#define PB1_PWM     NULL
450
+#undef PB2
451
+#define PB2_PIN     PINB2
452
+#define PB2_RPORT   PINB
453
+#define PB2_WPORT   PORTB
454
+#define PB2_DDR     DDRB
455
+#define PB2_PWM     NULL
456
+#undef PB3
457
+#define PB3_PIN     PINB3
458
+#define PB3_RPORT   PINB
459
+#define PB3_WPORT   PORTB
460
+#define PB3_DDR     DDRB
461
+#define PB3_PWM     NULL
462
+#undef PB4
463
+#define PB4_PIN     PINB4
464
+#define PB4_RPORT   PINB
465
+#define PB4_WPORT   PORTB
466
+#define PB4_DDR     DDRB
467
+#define PB4_PWM     &OCR2A
468
+#undef PB5
469
+#define PB5_PIN     PINB5
470
+#define PB5_RPORT   PINB
471
+#define PB5_WPORT   PORTB
472
+#define PB5_DDR     DDRB
473
+#define PB5_PWM     NULL
474
+#undef PB6
475
+#define PB6_PIN     PINB6
476
+#define PB6_RPORT   PINB
477
+#define PB6_WPORT   PORTB
478
+#define PB6_DDR     DDRB
479
+#define PB6_PWM     NULL
480
+#undef PB7
481
+#define PB7_PIN     PINB7
482
+#define PB7_RPORT   PINB
483
+#define PB7_WPORT   PORTB
484
+#define PB7_DDR     DDRB
485
+#define PB7_PWM     &OCR0A
486
+
487
+#undef PC0
488
+#define PC0_PIN     PINC0
489
+#define PC0_RPORT   PINC
490
+#define PC0_WPORT   PORTC
491
+#define PC0_DDR     DDRC
492
+#define PC0_PWM     NULL
493
+#undef PC1
494
+#define PC1_PIN     PINC1
495
+#define PC1_RPORT   PINC
496
+#define PC1_WPORT   PORTC
497
+#define PC1_DDR     DDRC
498
+#define PC1_PWM     NULL
499
+#undef PC2
500
+#define PC2_PIN     PINC2
501
+#define PC2_RPORT   PINC
502
+#define PC2_WPORT   PORTC
503
+#define PC2_DDR     DDRC
504
+#define PC2_PWM     NULL
505
+#undef PC3
506
+#define PC3_PIN     PINC3
507
+#define PC3_RPORT   PINC
508
+#define PC3_WPORT   PORTC
509
+#define PC3_DDR     DDRC
510
+#define PC3_PWM     NULL
511
+#undef PC4
512
+#define PC4_PIN     PINC4
513
+#define PC4_RPORT   PINC
514
+#define PC4_WPORT   PORTC
515
+#define PC4_DDR     DDRC
516
+#define PC4_PWM     NULL
517
+#undef PC5
518
+#define PC5_PIN     PINC5
519
+#define PC5_RPORT   PINC
520
+#define PC5_WPORT   PORTC
521
+#define PC5_DDR     DDRC
522
+#define PC5_PWM     NULL
523
+#undef PC6
524
+#define PC6_PIN     PINC6
525
+#define PC6_RPORT   PINC
526
+#define PC6_WPORT   PORTC
527
+#define PC6_DDR     DDRC
528
+#define PC6_PWM     NULL
529
+#undef PC7
530
+#define PC7_PIN     PINC7
531
+#define PC7_RPORT   PINC
532
+#define PC7_WPORT   PORTC
533
+#define PC7_DDR     DDRC
534
+#define PC7_PWM     NULL
535
+
536
+#undef PD0
537
+#define PD0_PIN     PIND0
538
+#define PD0_RPORT   PIND
539
+#define PD0_WPORT   PORTD
540
+#define PD0_DDR     DDRD
541
+#define PD0_PWM     NULL
542
+#undef PD1
543
+#define PD1_PIN     PIND1
544
+#define PD1_RPORT   PIND
545
+#define PD1_WPORT   PORTD
546
+#define PD1_DDR     DDRD
547
+#define PD1_PWM     NULL
548
+#undef PD2
549
+#define PD2_PIN     PIND2
550
+#define PD2_RPORT   PIND
551
+#define PD2_WPORT   PORTD
552
+#define PD2_DDR     DDRD
553
+#define PD2_PWM     NULL
554
+#undef PD3
555
+#define PD3_PIN     PIND3
556
+#define PD3_RPORT   PIND
557
+#define PD3_WPORT   PORTD
558
+#define PD3_DDR     DDRD
559
+#define PD3_PWM     NULL
560
+#undef PD4
561
+#define PD4_PIN     PIND4
562
+#define PD4_RPORT   PIND
563
+#define PD4_WPORT   PORTD
564
+#define PD4_DDR     DDRD
565
+#define PD4_PWM     NULL
566
+#undef PD5
567
+#define PD5_PIN     PIND5
568
+#define PD5_RPORT   PIND
569
+#define PD5_WPORT   PORTD
570
+#define PD5_DDR     DDRD
571
+#define PD5_PWM     NULL
572
+#undef PD6
573
+#define PD6_PIN     PIND6
574
+#define PD6_RPORT   PIND
575
+#define PD6_WPORT   PORTD
576
+#define PD6_DDR     DDRD
577
+#define PD6_PWM     NULL
578
+#undef PD7
579
+#define PD7_PIN     PIND7
580
+#define PD7_RPORT   PIND
581
+#define PD7_WPORT   PORTD
582
+#define PD7_DDR     DDRD
583
+#define PD7_PWM     NULL
584
+
585
+#undef PE0
586
+#define PE0_PIN     PINE0
587
+#define PE0_RPORT   PINE
588
+#define PE0_WPORT   PORTE
589
+#define PE0_DDR     DDRE
590
+#define PE0_PWM     NULL
591
+#undef PE1
592
+#define PE1_PIN     PINE1
593
+#define PE1_RPORT   PINE
594
+#define PE1_WPORT   PORTE
595
+#define PE1_DDR     DDRE
596
+#define PE1_PWM     NULL
597
+#undef PE2
598
+#define PE2_PIN     PINE2
599
+#define PE2_RPORT   PINE
600
+#define PE2_WPORT   PORTE
601
+#define PE2_DDR     DDRE
602
+#define PE2_PWM     NULL
603
+#undef PE3
604
+#define PE3_PIN     PINE3
605
+#define PE3_RPORT   PINE
606
+#define PE3_WPORT   PORTE
607
+#define PE3_DDR     DDRE
608
+#define PE3_PWM     &OCR3AL
609
+#undef PE4
610
+#define PE4_PIN     PINE4
611
+#define PE4_RPORT   PINE
612
+#define PE4_WPORT   PORTE
613
+#define PE4_DDR     DDRE
614
+#define PE4_PWM     &OCR3BL
615
+#undef PE5
616
+#define PE5_PIN     PINE5
617
+#define PE5_RPORT   PINE
618
+#define PE5_WPORT   PORTE
619
+#define PE5_DDR     DDRE
620
+#define PE5_PWM     &OCR3CL
621
+#undef PE6
622
+#define PE6_PIN     PINE6
623
+#define PE6_RPORT   PINE
624
+#define PE6_WPORT   PORTE
625
+#define PE6_DDR     DDRE
626
+#define PE6_PWM     NULL
627
+#undef PE7
628
+#define PE7_PIN     PINE7
629
+#define PE7_RPORT   PINE
630
+#define PE7_WPORT   PORTE
631
+#define PE7_DDR     DDRE
632
+#define PE7_PWM     NULL
633
+
634
+#undef PF0
635
+#define PF0_PIN     PINF0
636
+#define PF0_RPORT   PINF
637
+#define PF0_WPORT   PORTF
638
+#define PF0_DDR     DDRF
639
+#define PF0_PWM     NULL
640
+#undef PF1
641
+#define PF1_PIN     PINF1
642
+#define PF1_RPORT   PINF
643
+#define PF1_WPORT   PORTF
644
+#define PF1_DDR     DDRF
645
+#define PF1_PWM     NULL
646
+#undef PF2
647
+#define PF2_PIN     PINF2
648
+#define PF2_RPORT   PINF
649
+#define PF2_WPORT   PORTF
650
+#define PF2_DDR     DDRF
651
+#define PF2_PWM     NULL
652
+#undef PF3
653
+#define PF3_PIN     PINF3
654
+#define PF3_RPORT   PINF
655
+#define PF3_WPORT   PORTF
656
+#define PF3_DDR     DDRF
657
+#define PF3_PWM     NULL
658
+#undef PF4
659
+#define PF4_PIN     PINF4
660
+#define PF4_RPORT   PINF
661
+#define PF4_WPORT   PORTF
662
+#define PF4_DDR     DDRF
663
+#define PF4_PWM     NULL
664
+#undef PF5
665
+#define PF5_PIN     PINF5
666
+#define PF5_RPORT   PINF
667
+#define PF5_WPORT   PORTF
668
+#define PF5_DDR     DDRF
669
+#define PF5_PWM     NULL
670
+#undef PF6
671
+#define PF6_PIN     PINF6
672
+#define PF6_RPORT   PINF
673
+#define PF6_WPORT   PORTF
674
+#define PF6_DDR     DDRF
675
+#define PF6_PWM     NULL
676
+#undef PF7
677
+#define PF7_PIN     PINF7
678
+#define PF7_RPORT   PINF
679
+#define PF7_WPORT   PORTF
680
+#define PF7_DDR     DDRF
681
+#define PF7_PWM     NULL
682
+
683
+#undef PG0
684
+#define PG0_PIN     PING0
685
+#define PG0_RPORT   PING
686
+#define PG0_WPORT   PORTG
687
+#define PG0_DDR     DDRG
688
+#define PG0_PWM     NULL
689
+#undef PG1
690
+#define PG1_PIN     PING1
691
+#define PG1_RPORT   PING
692
+#define PG1_WPORT   PORTG
693
+#define PG1_DDR     DDRG
694
+#define PG1_PWM     NULL
695
+#undef PG2
696
+#define PG2_PIN     PING2
697
+#define PG2_RPORT   PING
698
+#define PG2_WPORT   PORTG
699
+#define PG2_DDR     DDRG
700
+#define PG2_PWM     NULL
701
+#undef PG3
702
+#define PG3_PIN     PING3
703
+#define PG3_RPORT   PING
704
+#define PG3_WPORT   PORTG
705
+#define PG3_DDR     DDRG
706
+#define PG3_PWM     NULL
707
+#undef PG4
708
+#define PG4_PIN     PING4
709
+#define PG4_RPORT   PING
710
+#define PG4_WPORT   PORTG
711
+#define PG4_DDR     DDRG
712
+#define PG4_PWM     NULL
713
+#undef PG5
714
+#define PG5_PIN     PING5
715
+#define PG5_RPORT   PING
716
+#define PG5_WPORT   PORTG
717
+#define PG5_DDR     DDRG
718
+#define PG5_PWM     &OCR0B
719
+
720
+#endif // _FASTIO_1281

+ 362
- 0
Marlin/fastio_168.h Näytä tiedosto

@@ -0,0 +1,362 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Pin mapping for the 168, 328, and 328P
25
+ *
26
+ *   168      08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
27
+ *   Port     B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
28
+ *   Marlin   08 09 10 11 12 13 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
29
+ */
30
+
31
+#ifndef _FASTIO_168
32
+#define _FASTIO_168
33
+
34
+#include "fastio.h"
35
+
36
+#define DEBUG_LED   AIO5
37
+
38
+// UART
39
+#define RXD         DIO0
40
+#define TXD         DIO1
41
+
42
+// SPI
43
+#define SCK         DIO13
44
+#define MISO        DIO12
45
+#define MOSI        DIO11
46
+#define SS          DIO10
47
+
48
+// TWI (I2C)
49
+#define SCL         AIO5
50
+#define SDA         AIO4
51
+
52
+// Timers and PWM
53
+#define OC0A        DIO6
54
+#define OC0B        DIO5
55
+#define OC1A        DIO9
56
+#define OC1B        DIO10
57
+#define OC2A        DIO11
58
+#define OC2B        DIO3
59
+
60
+// Digital I/O
61
+
62
+#define DIO0_PIN    PIND0
63
+#define DIO0_RPORT  PIND
64
+#define DIO0_WPORT  PORTD
65
+#define DIO0_DDR    DDRD
66
+#define DIO0_PWM    NULL
67
+
68
+#define DIO1_PIN    PIND1
69
+#define DIO1_RPORT  PIND
70
+#define DIO1_WPORT  PORTD
71
+#define DIO1_DDR    DDRD
72
+#define DIO1_PWM    NULL
73
+
74
+#define DIO2_PIN    PIND2
75
+#define DIO2_RPORT  PIND
76
+#define DIO2_WPORT  PORTD
77
+#define DIO2_DDR    DDRD
78
+#define DIO2_PWM    NULL
79
+
80
+#define DIO3_PIN    PIND3
81
+#define DIO3_RPORT  PIND
82
+#define DIO3_WPORT  PORTD
83
+#define DIO3_DDR    DDRD
84
+#define DIO3_PWM    &OCR2B
85
+
86
+#define DIO4_PIN    PIND4
87
+#define DIO4_RPORT  PIND
88
+#define DIO4_WPORT  PORTD
89
+#define DIO4_DDR    DDRD
90
+#define DIO4_PWM    NULL
91
+
92
+#define DIO5_PIN    PIND5
93
+#define DIO5_RPORT  PIND
94
+#define DIO5_WPORT  PORTD
95
+#define DIO5_DDR    DDRD
96
+#define DIO5_PWM    &OCR0B
97
+
98
+#define DIO6_PIN    PIND6
99
+#define DIO6_RPORT  PIND
100
+#define DIO6_WPORT  PORTD
101
+#define DIO6_DDR    DDRD
102
+#define DIO6_PWM    &OCR0A
103
+
104
+#define DIO7_PIN    PIND7
105
+#define DIO7_RPORT  PIND
106
+#define DIO7_WPORT  PORTD
107
+#define DIO7_DDR    DDRD
108
+#define DIO7_PWM    NULL
109
+
110
+#define DIO8_PIN    PINB0
111
+#define DIO8_RPORT  PINB
112
+#define DIO8_WPORT  PORTB
113
+#define DIO8_DDR    DDRB
114
+#define DIO8_PWM    NULL
115
+
116
+#define DIO9_PIN    PINB1
117
+#define DIO9_RPORT  PINB
118
+#define DIO9_WPORT  PORTB
119
+#define DIO9_DDR    DDRB
120
+#define DIO9_PWM    NULL
121
+
122
+#define DIO10_PIN   PINB2
123
+#define DIO10_RPORT PINB
124
+#define DIO10_WPORT PORTB
125
+#define DIO10_DDR   DDRB
126
+#define DIO10_PWM   NULL
127
+
128
+#define DIO11_PIN   PINB3
129
+#define DIO11_RPORT PINB
130
+#define DIO11_WPORT PORTB
131
+#define DIO11_DDR   DDRB
132
+#define DIO11_PWM   &OCR2A
133
+
134
+#define DIO12_PIN   PINB4
135
+#define DIO12_RPORT PINB
136
+#define DIO12_WPORT PORTB
137
+#define DIO12_DDR   DDRB
138
+#define DIO12_PWM   NULL
139
+
140
+#define DIO13_PIN   PINB5
141
+#define DIO13_RPORT PINB
142
+#define DIO13_WPORT PORTB
143
+#define DIO13_DDR   DDRB
144
+#define DIO13_PWM   NULL
145
+
146
+#define DIO14_PIN   PINC0
147
+#define DIO14_RPORT PINC
148
+#define DIO14_WPORT PORTC
149
+#define DIO14_DDR   DDRC
150
+#define DIO14_PWM   NULL
151
+
152
+#define DIO15_PIN   PINC1
153
+#define DIO15_RPORT PINC
154
+#define DIO15_WPORT PORTC
155
+#define DIO15_DDR   DDRC
156
+#define DIO15_PWM   NULL
157
+
158
+#define DIO16_PIN   PINC2
159
+#define DIO16_RPORT PINC
160
+#define DIO16_WPORT PORTC
161
+#define DIO16_DDR   DDRC
162
+#define DIO16_PWM   NULL
163
+
164
+#define DIO17_PIN   PINC3
165
+#define DIO17_RPORT PINC
166
+#define DIO17_WPORT PORTC
167
+#define DIO17_DDR   DDRC
168
+#define DIO17_PWM   NULL
169
+
170
+#define DIO18_PIN   PINC4
171
+#define DIO18_RPORT PINC
172
+#define DIO18_WPORT PORTC
173
+#define DIO18_DDR   DDRC
174
+#define DIO18_PWM   NULL
175
+
176
+#define DIO19_PIN   PINC5
177
+#define DIO19_RPORT PINC
178
+#define DIO19_WPORT PORTC
179
+#define DIO19_DDR   DDRC
180
+#define DIO19_PWM   NULL
181
+
182
+#define DIO20_PIN   PINC6
183
+#define DIO20_RPORT PINC
184
+#define DIO20_WPORT PORTC
185
+#define DIO20_DDR   DDRC
186
+#define DIO20_PWM   NULL
187
+
188
+#define DIO21_PIN   PINC7
189
+#define DIO21_RPORT PINC
190
+#define DIO21_WPORT PORTC
191
+#define DIO21_DDR   DDRC
192
+#define DIO21_PWM   NULL
193
+
194
+#undef PB0
195
+#define PB0_PIN     PINB0
196
+#define PB0_RPORT   PINB
197
+#define PB0_WPORT   PORTB
198
+#define PB0_DDR     DDRB
199
+#define PB0_PWM     NULL
200
+
201
+#undef PB1
202
+#define PB1_PIN     PINB1
203
+#define PB1_RPORT   PINB
204
+#define PB1_WPORT   PORTB
205
+#define PB1_DDR     DDRB
206
+#define PB1_PWM     NULL
207
+
208
+#undef PB2
209
+#define PB2_PIN     PINB2
210
+#define PB2_RPORT   PINB
211
+#define PB2_WPORT   PORTB
212
+#define PB2_DDR     DDRB
213
+#define PB2_PWM     NULL
214
+
215
+#undef PB3
216
+#define PB3_PIN     PINB3
217
+#define PB3_RPORT   PINB
218
+#define PB3_WPORT   PORTB
219
+#define PB3_DDR     DDRB
220
+#define PB3_PWM     &OCR2A
221
+
222
+#undef PB4
223
+#define PB4_PIN     PINB4
224
+#define PB4_RPORT   PINB
225
+#define PB4_WPORT   PORTB
226
+#define PB4_DDR     DDRB
227
+#define PB4_PWM     NULL
228
+
229
+#undef PB5
230
+#define PB5_PIN     PINB5
231
+#define PB5_RPORT   PINB
232
+#define PB5_WPORT   PORTB
233
+#define PB5_DDR     DDRB
234
+#define PB5_PWM     NULL
235
+
236
+#undef PB6
237
+#define PB6_PIN     PINB6
238
+#define PB6_RPORT   PINB
239
+#define PB6_WPORT   PORTB
240
+#define PB6_DDR     DDRB
241
+#define PB6_PWM     NULL
242
+
243
+#undef PB7
244
+#define PB7_PIN     PINB7
245
+#define PB7_RPORT   PINB
246
+#define PB7_WPORT   PORTB
247
+#define PB7_DDR     DDRB
248
+#define PB7_PWM     NULL
249
+
250
+#undef PC0
251
+#define PC0_PIN     PINC0
252
+#define PC0_RPORT   PINC
253
+#define PC0_WPORT   PORTC
254
+#define PC0_DDR     DDRC
255
+#define PC0_PWM     NULL
256
+
257
+#undef PC1
258
+#define PC1_PIN     PINC1
259
+#define PC1_RPORT   PINC
260
+#define PC1_WPORT   PORTC
261
+#define PC1_DDR     DDRC
262
+#define PC1_PWM     NULL
263
+
264
+#undef PC2
265
+#define PC2_PIN     PINC2
266
+#define PC2_RPORT   PINC
267
+#define PC2_WPORT   PORTC
268
+#define PC2_DDR     DDRC
269
+#define PC2_PWM     NULL
270
+
271
+#undef PC3
272
+#define PC3_PIN     PINC3
273
+#define PC3_RPORT   PINC
274
+#define PC3_WPORT   PORTC
275
+#define PC3_DDR     DDRC
276
+#define PC3_PWM     NULL
277
+
278
+#undef PC4
279
+#define PC4_PIN     PINC4
280
+#define PC4_RPORT   PINC
281
+#define PC4_WPORT   PORTC
282
+#define PC4_DDR     DDRC
283
+#define PC4_PWM     NULL
284
+
285
+#undef PC5
286
+#define PC5_PIN     PINC5
287
+#define PC5_RPORT   PINC
288
+#define PC5_WPORT   PORTC
289
+#define PC5_DDR     DDRC
290
+#define PC5_PWM     NULL
291
+
292
+#undef PC6
293
+#define PC6_PIN     PINC6
294
+#define PC6_RPORT   PINC
295
+#define PC6_WPORT   PORTC
296
+#define PC6_DDR     DDRC
297
+#define PC6_PWM     NULL
298
+
299
+#undef PC7
300
+#define PC7_PIN     PINC7
301
+#define PC7_RPORT   PINC
302
+#define PC7_WPORT   PORTC
303
+#define PC7_DDR     DDRC
304
+#define PC7_PWM     NULL
305
+
306
+#undef PD0
307
+#define PD0_PIN     PIND0
308
+#define PD0_RPORT   PIND
309
+#define PD0_WPORT   PORTD
310
+#define PD0_DDR     DDRD
311
+#define PD0_PWM     NULL
312
+
313
+#undef PD1
314
+#define PD1_PIN     PIND1
315
+#define PD1_RPORT   PIND
316
+#define PD1_WPORT   PORTD
317
+#define PD1_DDR     DDRD
318
+#define PD1_PWM     NULL
319
+
320
+#undef PD2
321
+#define PD2_PIN     PIND2
322
+#define PD2_RPORT   PIND
323
+#define PD2_WPORT   PORTD
324
+#define PD2_DDR     DDRD
325
+#define PD2_PWM     NULL
326
+
327
+#undef PD3
328
+#define PD3_PIN     PIND3
329
+#define PD3_RPORT   PIND
330
+#define PD3_WPORT   PORTD
331
+#define PD3_DDR     DDRD
332
+#define PD3_PWM     &OCR2B
333
+
334
+#undef PD4
335
+#define PD4_PIN     PIND4
336
+#define PD4_RPORT   PIND
337
+#define PD4_WPORT   PORTD
338
+#define PD4_DDR     DDRD
339
+#define PD4_PWM     NULL
340
+
341
+#undef PD5
342
+#define PD5_PIN     PIND5
343
+#define PD5_RPORT   PIND
344
+#define PD5_WPORT   PORTD
345
+#define PD5_DDR     DDRD
346
+#define PD5_PWM     &OCR0B
347
+
348
+#undef PD6
349
+#define PD6_PIN     PIND6
350
+#define PD6_RPORT   PIND
351
+#define PD6_WPORT   PORTD
352
+#define PD6_DDR     DDRD
353
+#define PD6_PWM     &OCR0A
354
+
355
+#undef PD7
356
+#define PD7_PIN     PIND7
357
+#define PD7_RPORT   PIND
358
+#define PD7_WPORT   PORTD
359
+#define PD7_DDR     DDRD
360
+#define PD7_PWM     NULL
361
+
362
+#endif // _FASTIO_168

+ 531
- 0
Marlin/fastio_644.h Näytä tiedosto

@@ -0,0 +1,531 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Pin mapping for the 644, 644p, 644pa, and 1284p
25
+ *
26
+ *   644p     31 30 29 28 27 26 25 24 00 01 02 03 04 05 06 07 16 17 18 19 20 21 22 23 08 09 10 11 12 13 14 15
27
+ *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
28
+ *   Marlin   00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
29
+ */
30
+
31
+#ifndef _FASTIO_644
32
+#define _FASTIO_644
33
+
34
+#include "fastio.h"
35
+
36
+#define DEBUG_LED   DIO0
37
+
38
+// UART
39
+#define RXD         DIO8
40
+#define TXD         DIO9
41
+#define RXD0        DIO8
42
+#define TXD0        DIO9
43
+
44
+#define RXD1        DIO10
45
+#define TXD1        DIO11
46
+
47
+// SPI
48
+#define SCK         DIO7
49
+#define MISO        DIO6
50
+#define MOSI        DIO5
51
+#define SS          DIO4
52
+
53
+// TWI (I2C)
54
+#define SCL         DIO16
55
+#define SDA         DIO17
56
+
57
+// Timers and PWM
58
+#define OC0A        DIO3
59
+#define OC0B        DIO4
60
+#define OC1A        DIO13
61
+#define OC1B        DIO12
62
+#define OC2A        DIO15
63
+#define OC2B        DIO14
64
+
65
+// Digital I/O
66
+
67
+#define DIO0_PIN    PINB0
68
+#define DIO0_RPORT  PINB
69
+#define DIO0_WPORT  PORTB
70
+#define DIO0_DDR    DDRB
71
+#define DIO0_PWM    NULL
72
+
73
+#define DIO1_PIN    PINB1
74
+#define DIO1_RPORT  PINB
75
+#define DIO1_WPORT  PORTB
76
+#define DIO1_DDR    DDRB
77
+#define DIO1_PWM    NULL
78
+
79
+#define DIO2_PIN    PINB2
80
+#define DIO2_RPORT  PINB
81
+#define DIO2_WPORT  PORTB
82
+#define DIO2_DDR    DDRB
83
+#define DIO2_PWM    NULL
84
+
85
+#define DIO3_PIN    PINB3
86
+#define DIO3_RPORT  PINB
87
+#define DIO3_WPORT  PORTB
88
+#define DIO3_DDR    DDRB
89
+#define DIO3_PWM    OCR0A
90
+
91
+#define DIO4_PIN    PINB4
92
+#define DIO4_RPORT  PINB
93
+#define DIO4_WPORT  PORTB
94
+#define DIO4_DDR    DDRB
95
+#define DIO4_PWM    OCR0B
96
+
97
+#define DIO5_PIN    PINB5
98
+#define DIO5_RPORT  PINB
99
+#define DIO5_WPORT  PORTB
100
+#define DIO5_DDR    DDRB
101
+#define DIO5_PWM    NULL
102
+
103
+#define DIO6_PIN    PINB6
104
+#define DIO6_RPORT  PINB
105
+#define DIO6_WPORT  PORTB
106
+#define DIO6_DDR    DDRB
107
+#define DIO6_PWM    NULL
108
+
109
+#define DIO7_PIN    PINB7
110
+#define DIO7_RPORT  PINB
111
+#define DIO7_WPORT  PORTB
112
+#define DIO7_DDR    DDRB
113
+#define DIO7_PWM    NULL
114
+
115
+#define DIO8_PIN    PIND0
116
+#define DIO8_RPORT  PIND
117
+#define DIO8_WPORT  PORTD
118
+#define DIO8_DDR    DDRD
119
+#define DIO8_PWM    NULL
120
+
121
+#define DIO9_PIN    PIND1
122
+#define DIO9_RPORT  PIND
123
+#define DIO9_WPORT  PORTD
124
+#define DIO9_DDR    DDRD
125
+#define DIO9_PWM    NULL
126
+
127
+#define DIO10_PIN   PIND2
128
+#define DIO10_RPORT PIND
129
+#define DIO10_WPORT PORTD
130
+#define DIO10_DDR   DDRD
131
+#define DIO10_PWM   NULL
132
+
133
+#define DIO11_PIN   PIND3
134
+#define DIO11_RPORT PIND
135
+#define DIO11_WPORT PORTD
136
+#define DIO11_DDR   DDRD
137
+#define DIO11_PWM   NULL
138
+
139
+#define DIO12_PIN   PIND4
140
+#define DIO12_RPORT PIND
141
+#define DIO12_WPORT PORTD
142
+#define DIO12_DDR   DDRD
143
+#define DIO12_PWM   OCR1B
144
+
145
+#define DIO13_PIN   PIND5
146
+#define DIO13_RPORT PIND
147
+#define DIO13_WPORT PORTD
148
+#define DIO13_DDR   DDRD
149
+#define DIO13_PWM   OCR1A
150
+
151
+#define DIO14_PIN   PIND6
152
+#define DIO14_RPORT PIND
153
+#define DIO14_WPORT PORTD
154
+#define DIO14_DDR   DDRD
155
+#define DIO14_PWM   OCR2B
156
+
157
+#define DIO15_PIN   PIND7
158
+#define DIO15_RPORT PIND
159
+#define DIO15_WPORT PORTD
160
+#define DIO15_DDR   DDRD
161
+#define DIO15_PWM   OCR2A
162
+
163
+#define DIO16_PIN   PINC0
164
+#define DIO16_RPORT PINC
165
+#define DIO16_WPORT PORTC
166
+#define DIO16_DDR   DDRC
167
+#define DIO16_PWM   NULL
168
+
169
+#define DIO17_PIN   PINC1
170
+#define DIO17_RPORT PINC
171
+#define DIO17_WPORT PORTC
172
+#define DIO17_DDR   DDRC
173
+#define DIO17_PWM   NULL
174
+
175
+#define DIO18_PIN   PINC2
176
+#define DIO18_RPORT PINC
177
+#define DIO18_WPORT PORTC
178
+#define DIO18_DDR   DDRC
179
+#define DIO18_PWM   NULL
180
+
181
+#define DIO19_PIN   PINC3
182
+#define DIO19_RPORT PINC
183
+#define DIO19_WPORT PORTC
184
+#define DIO19_DDR   DDRC
185
+#define DIO19_PWM   NULL
186
+
187
+#define DIO20_PIN   PINC4
188
+#define DIO20_RPORT PINC
189
+#define DIO20_WPORT PORTC
190
+#define DIO20_DDR   DDRC
191
+#define DIO20_PWM   NULL
192
+
193
+#define DIO21_PIN   PINC5
194
+#define DIO21_RPORT PINC
195
+#define DIO21_WPORT PORTC
196
+#define DIO21_DDR   DDRC
197
+#define DIO21_PWM   NULL
198
+
199
+#define DIO22_PIN   PINC6
200
+#define DIO22_RPORT PINC
201
+#define DIO22_WPORT PORTC
202
+#define DIO22_DDR   DDRC
203
+#define DIO22_PWM   NULL
204
+
205
+#define DIO23_PIN   PINC7
206
+#define DIO23_RPORT PINC
207
+#define DIO23_WPORT PORTC
208
+#define DIO23_DDR   DDRC
209
+#define DIO23_PWM   NULL
210
+
211
+#define DIO24_PIN   PINA7
212
+#define DIO24_RPORT PINA
213
+#define DIO24_WPORT PORTA
214
+#define DIO24_DDR   DDRA
215
+#define DIO24_PWM   NULL
216
+
217
+#define DIO25_PIN   PINA6
218
+#define DIO25_RPORT PINA
219
+#define DIO25_WPORT PORTA
220
+#define DIO25_DDR   DDRA
221
+#define DIO25_PWM   NULL
222
+
223
+#define DIO26_PIN   PINA5
224
+#define DIO26_RPORT PINA
225
+#define DIO26_WPORT PORTA
226
+#define DIO26_DDR   DDRA
227
+#define DIO26_PWM   NULL
228
+
229
+#define DIO27_PIN   PINA4
230
+#define DIO27_RPORT PINA
231
+#define DIO27_WPORT PORTA
232
+#define DIO27_DDR   DDRA
233
+#define DIO27_PWM   NULL
234
+
235
+#define DIO28_PIN   PINA3
236
+#define DIO28_RPORT PINA
237
+#define DIO28_WPORT PORTA
238
+#define DIO28_DDR   DDRA
239
+#define DIO28_PWM   NULL
240
+
241
+#define DIO29_PIN   PINA2
242
+#define DIO29_RPORT PINA
243
+#define DIO29_WPORT PORTA
244
+#define DIO29_DDR   DDRA
245
+#define DIO29_PWM   NULL
246
+
247
+#define DIO30_PIN   PINA1
248
+#define DIO30_RPORT PINA
249
+#define DIO30_WPORT PORTA
250
+#define DIO30_DDR   DDRA
251
+#define DIO30_PWM   NULL
252
+
253
+#define DIO31_PIN   PINA0
254
+#define DIO31_RPORT PINA
255
+#define DIO31_WPORT PORTA
256
+#define DIO31_DDR   DDRA
257
+#define DIO31_PWM   NULL
258
+
259
+#define AIO0_PIN    PINA0
260
+#define AIO0_RPORT  PINA
261
+#define AIO0_WPORT  PORTA
262
+#define AIO0_DDR    DDRA
263
+#define AIO0_PWM    NULL
264
+
265
+#define AIO1_PIN    PINA1
266
+#define AIO1_RPORT  PINA
267
+#define AIO1_WPORT  PORTA
268
+#define AIO1_DDR    DDRA
269
+#define AIO1_PWM    NULL
270
+
271
+#define AIO2_PIN    PINA2
272
+#define AIO2_RPORT  PINA
273
+#define AIO2_WPORT  PORTA
274
+#define AIO2_DDR    DDRA
275
+#define AIO2_PWM    NULL
276
+
277
+#define AIO3_PIN    PINA3
278
+#define AIO3_RPORT  PINA
279
+#define AIO3_WPORT  PORTA
280
+#define AIO3_DDR    DDRA
281
+#define AIO3_PWM    NULL
282
+
283
+#define AIO4_PIN    PINA4
284
+#define AIO4_RPORT  PINA
285
+#define AIO4_WPORT  PORTA
286
+#define AIO4_DDR    DDRA
287
+#define AIO4_PWM    NULL
288
+
289
+#define AIO5_PIN    PINA5
290
+#define AIO5_RPORT  PINA
291
+#define AIO5_WPORT  PORTA
292
+#define AIO5_DDR    DDRA
293
+#define AIO5_PWM    NULL
294
+
295
+#define AIO6_PIN    PINA6
296
+#define AIO6_RPORT  PINA
297
+#define AIO6_WPORT  PORTA
298
+#define AIO6_DDR    DDRA
299
+#define AIO6_PWM    NULL
300
+
301
+#define AIO7_PIN    PINA7
302
+#define AIO7_RPORT  PINA
303
+#define AIO7_WPORT  PORTA
304
+#define AIO7_DDR    DDRA
305
+#define AIO7_PWM    NULL
306
+
307
+#undef PA0
308
+#define PA0_PIN     PINA0
309
+#define PA0_RPORT   PINA
310
+#define PA0_WPORT   PORTA
311
+#define PA0_DDR     DDRA
312
+#define PA0_PWM     NULL
313
+
314
+#undef PA1
315
+#define PA1_PIN     PINA1
316
+#define PA1_RPORT   PINA
317
+#define PA1_WPORT   PORTA
318
+#define PA1_DDR     DDRA
319
+#define PA1_PWM     NULL
320
+
321
+#undef PA2
322
+#define PA2_PIN     PINA2
323
+#define PA2_RPORT   PINA
324
+#define PA2_WPORT   PORTA
325
+#define PA2_DDR     DDRA
326
+#define PA2_PWM     NULL
327
+
328
+#undef PA3
329
+#define PA3_PIN     PINA3
330
+#define PA3_RPORT   PINA
331
+#define PA3_WPORT   PORTA
332
+#define PA3_DDR     DDRA
333
+#define PA3_PWM     NULL
334
+
335
+#undef PA4
336
+#define PA4_PIN     PINA4
337
+#define PA4_RPORT   PINA
338
+#define PA4_WPORT   PORTA
339
+#define PA4_DDR     DDRA
340
+#define PA4_PWM     NULL
341
+
342
+#undef PA5
343
+#define PA5_PIN     PINA5
344
+#define PA5_RPORT   PINA
345
+#define PA5_WPORT   PORTA
346
+#define PA5_DDR     DDRA
347
+#define PA5_PWM     NULL
348
+
349
+#undef PA6
350
+#define PA6_PIN     PINA6
351
+#define PA6_RPORT   PINA
352
+#define PA6_WPORT   PORTA
353
+#define PA6_DDR     DDRA
354
+#define PA6_PWM     NULL
355
+
356
+#undef PA7
357
+#define PA7_PIN     PINA7
358
+#define PA7_RPORT   PINA
359
+#define PA7_WPORT   PORTA
360
+#define PA7_DDR     DDRA
361
+#define PA7_PWM     NULL
362
+
363
+#undef PB0
364
+#define PB0_PIN     PINB0
365
+#define PB0_RPORT   PINB
366
+#define PB0_WPORT   PORTB
367
+#define PB0_DDR     DDRB
368
+#define PB0_PWM     NULL
369
+
370
+#undef PB1
371
+#define PB1_PIN     PINB1
372
+#define PB1_RPORT   PINB
373
+#define PB1_WPORT   PORTB
374
+#define PB1_DDR     DDRB
375
+#define PB1_PWM     NULL
376
+
377
+#undef PB2
378
+#define PB2_PIN     PINB2
379
+#define PB2_RPORT   PINB
380
+#define PB2_WPORT   PORTB
381
+#define PB2_DDR     DDRB
382
+#define PB2_PWM     NULL
383
+
384
+#undef PB3
385
+#define PB3_PIN     PINB3
386
+#define PB3_RPORT   PINB
387
+#define PB3_WPORT   PORTB
388
+#define PB3_DDR     DDRB
389
+#define PB3_PWM     OCR0A
390
+
391
+#undef PB4
392
+#define PB4_PIN     PINB4
393
+#define PB4_RPORT   PINB
394
+#define PB4_WPORT   PORTB
395
+#define PB4_DDR     DDRB
396
+#define PB4_PWM     OCR0B
397
+
398
+#undef PB5
399
+#define PB5_PIN     PINB5
400
+#define PB5_RPORT   PINB
401
+#define PB5_WPORT   PORTB
402
+#define PB5_DDR     DDRB
403
+#define PB5_PWM     NULL
404
+
405
+#undef PB6
406
+#define PB6_PIN     PINB6
407
+#define PB6_RPORT   PINB
408
+#define PB6_WPORT   PORTB
409
+#define PB6_DDR     DDRB
410
+#define PB6_PWM     NULL
411
+
412
+#undef PB7
413
+#define PB7_PIN     PINB7
414
+#define PB7_RPORT   PINB
415
+#define PB7_WPORT   PORTB
416
+#define PB7_DDR     DDRB
417
+#define PB7_PWM     NULL
418
+
419
+#undef PC0
420
+#define PC0_PIN     PINC0
421
+#define PC0_RPORT   PINC
422
+#define PC0_WPORT   PORTC
423
+#define PC0_DDR     DDRC
424
+#define PC0_PWM     NULL
425
+
426
+#undef PC1
427
+#define PC1_PIN     PINC1
428
+#define PC1_RPORT   PINC
429
+#define PC1_WPORT   PORTC
430
+#define PC1_DDR     DDRC
431
+#define PC1_PWM     NULL
432
+
433
+#undef PC2
434
+#define PC2_PIN     PINC2
435
+#define PC2_RPORT   PINC
436
+#define PC2_WPORT   PORTC
437
+#define PC2_DDR     DDRC
438
+#define PC2_PWM     NULL
439
+
440
+#undef PC3
441
+#define PC3_PIN     PINC3
442
+#define PC3_RPORT   PINC
443
+#define PC3_WPORT   PORTC
444
+#define PC3_DDR     DDRC
445
+#define PC3_PWM     NULL
446
+
447
+#undef PC4
448
+#define PC4_PIN     PINC4
449
+#define PC4_RPORT   PINC
450
+#define PC4_WPORT   PORTC
451
+#define PC4_DDR     DDRC
452
+#define PC4_PWM     NULL
453
+
454
+#undef PC5
455
+#define PC5_PIN     PINC5
456
+#define PC5_RPORT   PINC
457
+#define PC5_WPORT   PORTC
458
+#define PC5_DDR     DDRC
459
+#define PC5_PWM     NULL
460
+
461
+#undef PC6
462
+#define PC6_PIN     PINC6
463
+#define PC6_RPORT   PINC
464
+#define PC6_WPORT   PORTC
465
+#define PC6_DDR     DDRC
466
+#define PC6_PWM     NULL
467
+
468
+#undef PC7
469
+#define PC7_PIN     PINC7
470
+#define PC7_RPORT   PINC
471
+#define PC7_WPORT   PORTC
472
+#define PC7_DDR     DDRC
473
+#define PC7_PWM     NULL
474
+
475
+#undef PD0
476
+#define PD0_PIN     PIND0
477
+#define PD0_RPORT   PIND
478
+#define PD0_WPORT   PORTD
479
+#define PD0_DDR     DDRD
480
+#define PD0_PWM     NULL
481
+
482
+#undef PD1
483
+#define PD1_PIN     PIND1
484
+#define PD1_RPORT   PIND
485
+#define PD1_WPORT   PORTD
486
+#define PD1_DDR     DDRD
487
+#define PD1_PWM     NULL
488
+
489
+#undef PD2
490
+#define PD2_PIN     PIND2
491
+#define PD2_RPORT   PIND
492
+#define PD2_WPORT   PORTD
493
+#define PD2_DDR     DDRD
494
+#define PD2_PWM     NULL
495
+
496
+#undef PD3
497
+#define PD3_PIN     PIND3
498
+#define PD3_RPORT   PIND
499
+#define PD3_WPORT   PORTD
500
+#define PD3_DDR     DDRD
501
+#define PD3_PWM     NULL
502
+
503
+#undef PD4
504
+#define PD4_PIN     PIND4
505
+#define PD4_RPORT   PIND
506
+#define PD4_WPORT   PORTD
507
+#define PD4_DDR     DDRD
508
+#define PD4_PWM     NULL
509
+
510
+#undef PD5
511
+#define PD5_PIN     PIND5
512
+#define PD5_RPORT   PIND
513
+#define PD5_WPORT   PORTD
514
+#define PD5_DDR     DDRD
515
+#define PD5_PWM     NULL
516
+
517
+#undef PD6
518
+#define PD6_PIN     PIND6
519
+#define PD6_RPORT   PIND
520
+#define PD6_WPORT   PORTD
521
+#define PD6_DDR     DDRD
522
+#define PD6_PWM     OCR2B
523
+
524
+#undef PD7
525
+#define PD7_PIN     PIND7
526
+#define PD7_RPORT   PIND
527
+#define PD7_WPORT   PORTD
528
+#define PD7_DDR     DDRD
529
+#define PD7_PWM     OCR2A
530
+
531
+#endif // _FASTIO_644

+ 681
- 0
Marlin/fastio_AT90USB-Marlin.h Näytä tiedosto

@@ -0,0 +1,681 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Pin mapping (Marlin) for AT90USB646, 647, 1286, and 1287
25
+ *
26
+ *   AT90USB  51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
27
+ *   Teensy   28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
28
+ *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
29
+ * > Marlin   00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
30
+ *            The pins 46 and 47 are not supported by Teensyduino, but are supported below.
31
+ */
32
+
33
+#ifndef _FASTIO_AT90USB
34
+#define _FASTIO_AT90USB
35
+
36
+#include "fastio.h"
37
+
38
+// change for your board
39
+#define DEBUG_LED   DIO31 /* led D5 red */
40
+
41
+// SPI
42
+#define SCK         DIO9   // 21
43
+#define MISO        DIO11  // 23
44
+#define MOSI        DIO10  // 22
45
+#define SS          DIO8   // 20
46
+
47
+// Digital I/O
48
+
49
+#define DIO0_PIN    PINA0
50
+#define DIO0_RPORT  PINA
51
+#define DIO0_WPORT  PORTA
52
+#define DIO0_PWM    NULL
53
+#define DIO0_DDR    DDRA
54
+
55
+#define DIO1_PIN    PINA1
56
+#define DIO1_RPORT  PINA
57
+#define DIO1_WPORT  PORTA
58
+#define DIO1_PWM    NULL
59
+#define DIO1_DDR    DDRA
60
+
61
+#define DIO2_PIN    PINA2
62
+#define DIO2_RPORT  PINA
63
+#define DIO2_WPORT  PORTA
64
+#define DIO2_PWM    NULL
65
+#define DIO2_DDR    DDRA
66
+
67
+#define DIO3_PIN    PINA3
68
+#define DIO3_RPORT  PINA
69
+#define DIO3_WPORT  PORTA
70
+#define DIO3_PWM    NULL
71
+#define DIO3_DDR    DDRA
72
+
73
+#define DIO4_PIN    PINA4
74
+#define DIO4_RPORT  PINA
75
+#define DIO4_WPORT  PORTA
76
+#define DIO4_PWM    NULL
77
+#define DIO4_DDR    DDRA
78
+
79
+#define DIO5_PIN    PINA5
80
+#define DIO5_RPORT  PINA
81
+#define DIO5_WPORT  PORTA
82
+#define DIO5_PWM    NULL
83
+#define DIO5_DDR    DDRA
84
+
85
+#define DIO6_PIN    PINA6
86
+#define DIO6_RPORT  PINA
87
+#define DIO6_WPORT  PORTA
88
+#define DIO6_PWM    NULL
89
+#define DIO6_DDR    DDRA
90
+
91
+#define DIO7_PIN    PINA7
92
+#define DIO7_RPORT  PINA
93
+#define DIO7_WPORT  PORTA
94
+#define DIO7_PWM    NULL
95
+#define DIO7_DDR    DDRA
96
+
97
+#define DIO8_PIN    PINB0
98
+#define DIO8_RPORT  PINB
99
+#define DIO8_WPORT  PORTB
100
+#define DIO8_PWM    NULL
101
+#define DIO8_DDR    DDRB
102
+
103
+#define DIO9_PIN    PINB1
104
+#define DIO9_RPORT  PINB
105
+#define DIO9_WPORT  PORTB
106
+#define DIO9_PWM    NULL
107
+#define DIO9_DDR    DDRB
108
+
109
+#define DIO10_PIN   PINB2
110
+#define DIO10_RPORT PINB
111
+#define DIO10_WPORT PORTB
112
+#define DIO10_PWM   NULL
113
+#define DIO10_DDR   DDRB
114
+
115
+#define DIO11_PIN   PINB3
116
+#define DIO11_RPORT PINB
117
+#define DIO11_WPORT PORTB
118
+#define DIO11_PWM   NULL
119
+#define DIO11_DDR   DDRB
120
+
121
+#define DIO12_PIN   PINB4
122
+#define DIO12_RPORT PINB
123
+#define DIO12_WPORT PORTB
124
+#define DIO12_PWM   NULL
125
+#define DIO12_DDR   DDRB
126
+
127
+#define DIO13_PIN   PINB5
128
+#define DIO13_RPORT PINB
129
+#define DIO13_WPORT PORTB
130
+#define DIO13_PWM   NULL
131
+#define DIO13_DDR   DDRB
132
+
133
+#define DIO14_PIN   PINB6
134
+#define DIO14_RPORT PINB
135
+#define DIO14_WPORT PORTB
136
+#define DIO14_PWM   NULL
137
+#define DIO14_DDR   DDRB
138
+
139
+#define DIO15_PIN   PINB7
140
+#define DIO15_RPORT PINB
141
+#define DIO15_WPORT PORTB
142
+#define DIO15_PWM   NULL
143
+#define DIO15_DDR   DDRB
144
+
145
+#define DIO16_PIN   PINC0
146
+#define DIO16_RPORT PINC
147
+#define DIO16_WPORT PORTC
148
+#define DIO16_PWM   NULL
149
+#define DIO16_DDR   DDRC
150
+
151
+#define DIO17_PIN   PINC1
152
+#define DIO17_RPORT PINC
153
+#define DIO17_WPORT PORTC
154
+#define DIO17_PWM   NULL
155
+#define DIO17_DDR   DDRC
156
+
157
+#define DIO18_PIN   PINC2
158
+#define DIO18_RPORT PINC
159
+#define DIO18_WPORT PORTC
160
+#define DIO18_PWM   NULL
161
+#define DIO18_DDR   DDRC
162
+
163
+#define DIO19_PIN   PINC3
164
+#define DIO19_RPORT PINC
165
+#define DIO19_WPORT PORTC
166
+#define DIO19_PWM   NULL
167
+#define DIO19_DDR   DDRC
168
+
169
+#define DIO20_PIN   PINC4
170
+#define DIO20_RPORT PINC
171
+#define DIO20_WPORT PORTC
172
+#define DIO20_PWM   NULL
173
+#define DIO20_DDR   DDRC
174
+
175
+#define DIO21_PIN   PINC5
176
+#define DIO21_RPORT PINC
177
+#define DIO21_WPORT PORTC
178
+#define DIO21_PWM   NULL
179
+#define DIO21_DDR   DDRC
180
+
181
+#define DIO22_PIN   PINC6
182
+#define DIO22_RPORT PINC
183
+#define DIO22_WPORT PORTC
184
+#define DIO22_PWM   NULL
185
+#define DIO22_DDR   DDRC
186
+
187
+#define DIO23_PIN   PINC7
188
+#define DIO23_RPORT PINC
189
+#define DIO23_WPORT PORTC
190
+#define DIO23_PWM   NULL
191
+#define DIO23_DDR   DDRC
192
+
193
+#define DIO24_PIN   PIND0
194
+#define DIO24_RPORT PIND
195
+#define DIO24_WPORT PORTD
196
+#define DIO24_PWM   NULL
197
+#define DIO24_DDR   DDRD
198
+
199
+#define DIO25_PIN   PIND1
200
+#define DIO25_RPORT PIND
201
+#define DIO25_WPORT PORTD
202
+#define DIO25_PWM   NULL
203
+#define DIO25_DDR   DDRD
204
+
205
+#define DIO26_PIN   PIND2
206
+#define DIO26_RPORT PIND
207
+#define DIO26_WPORT PORTD
208
+#define DIO26_PWM   NULL
209
+#define DIO26_DDR   DDRD
210
+
211
+#define DIO27_PIN   PIND3
212
+#define DIO27_RPORT PIND
213
+#define DIO27_WPORT PORTD
214
+#define DIO27_PWM   NULL
215
+#define DIO27_DDR   DDRD
216
+
217
+#define DIO28_PIN   PIND4
218
+#define DIO28_RPORT PIND
219
+#define DIO28_WPORT PORTD
220
+#define DIO28_PWM   NULL
221
+#define DIO28_DDR   DDRD
222
+
223
+#define DIO29_PIN   PIND5
224
+#define DIO29_RPORT PIND
225
+#define DIO29_WPORT PORTD
226
+#define DIO29_PWM   NULL
227
+#define DIO29_DDR   DDRD
228
+
229
+#define DIO30_PIN   PIND6
230
+#define DIO30_RPORT PIND
231
+#define DIO30_WPORT PORTD
232
+#define DIO30_PWM   NULL
233
+#define DIO30_DDR   DDRD
234
+
235
+#define DIO31_PIN   PIND7
236
+#define DIO31_RPORT PIND
237
+#define DIO31_WPORT PORTD
238
+#define DIO31_PWM   NULL
239
+#define DIO31_DDR   DDRD
240
+
241
+#define DIO32_PIN   PINE0
242
+#define DIO32_RPORT PINE
243
+#define DIO32_WPORT PORTE
244
+#define DIO32_PWM   NULL
245
+#define DIO32_DDR   DDRE
246
+
247
+#define DIO33_PIN   PINE1
248
+#define DIO33_RPORT PINE
249
+#define DIO33_WPORT PORTE
250
+#define DIO33_PWM   NULL
251
+#define DIO33_DDR   DDRE
252
+
253
+#define DIO34_PIN   PINE2
254
+#define DIO34_RPORT PINE
255
+#define DIO34_WPORT PORTE
256
+#define DIO34_PWM   NULL
257
+#define DIO34_DDR   DDRE
258
+
259
+#define DIO35_PIN   PINE3
260
+#define DIO35_RPORT PINE
261
+#define DIO35_WPORT PORTE
262
+#define DIO35_PWM   NULL
263
+#define DIO35_DDR   DDRE
264
+
265
+#define DIO36_PIN   PINE4
266
+#define DIO36_RPORT PINE
267
+#define DIO36_WPORT PORTE
268
+#define DIO36_PWM   NULL
269
+#define DIO36_DDR   DDRE
270
+
271
+#define DIO37_PIN   PINE5
272
+#define DIO37_RPORT PINE
273
+#define DIO37_WPORT PORTE
274
+#define DIO37_PWM   NULL
275
+#define DIO37_DDR   DDRE
276
+
277
+#define DIO38_PIN   PINE6
278
+#define DIO38_RPORT PINE
279
+#define DIO38_WPORT PORTE
280
+#define DIO38_PWM   NULL
281
+#define DIO38_DDR   DDRE
282
+
283
+#define DIO39_PIN   PINE7
284
+#define DIO39_RPORT PINE
285
+#define DIO39_WPORT PORTE
286
+#define DIO39_PWM   NULL
287
+#define DIO39_DDR   DDRE
288
+
289
+#define AIO0_PIN    PINF0
290
+#define AIO0_RPORT  PINF
291
+#define AIO0_WPORT  PORTF
292
+#define AIO0_PWM    NULL
293
+#define AIO0_DDR    DDRF
294
+
295
+#define AIO1_PIN    PINF1
296
+#define AIO1_RPORT  PINF
297
+#define AIO1_WPORT  PORTF
298
+#define AIO1_PWM    NULL
299
+#define AIO1_DDR    DDRF
300
+
301
+#define AIO2_PIN    PINF2
302
+#define AIO2_RPORT  PINF
303
+#define AIO2_WPORT  PORTF
304
+#define AIO2_PWM    NULL
305
+#define AIO2_DDR    DDRF
306
+
307
+#define AIO3_PIN    PINF3
308
+#define AIO3_RPORT  PINF
309
+#define AIO3_WPORT  PORTF
310
+#define AIO3_PWM    NULL
311
+#define AIO3_DDR    DDRF
312
+
313
+#define AIO4_PIN    PINF4
314
+#define AIO4_RPORT  PINF
315
+#define AIO4_WPORT  PORTF
316
+#define AIO4_PWM    NULL
317
+#define AIO4_DDR    DDRF
318
+
319
+#define AIO5_PIN    PINF5
320
+#define AIO5_RPORT  PINF
321
+#define AIO5_WPORT  PORTF
322
+#define AIO5_PWM    NULL
323
+#define AIO5_DDR    DDRF
324
+
325
+#define AIO6_PIN    PINF6
326
+#define AIO6_RPORT  PINF
327
+#define AIO6_WPORT  PORTF
328
+#define AIO6_PWM    NULL
329
+#define AIO6_DDR    DDRF
330
+
331
+#define AIO7_PIN    PINF7
332
+#define AIO7_RPORT  PINF
333
+#define AIO7_WPORT  PORTF
334
+#define AIO7_PWM    NULL
335
+#define AIO7_DDR    DDRF
336
+
337
+#define DIO40_PIN   PINF0
338
+#define DIO40_RPORT PINF
339
+#define DIO40_WPORT PORTF
340
+#define DIO40_PWM   NULL
341
+#define DIO40_DDR   DDRF
342
+
343
+#define DIO41_PIN   PINF1
344
+#define DIO41_RPORT PINF
345
+#define DIO41_WPORT PORTF
346
+#define DIO41_PWM   NULL
347
+#define DIO41_DDR   DDRF
348
+
349
+#define DIO42_PIN   PINF2
350
+#define DIO42_RPORT PINF
351
+#define DIO42_WPORT PORTF
352
+#define DIO42_PWM   NULL
353
+#define DIO42_DDR   DDRF
354
+
355
+#define DIO43_PIN   PINF3
356
+#define DIO43_RPORT PINF
357
+#define DIO43_WPORT PORTF
358
+#define DIO43_PWM   NULL
359
+#define DIO43_DDR   DDRF
360
+
361
+#define DIO44_PIN   PINF4
362
+#define DIO44_RPORT PINF
363
+#define DIO44_WPORT PORTF
364
+#define DIO44_PWM   NULL
365
+#define DIO44_DDR   DDRF
366
+
367
+#define DIO45_PIN   PINF5
368
+#define DIO45_RPORT PINF
369
+#define DIO45_WPORT PORTF
370
+#define DIO45_PWM   NULL
371
+#define DIO45_DDR   DDRF
372
+
373
+#define DIO46_PIN   PINF6
374
+#define DIO46_RPORT PINF
375
+#define DIO46_WPORT PORTF
376
+#define DIO46_PWM   NULL
377
+#define DIO46_DDR   DDRF
378
+
379
+#define DIO47_PIN   PINF7
380
+#define DIO47_RPORT PINF
381
+#define DIO47_WPORT PORTF
382
+#define DIO47_PWM   NULL
383
+#define DIO47_DDR   DDRF
384
+
385
+// Analog Outputs
386
+
387
+#undef PA0
388
+#define PA0_PIN     PINA0
389
+#define PA0_RPORT   PINA
390
+#define PA0_WPORT   PORTA
391
+#define PA0_PWM     NULL
392
+#define PA0_DDR     DDRA
393
+#undef PA1
394
+#define PA1_PIN     PINA1
395
+#define PA1_RPORT   PINA
396
+#define PA1_WPORT   PORTA
397
+#define PA1_PWM     NULL
398
+#define PA1_DDR     DDRA
399
+#undef PA2
400
+#define PA2_PIN     PINA2
401
+#define PA2_RPORT   PINA
402
+#define PA2_WPORT   PORTA
403
+#define PA2_PWM     NULL
404
+#define PA2_DDR     DDRA
405
+#undef PA3
406
+#define PA3_PIN     PINA3
407
+#define PA3_RPORT   PINA
408
+#define PA3_WPORT   PORTA
409
+#define PA3_PWM     NULL
410
+#define PA3_DDR     DDRA
411
+#undef PA4
412
+#define PA4_PIN     PINA4
413
+#define PA4_RPORT   PINA
414
+#define PA4_WPORT   PORTA
415
+#define PA4_PWM     NULL
416
+#define PA4_DDR     DDRA
417
+#undef PA5
418
+#define PA5_PIN     PINA5
419
+#define PA5_RPORT   PINA
420
+#define PA5_WPORT   PORTA
421
+#define PA5_PWM     NULL
422
+#define PA5_DDR     DDRA
423
+#undef PA6
424
+#define PA6_PIN     PINA6
425
+#define PA6_RPORT   PINA
426
+#define PA6_WPORT   PORTA
427
+#define PA6_PWM     NULL
428
+#define PA6_DDR     DDRA
429
+#undef PA7
430
+#define PA7_PIN     PINA7
431
+#define PA7_RPORT   PINA
432
+#define PA7_WPORT   PORTA
433
+#define PA7_PWM     NULL
434
+#define PA7_DDR     DDRA
435
+
436
+#undef PB0
437
+#define PB0_PIN     PINB0
438
+#define PB0_RPORT   PINB
439
+#define PB0_WPORT   PORTB
440
+#define PB0_PWM     NULL
441
+#define PB0_DDR     DDRB
442
+#undef PB1
443
+#define PB1_PIN     PINB1
444
+#define PB1_RPORT   PINB
445
+#define PB1_WPORT   PORTB
446
+#define PB1_PWM     NULL
447
+#define PB1_DDR     DDRB
448
+#undef PB2
449
+#define PB2_PIN     PINB2
450
+#define PB2_RPORT   PINB
451
+#define PB2_WPORT   PORTB
452
+#define PB2_PWM     NULL
453
+#define PB2_DDR     DDRB
454
+#undef PB3
455
+#define PB3_PIN     PINB3
456
+#define PB3_RPORT   PINB
457
+#define PB3_WPORT   PORTB
458
+#define PB3_PWM     NULL
459
+#define PB3_DDR     DDRB
460
+#undef PB4
461
+#define PB4_PIN     PINB4
462
+#define PB4_RPORT   PINB
463
+#define PB4_WPORT   PORTB
464
+#define PB4_PWM     NULL
465
+#define PB4_DDR     DDRB
466
+#undef PB5
467
+#define PB5_PIN     PINB5
468
+#define PB5_RPORT   PINB
469
+#define PB5_WPORT   PORTB
470
+#define PB5_PWM     NULL
471
+#define PB5_DDR     DDRB
472
+#undef PB6
473
+#define PB6_PIN     PINB6
474
+#define PB6_RPORT   PINB
475
+#define PB6_WPORT   PORTB
476
+#define PB6_PWM     NULL
477
+#define PB6_DDR     DDRB
478
+#undef PB7
479
+#define PB7_PIN     PINB7
480
+#define PB7_RPORT   PINB
481
+#define PB7_WPORT   PORTB
482
+#define PB7_PWM     NULL
483
+#define PB7_DDR     DDRB
484
+
485
+#undef PC0
486
+#define PC0_PIN     PINC0
487
+#define PC0_RPORT   PINC
488
+#define PC0_WPORT   PORTC
489
+#define PC0_PWM     NULL
490
+#define PC0_DDR     DDRC
491
+#undef PC1
492
+#define PC1_PIN     PINC1
493
+#define PC1_RPORT   PINC
494
+#define PC1_WPORT   PORTC
495
+#define PC1_PWM     NULL
496
+#define PC1_DDR     DDRC
497
+#undef PC2
498
+#define PC2_PIN     PINC2
499
+#define PC2_RPORT   PINC
500
+#define PC2_WPORT   PORTC
501
+#define PC2_PWM     NULL
502
+#define PC2_DDR     DDRC
503
+#undef PC3
504
+#define PC3_PIN     PINC3
505
+#define PC3_RPORT   PINC
506
+#define PC3_WPORT   PORTC
507
+#define PC3_PWM     NULL
508
+#define PC3_DDR     DDRC
509
+#undef PC4
510
+#define PC4_PIN     PINC4
511
+#define PC4_RPORT   PINC
512
+#define PC4_WPORT   PORTC
513
+#define PC4_PWM     NULL
514
+#define PC4_DDR     DDRC
515
+#undef PC5
516
+#define PC5_PIN     PINC5
517
+#define PC5_RPORT   PINC
518
+#define PC5_WPORT   PORTC
519
+#define PC5_PWM     NULL
520
+#define PC5_DDR     DDRC
521
+#undef PC6
522
+#define PC6_PIN     PINC6
523
+#define PC6_RPORT   PINC
524
+#define PC6_WPORT   PORTC
525
+#define PC6_PWM     NULL
526
+#define PC6_DDR     DDRC
527
+#undef PC7
528
+#define PC7_PIN     PINC7
529
+#define PC7_RPORT   PINC
530
+#define PC7_WPORT   PORTC
531
+#define PC7_PWM     NULL
532
+#define PC7_DDR     DDRC
533
+
534
+#undef PD0
535
+#define PD0_PIN     PIND0
536
+#define PD0_RPORT   PIND
537
+#define PD0_WPORT   PORTD
538
+#define PD0_PWM     NULL
539
+#define PD0_DDR     DDRD
540
+#undef PD1
541
+#define PD1_PIN     PIND1
542
+#define PD1_RPORT   PIND
543
+#define PD1_WPORT   PORTD
544
+#define PD1_PWM     NULL
545
+#define PD1_DDR     DDRD
546
+#undef PD2
547
+#define PD2_PIN     PIND2
548
+#define PD2_RPORT   PIND
549
+#define PD2_WPORT   PORTD
550
+#define PD2_PWM     NULL
551
+#define PD2_DDR     DDRD
552
+#undef PD3
553
+#define PD3_PIN     PIND3
554
+#define PD3_RPORT   PIND
555
+#define PD3_WPORT   PORTD
556
+#define PD3_PWM     NULL
557
+#define PD3_DDR     DDRD
558
+#undef PD4
559
+#define PD4_PIN     PIND4
560
+#define PD4_RPORT   PIND
561
+#define PD4_WPORT   PORTD
562
+#define PD4_PWM     NULL
563
+#define PD4_DDR     DDRD
564
+#undef PD5
565
+#define PD5_PIN     PIND5
566
+#define PD5_RPORT   PIND
567
+#define PD5_WPORT   PORTD
568
+#define PD5_PWM     NULL
569
+#define PD5_DDR     DDRD
570
+#undef PD6
571
+#define PD6_PIN     PIND6
572
+#define PD6_RPORT   PIND
573
+#define PD6_WPORT   PORTD
574
+#define PD6_PWM     NULL
575
+#define PD6_DDR     DDRD
576
+#undef PD7
577
+#define PD7_PIN     PIND7
578
+#define PD7_RPORT   PIND
579
+#define PD7_WPORT   PORTD
580
+#define PD7_PWM     NULL
581
+#define PD7_DDR     DDRD
582
+
583
+#undef PE0
584
+#define PE0_PIN     PINE0
585
+#define PE0_RPORT   PINE
586
+#define PE0_WPORT   PORTE
587
+#define PE0_PWM     NULL
588
+#define PE0_DDR     DDRE
589
+#undef PE1
590
+#define PE1_PIN     PINE1
591
+#define PE1_RPORT   PINE
592
+#define PE1_WPORT   PORTE
593
+#define PE1_PWM     NULL
594
+#define PE1_DDR     DDRE
595
+#undef PE2
596
+#define PE2_PIN     PINE2
597
+#define PE2_RPORT   PINE
598
+#define PE2_WPORT   PORTE
599
+#define PE2_PWM     NULL
600
+#define PE2_DDR     DDRE
601
+#undef PE3
602
+#define PE3_PIN     PINE3
603
+#define PE3_RPORT   PINE
604
+#define PE3_WPORT   PORTE
605
+#define PE3_PWM     NULL
606
+#define PE3_DDR     DDRE
607
+#undef PE4
608
+#define PE4_PIN     PINE4
609
+#define PE4_RPORT   PINE
610
+#define PE4_WPORT   PORTE
611
+#define PE4_PWM     NULL
612
+#define PE4_DDR     DDRE
613
+#undef PE5
614
+#define PE5_PIN     PINE5
615
+#define PE5_RPORT   PINE
616
+#define PE5_WPORT   PORTE
617
+#define PE5_PWM     NULL
618
+#define PE5_DDR     DDRE
619
+#undef PE6
620
+#define PE6_PIN     PINE6
621
+#define PE6_RPORT   PINE
622
+#define PE6_WPORT   PORTE
623
+#define PE6_PWM     NULL
624
+#define PE6_DDR     DDRE
625
+#undef PE7
626
+#define PE7_PIN     PINE7
627
+#define PE7_RPORT   PINE
628
+#define PE7_WPORT   PORTE
629
+#define PE7_PWM     NULL
630
+#define PE7_DDR     DDRE
631
+
632
+#undef PF0
633
+#define PF0_PIN     PINF0
634
+#define PF0_RPORT   PINF
635
+#define PF0_WPORT   PORTF
636
+#define PF0_PWM     NULL
637
+#define PF0_DDR     DDRF
638
+#undef PF1
639
+#define PF1_PIN     PINF1
640
+#define PF1_RPORT   PINF
641
+#define PF1_WPORT   PORTF
642
+#define PF1_PWM     NULL
643
+#define PF1_DDR     DDRF
644
+#undef PF2
645
+#define PF2_PIN     PINF2
646
+#define PF2_RPORT   PINF
647
+#define PF2_WPORT   PORTF
648
+#define PF2_PWM     NULL
649
+#define PF2_DDR     DDRF
650
+#undef PF3
651
+#define PF3_PIN     PINF3
652
+#define PF3_RPORT   PINF
653
+#define PF3_WPORT   PORTF
654
+#define PF3_PWM     NULL
655
+#define PF3_DDR     DDRF
656
+#undef PF4
657
+#define PF4_PIN     PINF4
658
+#define PF4_RPORT   PINF
659
+#define PF4_WPORT   PORTF
660
+#define PF4_PWM     NULL
661
+#define PF4_DDR     DDRF
662
+#undef PF5
663
+#define PF5_PIN     PINF5
664
+#define PF5_RPORT   PINF
665
+#define PF5_WPORT   PORTF
666
+#define PF5_PWM     NULL
667
+#define PF5_DDR     DDRF
668
+#undef PF6
669
+#define PF6_PIN     PINF6
670
+#define PF6_RPORT   PINF
671
+#define PF6_WPORT   PORTF
672
+#define PF6_PWM     NULL
673
+#define PF6_DDR     DDRF
674
+#undef PF7
675
+#define PF7_PIN     PINF7
676
+#define PF7_RPORT   PINF
677
+#define PF7_WPORT   PORTF
678
+#define PF7_PWM     NULL
679
+#define PF7_DDR     DDRF
680
+
681
+#endif // _FASTIO_AT90USB

+ 683
- 0
Marlin/fastio_AT90USB-Teensy.h Näytä tiedosto

@@ -0,0 +1,683 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
25
+ *
26
+ *   AT90USB  51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
27
+ * > Teensy   28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
28
+ *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
29
+ *   Marlin   00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
30
+ *            The pins 46 and 47 are not supported by Teensyduino, but are supported below.
31
+ */
32
+
33
+#ifndef _FASTIO_AT90USB
34
+#define _FASTIO_AT90USB
35
+
36
+#include "fastio.h"
37
+
38
+// change for your board
39
+#define DEBUG_LED   DIO31 /* led D5 red */
40
+
41
+// SPI
42
+#define SCK         DIO21  //  9
43
+#define MISO        DIO23  // 11
44
+#define MOSI        DIO22  // 10
45
+#define SS          DIO20  //  8
46
+
47
+// Digital I/O
48
+
49
+#define DIO0_PIN    PIND0
50
+#define DIO0_RPORT  PIND
51
+#define DIO0_WPORT  PORTD
52
+#define DIO0_PWM    NULL
53
+#define DIO0_DDR    DDRD
54
+
55
+#define DIO1_PIN    PIND1
56
+#define DIO1_RPORT  PIND
57
+#define DIO1_WPORT  PORTD
58
+#define DIO1_PWM    NULL
59
+#define DIO1_DDR    DDRD
60
+
61
+#define DIO2_PIN    PIND2
62
+#define DIO2_RPORT  PIND
63
+#define DIO2_WPORT  PORTD
64
+#define DIO2_PWM    NULL
65
+#define DIO2_DDR    DDRD
66
+
67
+#define DIO3_PIN    PIND3
68
+#define DIO3_RPORT  PIND
69
+#define DIO3_WPORT  PORTD
70
+#define DIO3_PWM    NULL
71
+#define DIO3_DDR    DDRD
72
+
73
+#define DIO4_PIN    PIND4
74
+#define DIO4_RPORT  PIND
75
+#define DIO4_WPORT  PORTD
76
+#define DIO4_PWM    NULL
77
+#define DIO4_DDR    DDRD
78
+
79
+#define DIO5_PIN    PIND5
80
+#define DIO5_RPORT  PIND
81
+#define DIO5_WPORT  PORTD
82
+#define DIO5_PWM    NULL
83
+#define DIO5_DDR    DDRD
84
+
85
+#define DIO6_PIN    PIND6
86
+#define DIO6_RPORT  PIND
87
+#define DIO6_WPORT  PORTD
88
+#define DIO6_PWM    NULL
89
+#define DIO6_DDR    DDRD
90
+
91
+#define DIO7_PIN    PIND7
92
+#define DIO7_RPORT  PIND
93
+#define DIO7_WPORT  PORTD
94
+#define DIO7_PWM    NULL
95
+#define DIO7_DDR    DDRD
96
+
97
+#define DIO8_PIN    PINE0
98
+#define DIO8_RPORT  PINE
99
+#define DIO8_WPORT  PORTE
100
+#define DIO8_PWM    NULL
101
+#define DIO8_DDR    DDRE
102
+
103
+#define DIO9_PIN    PINE1
104
+#define DIO9_RPORT  PINE
105
+#define DIO9_WPORT  PORTE
106
+#define DIO9_PWM    NULL
107
+#define DIO9_DDR    DDRE
108
+
109
+#define DIO10_PIN   PINC0
110
+#define DIO10_RPORT PINC
111
+#define DIO10_WPORT PORTC
112
+#define DIO10_PWM   NULL
113
+#define DIO10_DDR   DDRC
114
+
115
+#define DIO11_PIN   PINC1
116
+#define DIO11_RPORT PINC
117
+#define DIO11_WPORT PORTC
118
+#define DIO11_PWM   NULL
119
+#define DIO11_DDR   DDRC
120
+
121
+#define DIO12_PIN   PINC2
122
+#define DIO12_RPORT PINC
123
+#define DIO12_WPORT PORTC
124
+#define DIO12_PWM   NULL
125
+#define DIO12_DDR   DDRC
126
+
127
+#define DIO13_PIN   PINC3
128
+#define DIO13_RPORT PINC
129
+#define DIO13_WPORT PORTC
130
+#define DIO13_PWM   NULL
131
+#define DIO13_DDR   DDRC
132
+
133
+#define DIO14_PIN   PINC4
134
+#define DIO14_RPORT PINC
135
+#define DIO14_WPORT PORTC
136
+#define DIO14_PWM   NULL
137
+#define DIO14_DDR   DDRC
138
+
139
+#define DIO15_PIN   PINC5
140
+#define DIO15_RPORT PINC
141
+#define DIO15_WPORT PORTC
142
+#define DIO15_PWM   NULL
143
+#define DIO15_DDR   DDRC
144
+
145
+#define DIO16_PIN   PINC6
146
+#define DIO16_RPORT PINC
147
+#define DIO16_WPORT PORTC
148
+#define DIO16_PWM   NULL
149
+#define DIO16_DDR   DDRC
150
+
151
+#define DIO17_PIN   PINC7
152
+#define DIO17_RPORT PINC
153
+#define DIO17_WPORT PORTC
154
+#define DIO17_PWM   NULL
155
+#define DIO17_DDR   DDRC
156
+
157
+#define DIO18_PIN   PINE6
158
+#define DIO18_RPORT PINE
159
+#define DIO18_WPORT PORTE
160
+#define DIO18_PWM   NULL
161
+#define DIO18_DDR   DDRE
162
+
163
+#define DIO19_PIN   PINE7
164
+#define DIO19_RPORT PINE
165
+#define DIO19_WPORT PORTE
166
+#define DIO19_PWM   NULL
167
+#define DIO19_DDR   DDRE
168
+
169
+#define DIO20_PIN   PINB0
170
+#define DIO20_RPORT PINB
171
+#define DIO20_WPORT PORTB
172
+#define DIO20_PWM   NULL
173
+#define DIO20_DDR   DDRB
174
+
175
+#define DIO21_PIN   PINB1
176
+#define DIO21_RPORT PINB
177
+#define DIO21_WPORT PORTB
178
+#define DIO21_PWM   NULL
179
+#define DIO21_DDR   DDRB
180
+
181
+#define DIO22_PIN   PINB2
182
+#define DIO22_RPORT PINB
183
+#define DIO22_WPORT PORTB
184
+#define DIO22_PWM   NULL
185
+#define DIO22_DDR   DDRB
186
+
187
+#define DIO23_PIN   PINB3
188
+#define DIO23_RPORT PINB
189
+#define DIO23_WPORT PORTB
190
+#define DIO23_PWM   NULL
191
+#define DIO23_DDR   DDRB
192
+
193
+#define DIO24_PIN   PINB4
194
+#define DIO24_RPORT PINB
195
+#define DIO24_WPORT PORTB
196
+#define DIO24_PWM   NULL
197
+#define DIO24_DDR   DDRB
198
+
199
+#define DIO25_PIN   PINB5
200
+#define DIO25_RPORT PINB
201
+#define DIO25_WPORT PORTB
202
+#define DIO25_PWM   NULL
203
+#define DIO25_DDR   DDRB
204
+
205
+#define DIO26_PIN   PINB6
206
+#define DIO26_RPORT PINB
207
+#define DIO26_WPORT PORTB
208
+#define DIO26_PWM   NULL
209
+#define DIO26_DDR   DDRB
210
+
211
+#define DIO27_PIN   PINB7
212
+#define DIO27_RPORT PINB
213
+#define DIO27_WPORT PORTB
214
+#define DIO27_PWM   NULL
215
+#define DIO27_DDR   DDRB
216
+
217
+#define DIO28_PIN   PINA0
218
+#define DIO28_RPORT PINA
219
+#define DIO28_WPORT PORTA
220
+#define DIO28_PWM   NULL
221
+#define DIO28_DDR   DDRA
222
+
223
+#define DIO29_PIN   PINA1
224
+#define DIO29_RPORT PINA
225
+#define DIO29_WPORT PORTA
226
+#define DIO29_PWM   NULL
227
+#define DIO29_DDR   DDRA
228
+
229
+#define DIO30_PIN   PINA2
230
+#define DIO30_RPORT PINA
231
+#define DIO30_WPORT PORTA
232
+#define DIO30_PWM   NULL
233
+#define DIO30_DDR   DDRA
234
+
235
+#define DIO31_PIN   PINA3
236
+#define DIO31_RPORT PINA
237
+#define DIO31_WPORT PORTA
238
+#define DIO31_PWM   NULL
239
+#define DIO31_DDR   DDRA
240
+
241
+#define DIO32_PIN   PINA4
242
+#define DIO32_RPORT PINA
243
+#define DIO32_WPORT PORTA
244
+#define DIO32_PWM   NULL
245
+#define DIO32_DDR   DDRA
246
+
247
+#define DIO33_PIN   PINA5
248
+#define DIO33_RPORT PINA
249
+#define DIO33_WPORT PORTA
250
+#define DIO33_PWM   NULL
251
+#define DIO33_DDR   DDRA
252
+
253
+#define DIO34_PIN   PINA6
254
+#define DIO34_RPORT PINA
255
+#define DIO34_WPORT PORTA
256
+#define DIO34_PWM   NULL
257
+#define DIO34_DDR   DDRA
258
+
259
+#define DIO35_PIN   PINA7
260
+#define DIO35_RPORT PINA
261
+#define DIO35_WPORT PORTA
262
+#define DIO35_PWM   NULL
263
+#define DIO35_DDR   DDRA
264
+
265
+#define DIO36_PIN   PINE4
266
+#define DIO36_RPORT PINE
267
+#define DIO36_WPORT PORTE
268
+#define DIO36_PWM   NULL
269
+#define DIO36_DDR   DDRE
270
+
271
+#define DIO37_PIN   PINE5
272
+#define DIO37_RPORT PINE
273
+#define DIO37_WPORT PORTE
274
+#define DIO37_PWM   NULL
275
+#define DIO37_DDR   DDRE
276
+
277
+#define DIO38_PIN   PINF0
278
+#define DIO38_RPORT PINF
279
+#define DIO38_WPORT PORTF
280
+#define DIO38_PWM   NULL
281
+#define DIO38_DDR   DDRF
282
+
283
+#define DIO39_PIN   PINF1
284
+#define DIO39_RPORT PINF
285
+#define DIO39_WPORT PORTF
286
+#define DIO39_PWM   NULL
287
+#define DIO39_DDR   DDRF
288
+
289
+#define DIO40_PIN   PINF2
290
+#define DIO40_RPORT PINF
291
+#define DIO40_WPORT PORTF
292
+#define DIO40_PWM   NULL
293
+#define DIO40_DDR   DDRF
294
+
295
+#define DIO41_PIN   PINF3
296
+#define DIO41_RPORT PINF
297
+#define DIO41_WPORT PORTF
298
+#define DIO41_PWM   NULL
299
+#define DIO41_DDR   DDRF
300
+
301
+#define DIO42_PIN   PINF4
302
+#define DIO42_RPORT PINF
303
+#define DIO42_WPORT PORTF
304
+#define DIO42_PWM   NULL
305
+#define DIO42_DDR   DDRF
306
+
307
+#define DIO43_PIN   PINF5
308
+#define DIO43_RPORT PINF
309
+#define DIO43_WPORT PORTF
310
+#define DIO43_PWM   NULL
311
+#define DIO43_DDR   DDRF
312
+
313
+#define DIO44_PIN   PINF6
314
+#define DIO44_RPORT PINF
315
+#define DIO44_WPORT PORTF
316
+#define DIO44_PWM   NULL
317
+#define DIO44_DDR   DDRF
318
+
319
+#define DIO45_PIN   PINF7
320
+#define DIO45_RPORT PINF
321
+#define DIO45_WPORT PORTF
322
+#define DIO45_PWM   NULL
323
+#define DIO45_DDR   DDRF
324
+
325
+#define AIO0_PIN    PINF0
326
+#define AIO0_RPORT  PINF
327
+#define AIO0_WPORT  PORTF
328
+#define AIO0_PWM    NULL
329
+#define AIO0_DDR    DDRF
330
+
331
+#define AIO1_PIN    PINF1
332
+#define AIO1_RPORT  PINF
333
+#define AIO1_WPORT  PORTF
334
+#define AIO1_PWM    NULL
335
+#define AIO1_DDR    DDRF
336
+
337
+#define AIO2_PIN    PINF2
338
+#define AIO2_RPORT  PINF
339
+#define AIO2_WPORT  PORTF
340
+#define AIO2_PWM    NULL
341
+#define AIO2_DDR    DDRF
342
+
343
+#define AIO3_PIN    PINF3
344
+#define AIO3_RPORT  PINF
345
+#define AIO3_WPORT  PORTF
346
+#define AIO3_PWM    NULL
347
+#define AIO3_DDR    DDRF
348
+
349
+#define AIO4_PIN    PINF4
350
+#define AIO4_RPORT  PINF
351
+#define AIO4_WPORT  PORTF
352
+#define AIO4_PWM    NULL
353
+#define AIO4_DDR    DDRF
354
+
355
+#define AIO5_PIN    PINF5
356
+#define AIO5_RPORT  PINF
357
+#define AIO5_WPORT  PORTF
358
+#define AIO5_PWM    NULL
359
+#define AIO5_DDR    DDRF
360
+
361
+#define AIO6_PIN    PINF6
362
+#define AIO6_RPORT  PINF
363
+#define AIO6_WPORT  PORTF
364
+#define AIO6_PWM    NULL
365
+#define AIO6_DDR    DDRF
366
+
367
+#define AIO7_PIN    PINF7
368
+#define AIO7_RPORT  PINF
369
+#define AIO7_WPORT  PORTF
370
+#define AIO7_PWM    NULL
371
+#define AIO7_DDR    DDRF
372
+
373
+//-- Begin not supported by Teensyduino
374
+//-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
375
+#define DIO46_PIN   PINE2
376
+#define DIO46_RPORT PINE
377
+#define DIO46_WPORT PORTE
378
+#define DIO46_PWM   NULL
379
+#define DIO46_DDR   DDRE
380
+
381
+#define DIO47_PIN   PINE3
382
+#define DIO47_RPORT PINE
383
+#define DIO47_WPORT PORTE
384
+#define DIO47_PWM   NULL
385
+#define DIO47_DDR   DDRE
386
+//-- end not supported by Teensyduino
387
+
388
+#undef PA0
389
+#define PA0_PIN     PINA0
390
+#define PA0_RPORT   PINA
391
+#define PA0_WPORT   PORTA
392
+#define PA0_PWM     NULL
393
+#define PA0_DDR     DDRA
394
+#undef PA1
395
+#define PA1_PIN     PINA1
396
+#define PA1_RPORT   PINA
397
+#define PA1_WPORT   PORTA
398
+#define PA1_PWM     NULL
399
+#define PA1_DDR     DDRA
400
+#undef PA2
401
+#define PA2_PIN     PINA2
402
+#define PA2_RPORT   PINA
403
+#define PA2_WPORT   PORTA
404
+#define PA2_PWM     NULL
405
+#define PA2_DDR     DDRA
406
+#undef PA3
407
+#define PA3_PIN     PINA3
408
+#define PA3_RPORT   PINA
409
+#define PA3_WPORT   PORTA
410
+#define PA3_PWM     NULL
411
+#define PA3_DDR     DDRA
412
+#undef PA4
413
+#define PA4_PIN     PINA4
414
+#define PA4_RPORT   PINA
415
+#define PA4_WPORT   PORTA
416
+#define PA4_PWM     NULL
417
+#define PA4_DDR     DDRA
418
+#undef PA5
419
+#define PA5_PIN     PINA5
420
+#define PA5_RPORT   PINA
421
+#define PA5_WPORT   PORTA
422
+#define PA5_PWM     NULL
423
+#define PA5_DDR     DDRA
424
+#undef PA6
425
+#define PA6_PIN     PINA6
426
+#define PA6_RPORT   PINA
427
+#define PA6_WPORT   PORTA
428
+#define PA6_PWM     NULL
429
+#define PA6_DDR     DDRA
430
+#undef PA7
431
+#define PA7_PIN     PINA7
432
+#define PA7_RPORT   PINA
433
+#define PA7_WPORT   PORTA
434
+#define PA7_PWM     NULL
435
+#define PA7_DDR     DDRA
436
+
437
+#undef PB0
438
+#define PB0_PIN     PINB0
439
+#define PB0_RPORT   PINB
440
+#define PB0_WPORT   PORTB
441
+#define PB0_PWM     NULL
442
+#define PB0_DDR     DDRB
443
+#undef PB1
444
+#define PB1_PIN     PINB1
445
+#define PB1_RPORT   PINB
446
+#define PB1_WPORT   PORTB
447
+#define PB1_PWM     NULL
448
+#define PB1_DDR     DDRB
449
+#undef PB2
450
+#define PB2_PIN     PINB2
451
+#define PB2_RPORT   PINB
452
+#define PB2_WPORT   PORTB
453
+#define PB2_PWM     NULL
454
+#define PB2_DDR     DDRB
455
+#undef PB3
456
+#define PB3_PIN     PINB3
457
+#define PB3_RPORT   PINB
458
+#define PB3_WPORT   PORTB
459
+#define PB3_PWM     NULL
460
+#define PB3_DDR     DDRB
461
+#undef PB4
462
+#define PB4_PIN     PINB4
463
+#define PB4_RPORT   PINB
464
+#define PB4_WPORT   PORTB
465
+#define PB4_PWM     NULL
466
+#define PB4_DDR     DDRB
467
+#undef PB5
468
+#define PB5_PIN     PINB5
469
+#define PB5_RPORT   PINB
470
+#define PB5_WPORT   PORTB
471
+#define PB5_PWM     NULL
472
+#define PB5_DDR     DDRB
473
+#undef PB6
474
+#define PB6_PIN     PINB6
475
+#define PB6_RPORT   PINB
476
+#define PB6_WPORT   PORTB
477
+#define PB6_PWM     NULL
478
+#define PB6_DDR     DDRB
479
+#undef PB7
480
+#define PB7_PIN     PINB7
481
+#define PB7_RPORT   PINB
482
+#define PB7_WPORT   PORTB
483
+#define PB7_PWM     NULL
484
+#define PB7_DDR     DDRB
485
+
486
+#undef PC0
487
+#define PC0_PIN     PINC0
488
+#define PC0_RPORT   PINC
489
+#define PC0_WPORT   PORTC
490
+#define PC0_PWM     NULL
491
+#define PC0_DDR     DDRC
492
+#undef PC1
493
+#define PC1_PIN     PINC1
494
+#define PC1_RPORT   PINC
495
+#define PC1_WPORT   PORTC
496
+#define PC1_PWM     NULL
497
+#define PC1_DDR     DDRC
498
+#undef PC2
499
+#define PC2_PIN     PINC2
500
+#define PC2_RPORT   PINC
501
+#define PC2_WPORT   PORTC
502
+#define PC2_PWM     NULL
503
+#define PC2_DDR     DDRC
504
+#undef PC3
505
+#define PC3_PIN     PINC3
506
+#define PC3_RPORT   PINC
507
+#define PC3_WPORT   PORTC
508
+#define PC3_PWM     NULL
509
+#define PC3_DDR     DDRC
510
+#undef PC4
511
+#define PC4_PIN     PINC4
512
+#define PC4_RPORT   PINC
513
+#define PC4_WPORT   PORTC
514
+#define PC4_PWM     NULL
515
+#define PC4_DDR     DDRC
516
+#undef PC5
517
+#define PC5_PIN     PINC5
518
+#define PC5_RPORT   PINC
519
+#define PC5_WPORT   PORTC
520
+#define PC5_PWM     NULL
521
+#define PC5_DDR     DDRC
522
+#undef PC6
523
+#define PC6_PIN     PINC6
524
+#define PC6_RPORT   PINC
525
+#define PC6_WPORT   PORTC
526
+#define PC6_PWM     NULL
527
+#define PC6_DDR     DDRC
528
+#undef PC7
529
+#define PC7_PIN     PINC7
530
+#define PC7_RPORT   PINC
531
+#define PC7_WPORT   PORTC
532
+#define PC7_PWM     NULL
533
+#define PC7_DDR     DDRC
534
+
535
+#undef PD0
536
+#define PD0_PIN     PIND0
537
+#define PD0_RPORT   PIND
538
+#define PD0_WPORT   PORTD
539
+#define PD0_PWM     NULL
540
+#define PD0_DDR     DDRD
541
+#undef PD1
542
+#define PD1_PIN     PIND1
543
+#define PD1_RPORT   PIND
544
+#define PD1_WPORT   PORTD
545
+#define PD1_PWM     NULL
546
+#define PD1_DDR     DDRD
547
+#undef PD2
548
+#define PD2_PIN     PIND2
549
+#define PD2_RPORT   PIND
550
+#define PD2_WPORT   PORTD
551
+#define PD2_PWM     NULL
552
+#define PD2_DDR     DDRD
553
+#undef PD3
554
+#define PD3_PIN     PIND3
555
+#define PD3_RPORT   PIND
556
+#define PD3_WPORT   PORTD
557
+#define PD3_PWM     NULL
558
+#define PD3_DDR     DDRD
559
+#undef PD4
560
+#define PD4_PIN     PIND4
561
+#define PD4_RPORT   PIND
562
+#define PD4_WPORT   PORTD
563
+#define PD4_PWM     NULL
564
+#define PD4_DDR     DDRD
565
+#undef PD5
566
+#define PD5_PIN     PIND5
567
+#define PD5_RPORT   PIND
568
+#define PD5_WPORT   PORTD
569
+#define PD5_PWM     NULL
570
+#define PD5_DDR     DDRD
571
+#undef PD6
572
+#define PD6_PIN     PIND6
573
+#define PD6_RPORT   PIND
574
+#define PD6_WPORT   PORTD
575
+#define PD6_PWM     NULL
576
+#define PD6_DDR     DDRD
577
+#undef PD7
578
+#define PD7_PIN     PIND7
579
+#define PD7_RPORT   PIND
580
+#define PD7_WPORT   PORTD
581
+#define PD7_PWM     NULL
582
+#define PD7_DDR     DDRD
583
+
584
+#undef PE0
585
+#define PE0_PIN     PINE0
586
+#define PE0_RPORT   PINE
587
+#define PE0_WPORT   PORTE
588
+#define PE0_PWM     NULL
589
+#define PE0_DDR     DDRE
590
+#undef PE1
591
+#define PE1_PIN     PINE1
592
+#define PE1_RPORT   PINE
593
+#define PE1_WPORT   PORTE
594
+#define PE1_PWM     NULL
595
+#define PE1_DDR     DDRE
596
+#undef PE2
597
+#define PE2_PIN     PINE2
598
+#define PE2_RPORT   PINE
599
+#define PE2_WPORT   PORTE
600
+#define PE2_PWM     NULL
601
+#define PE2_DDR     DDRE
602
+#undef PE3
603
+#define PE3_PIN     PINE3
604
+#define PE3_RPORT   PINE
605
+#define PE3_WPORT   PORTE
606
+#define PE3_PWM     NULL
607
+#define PE3_DDR     DDRE
608
+#undef PE4
609
+#define PE4_PIN     PINE4
610
+#define PE4_RPORT   PINE
611
+#define PE4_WPORT   PORTE
612
+#define PE4_PWM     NULL
613
+#define PE4_DDR     DDRE
614
+#undef PE5
615
+#define PE5_PIN     PINE5
616
+#define PE5_RPORT   PINE
617
+#define PE5_WPORT   PORTE
618
+#define PE5_PWM     NULL
619
+#define PE5_DDR     DDRE
620
+#undef PE6
621
+#define PE6_PIN     PINE6
622
+#define PE6_RPORT   PINE
623
+#define PE6_WPORT   PORTE
624
+#define PE6_PWM     NULL
625
+#define PE6_DDR     DDRE
626
+#undef PE7
627
+#define PE7_PIN     PINE7
628
+#define PE7_RPORT   PINE
629
+#define PE7_WPORT   PORTE
630
+#define PE7_PWM     NULL
631
+#define PE7_DDR     DDRE
632
+
633
+#undef PF0
634
+#define PF0_PIN     PINF0
635
+#define PF0_RPORT   PINF
636
+#define PF0_WPORT   PORTF
637
+#define PF0_PWM     NULL
638
+#define PF0_DDR     DDRF
639
+#undef PF1
640
+#define PF1_PIN     PINF1
641
+#define PF1_RPORT   PINF
642
+#define PF1_WPORT   PORTF
643
+#define PF1_PWM     NULL
644
+#define PF1_DDR     DDRF
645
+#undef PF2
646
+#define PF2_PIN     PINF2
647
+#define PF2_RPORT   PINF
648
+#define PF2_WPORT   PORTF
649
+#define PF2_PWM     NULL
650
+#define PF2_DDR     DDRF
651
+#undef PF3
652
+#define PF3_PIN     PINF3
653
+#define PF3_RPORT   PINF
654
+#define PF3_WPORT   PORTF
655
+#define PF3_PWM     NULL
656
+#define PF3_DDR     DDRF
657
+#undef PF4
658
+#define PF4_PIN     PINF4
659
+#define PF4_RPORT   PINF
660
+#define PF4_WPORT   PORTF
661
+#define PF4_PWM     NULL
662
+#define PF4_DDR     DDRF
663
+#undef PF5
664
+#define PF5_PIN     PINF5
665
+#define PF5_RPORT   PINF
666
+#define PF5_WPORT   PORTF
667
+#define PF5_PWM     NULL
668
+#define PF5_DDR     DDRF
669
+#undef PF6
670
+#define PF6_PIN     PINF6
671
+#define PF6_RPORT   PINF
672
+#define PF6_WPORT   PORTF
673
+#define PF6_PWM     NULL
674
+#define PF6_DDR     DDRF
675
+#undef PF7
676
+#define PF7_PIN     PINF7
677
+#define PF7_RPORT   PINF
678
+#define PF7_WPORT   PORTF
679
+#define PF7_PWM     NULL
680
+#define PF7_DDR     DDRF
681
+
682
+#endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
683
+#endif // _FASTIO_AT90USB

Loading…
Peruuta
Tallenna