Prusa3d Marlin fork
fastio.h
1 /*
2  This code contributed by Triffid_Hunter and modified by Kliment
3  why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
4 */
5 
6 #ifndef _FASTIO_ARDUINO_H
7 #define _FASTIO_ARDUINO_H
8 
9 #include <avr/io.h>
10 #include "macros.h"
11 
12 
13 /*
14  magic I/O routines
15  now you can simply SET_OUTPUT(STEP); WRITE(STEP, 1); WRITE(STEP, 0);
16 */
17 
19 #define _READ(IO) ((bool)(DIO ## IO ## _RPORT & _BV(DIO ## IO ## _PIN)))
21 // On some boards pins > 0x100 are used. These are not converted to atomic actions. An critical section is needed.
22 
23 #define _WRITE_NC(IO, v) do { if (v) {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); } else {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }; } while (0)
24 
25 #define _WRITE_C(IO, v) do { if (v) { \
26  CRITICAL_SECTION_START; \
27  {DIO ## IO ## _WPORT |= _BV(DIO ## IO ## _PIN); }\
28  CRITICAL_SECTION_END; \
29  }\
30  else {\
31  CRITICAL_SECTION_START; \
32  {DIO ## IO ## _WPORT &= ~_BV(DIO ## IO ## _PIN); }\
33  CRITICAL_SECTION_END; \
34  }\
35  }\
36  while (0)
37 
38 #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)
39 
41 #define _TOGGLE(IO) do {DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN); } while (0)
42 
44 #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)
46 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)
47 
49 #define _GET_INPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) == 0)
51 #define _GET_OUTPUT(IO) ((DIO ## IO ## _DDR & _BV(DIO ## IO ## _PIN)) != 0)
52 
54 #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
55 
56 // why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
57 
59 #define READ(IO) _READ(IO)
61 #define WRITE(IO, v) _WRITE(IO, v)
66 #define WRITE_NC(IO, v) _WRITE_NC(IO, v)
67 
69 #define TOGGLE(IO) _TOGGLE(IO)
70 
72 #define SET_INPUT(IO) _SET_INPUT(IO)
74 #define SET_OUTPUT(IO) _SET_OUTPUT(IO)
75 
77 #define GET_INPUT(IO) _GET_INPUT(IO)
79 #define GET_OUTPUT(IO) _GET_OUTPUT(IO)
80 
82 #define GET_TIMER(IO) _GET_TIMER(IO)
83 
84 /*
85  ports and functions
86 
87  added as necessary or if I feel like it- not a comprehensive list!
88 */
89 
90 #if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__)
91 // UART
92 #define RXD DIO0
93 #define TXD DIO1
94 
95 // SPI
96 #define SCK DIO13
97 #define MISO DIO12
98 #define MOSI DIO11
99 #define SS DIO10
100 
101 // TWI (I2C)
102 #define SCL AIO5
103 #define SDA AIO4
104 
105 // timers and PWM
106 #define OC0A DIO6
107 #define OC0B DIO5
108 #define OC1A DIO9
109 #define OC1B DIO10
110 #define OC2A DIO11
111 #define OC2B DIO3
112 
113 #define DEBUG_LED AIO5
114 
115 /*
116 pins
117 */
118 
119 #define DIO0_PIN PIND0
120 #define DIO0_RPORT PIND
121 #define DIO0_WPORT PORTD
122 #define DIO0_DDR DDRD
123 #define DIO0_PWM NULL
124 
125 #define DIO1_PIN PIND1
126 #define DIO1_RPORT PIND
127 #define DIO1_WPORT PORTD
128 #define DIO1_DDR DDRD
129 #define DIO1_PWM NULL
130 
131 #define DIO2_PIN PIND2
132 #define DIO2_RPORT PIND
133 #define DIO2_WPORT PORTD
134 #define DIO2_DDR DDRD
135 #define DIO2_PWM NULL
136 
137 #define DIO3_PIN PIND3
138 #define DIO3_RPORT PIND
139 #define DIO3_WPORT PORTD
140 #define DIO3_DDR DDRD
141 #define DIO3_PWM &OCR2B
142 
143 #define DIO4_PIN PIND4
144 #define DIO4_RPORT PIND
145 #define DIO4_WPORT PORTD
146 #define DIO4_DDR DDRD
147 #define DIO4_PWM NULL
148 
149 #define DIO5_PIN PIND5
150 #define DIO5_RPORT PIND
151 #define DIO5_WPORT PORTD
152 #define DIO5_DDR DDRD
153 #define DIO5_PWM &OCR0B
154 
155 #define DIO6_PIN PIND6
156 #define DIO6_RPORT PIND
157 #define DIO6_WPORT PORTD
158 #define DIO6_DDR DDRD
159 #define DIO6_PWM &OCR0A
160 
161 #define DIO7_PIN PIND7
162 #define DIO7_RPORT PIND
163 #define DIO7_WPORT PORTD
164 #define DIO7_DDR DDRD
165 #define DIO7_PWM NULL
166 
167 #define DIO8_PIN PINB0
168 #define DIO8_RPORT PINB
169 #define DIO8_WPORT PORTB
170 #define DIO8_DDR DDRB
171 #define DIO8_PWM NULL
172 
173 #define DIO9_PIN PINB1
174 #define DIO9_RPORT PINB
175 #define DIO9_WPORT PORTB
176 #define DIO9_DDR DDRB
177 #define DIO9_PWM NULL
178 
179 #define DIO10_PIN PINB2
180 #define DIO10_RPORT PINB
181 #define DIO10_WPORT PORTB
182 #define DIO10_DDR DDRB
183 #define DIO10_PWM NULL
184 
185 #define DIO11_PIN PINB3
186 #define DIO11_RPORT PINB
187 #define DIO11_WPORT PORTB
188 #define DIO11_DDR DDRB
189 #define DIO11_PWM &OCR2A
190 
191 #define DIO12_PIN PINB4
192 #define DIO12_RPORT PINB
193 #define DIO12_WPORT PORTB
194 #define DIO12_DDR DDRB
195 #define DIO12_PWM NULL
196 
197 #define DIO13_PIN PINB5
198 #define DIO13_RPORT PINB
199 #define DIO13_WPORT PORTB
200 #define DIO13_DDR DDRB
201 #define DIO13_PWM NULL
202 
203 
204 #define DIO14_PIN PINC0
205 #define DIO14_RPORT PINC
206 #define DIO14_WPORT PORTC
207 #define DIO14_DDR DDRC
208 #define DIO14_PWM NULL
209 
210 #define DIO15_PIN PINC1
211 #define DIO15_RPORT PINC
212 #define DIO15_WPORT PORTC
213 #define DIO15_DDR DDRC
214 #define DIO15_PWM NULL
215 
216 #define DIO16_PIN PINC2
217 #define DIO16_RPORT PINC
218 #define DIO16_WPORT PORTC
219 #define DIO16_DDR DDRC
220 #define DIO16_PWM NULL
221 
222 #define DIO17_PIN PINC3
223 #define DIO17_RPORT PINC
224 #define DIO17_WPORT PORTC
225 #define DIO17_DDR DDRC
226 #define DIO17_PWM NULL
227 
228 #define DIO18_PIN PINC4
229 #define DIO18_RPORT PINC
230 #define DIO18_WPORT PORTC
231 #define DIO18_DDR DDRC
232 #define DIO18_PWM NULL
233 
234 #define DIO19_PIN PINC5
235 #define DIO19_RPORT PINC
236 #define DIO19_WPORT PORTC
237 #define DIO19_DDR DDRC
238 #define DIO19_PWM NULL
239 
240 #define DIO20_PIN PINC6
241 #define DIO20_RPORT PINC
242 #define DIO20_WPORT PORTC
243 #define DIO20_DDR DDRC
244 #define DIO20_PWM NULL
245 
246 #define DIO21_PIN PINC7
247 #define DIO21_RPORT PINC
248 #define DIO21_WPORT PORTC
249 #define DIO21_DDR DDRC
250 #define DIO21_PWM NULL
251 
252 
253 
254 #undef PB0
255 #define PB0_PIN PINB0
256 #define PB0_RPORT PINB
257 #define PB0_WPORT PORTB
258 #define PB0_DDR DDRB
259 #define PB0_PWM NULL
260 
261 #undef PB1
262 #define PB1_PIN PINB1
263 #define PB1_RPORT PINB
264 #define PB1_WPORT PORTB
265 #define PB1_DDR DDRB
266 #define PB1_PWM NULL
267 
268 #undef PB2
269 #define PB2_PIN PINB2
270 #define PB2_RPORT PINB
271 #define PB2_WPORT PORTB
272 #define PB2_DDR DDRB
273 #define PB2_PWM NULL
274 
275 #undef PB3
276 #define PB3_PIN PINB3
277 #define PB3_RPORT PINB
278 #define PB3_WPORT PORTB
279 #define PB3_DDR DDRB
280 #define PB3_PWM &OCR2A
281 
282 #undef PB4
283 #define PB4_PIN PINB4
284 #define PB4_RPORT PINB
285 #define PB4_WPORT PORTB
286 #define PB4_DDR DDRB
287 #define PB4_PWM NULL
288 
289 #undef PB5
290 #define PB5_PIN PINB5
291 #define PB5_RPORT PINB
292 #define PB5_WPORT PORTB
293 #define PB5_DDR DDRB
294 #define PB5_PWM NULL
295 
296 #undef PB6
297 #define PB6_PIN PINB6
298 #define PB6_RPORT PINB
299 #define PB6_WPORT PORTB
300 #define PB6_DDR DDRB
301 #define PB6_PWM NULL
302 
303 #undef PB7
304 #define PB7_PIN PINB7
305 #define PB7_RPORT PINB
306 #define PB7_WPORT PORTB
307 #define PB7_DDR DDRB
308 #define PB7_PWM NULL
309 
310 
311 #undef PC0
312 #define PC0_PIN PINC0
313 #define PC0_RPORT PINC
314 #define PC0_WPORT PORTC
315 #define PC0_DDR DDRC
316 #define PC0_PWM NULL
317 
318 #undef PC1
319 #define PC1_PIN PINC1
320 #define PC1_RPORT PINC
321 #define PC1_WPORT PORTC
322 #define PC1_DDR DDRC
323 #define PC1_PWM NULL
324 
325 #undef PC2
326 #define PC2_PIN PINC2
327 #define PC2_RPORT PINC
328 #define PC2_WPORT PORTC
329 #define PC2_DDR DDRC
330 #define PC2_PWM NULL
331 
332 #undef PC3
333 #define PC3_PIN PINC3
334 #define PC3_RPORT PINC
335 #define PC3_WPORT PORTC
336 #define PC3_DDR DDRC
337 #define PC3_PWM NULL
338 
339 #undef PC4
340 #define PC4_PIN PINC4
341 #define PC4_RPORT PINC
342 #define PC4_WPORT PORTC
343 #define PC4_DDR DDRC
344 #define PC4_PWM NULL
345 
346 #undef PC5
347 #define PC5_PIN PINC5
348 #define PC5_RPORT PINC
349 #define PC5_WPORT PORTC
350 #define PC5_DDR DDRC
351 #define PC5_PWM NULL
352 
353 #undef PC6
354 #define PC6_PIN PINC6
355 #define PC6_RPORT PINC
356 #define PC6_WPORT PORTC
357 #define PC6_DDR DDRC
358 #define PC6_PWM NULL
359 
360 #undef PC7
361 #define PC7_PIN PINC7
362 #define PC7_RPORT PINC
363 #define PC7_WPORT PORTC
364 #define PC7_DDR DDRC
365 #define PC7_PWM NULL
366 
367 
368 #undef PD0
369 #define PD0_PIN PIND0
370 #define PD0_RPORT PIND
371 #define PD0_WPORT PORTD
372 #define PD0_DDR DDRD
373 #define PD0_PWM NULL
374 
375 #undef PD1
376 #define PD1_PIN PIND1
377 #define PD1_RPORT PIND
378 #define PD1_WPORT PORTD
379 #define PD1_DDR DDRD
380 #define PD1_PWM NULL
381 
382 #undef PD2
383 #define PD2_PIN PIND2
384 #define PD2_RPORT PIND
385 #define PD2_WPORT PORTD
386 #define PD2_DDR DDRD
387 #define PD2_PWM NULL
388 
389 #undef PD3
390 #define PD3_PIN PIND3
391 #define PD3_RPORT PIND
392 #define PD3_WPORT PORTD
393 #define PD3_DDR DDRD
394 #define PD3_PWM &OCR2B
395 
396 #undef PD4
397 #define PD4_PIN PIND4
398 #define PD4_RPORT PIND
399 #define PD4_WPORT PORTD
400 #define PD4_DDR DDRD
401 #define PD4_PWM NULL
402 
403 #undef PD5
404 #define PD5_PIN PIND5
405 #define PD5_RPORT PIND
406 #define PD5_WPORT PORTD
407 #define PD5_DDR DDRD
408 #define PD5_PWM &OCR0B
409 
410 #undef PD6
411 #define PD6_PIN PIND6
412 #define PD6_RPORT PIND
413 #define PD6_WPORT PORTD
414 #define PD6_DDR DDRD
415 #define PD6_PWM &OCR0A
416 
417 #undef PD7
418 #define PD7_PIN PIND7
419 #define PD7_RPORT PIND
420 #define PD7_WPORT PORTD
421 #define PD7_DDR DDRD
422 #define PD7_PWM NULL
423 #endif /* _AVR_ATmega{168,328,328P}__ */
424 
425 #if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) || defined (__AVR_ATmega1284P__)
426 // UART
427 #define RXD DIO8
428 #define TXD DIO9
429 #define RXD0 DIO8
430 #define TXD0 DIO9
431 
432 #define RXD1 DIO10
433 #define TXD1 DIO11
434 
435 // SPI
436 #define SCK DIO7
437 #define MISO DIO6
438 #define MOSI DIO5
439 #define SS DIO4
440 
441 // TWI (I2C)
442 #define SCL DIO16
443 #define SDA DIO17
444 
445 // timers and PWM
446 #define OC0A DIO3
447 #define OC0B DIO4
448 #define OC1A DIO13
449 #define OC1B DIO12
450 #define OC2A DIO15
451 #define OC2B DIO14
452 
453 #define DEBUG_LED DIO0
454 /*
455 pins
456 */
457 
458 #define DIO0_PIN PINB0
459 #define DIO0_RPORT PINB
460 #define DIO0_WPORT PORTB
461 #define DIO0_DDR DDRB
462 #define DIO0_PWM NULL
463 
464 #define DIO1_PIN PINB1
465 #define DIO1_RPORT PINB
466 #define DIO1_WPORT PORTB
467 #define DIO1_DDR DDRB
468 #define DIO1_PWM NULL
469 
470 #define DIO2_PIN PINB2
471 #define DIO2_RPORT PINB
472 #define DIO2_WPORT PORTB
473 #define DIO2_DDR DDRB
474 #define DIO2_PWM NULL
475 
476 #define DIO3_PIN PINB3
477 #define DIO3_RPORT PINB
478 #define DIO3_WPORT PORTB
479 #define DIO3_DDR DDRB
480 #define DIO3_PWM OCR0A
481 
482 #define DIO4_PIN PINB4
483 #define DIO4_RPORT PINB
484 #define DIO4_WPORT PORTB
485 #define DIO4_DDR DDRB
486 #define DIO4_PWM OCR0B
487 
488 #define DIO5_PIN PINB5
489 #define DIO5_RPORT PINB
490 #define DIO5_WPORT PORTB
491 #define DIO5_DDR DDRB
492 #define DIO5_PWM NULL
493 
494 #define DIO6_PIN PINB6
495 #define DIO6_RPORT PINB
496 #define DIO6_WPORT PORTB
497 #define DIO6_DDR DDRB
498 #define DIO6_PWM NULL
499 
500 #define DIO7_PIN PINB7
501 #define DIO7_RPORT PINB
502 #define DIO7_WPORT PORTB
503 #define DIO7_DDR DDRB
504 #define DIO7_PWM NULL
505 
506 #define DIO8_PIN PIND0
507 #define DIO8_RPORT PIND
508 #define DIO8_WPORT PORTD
509 #define DIO8_DDR DDRD
510 #define DIO8_PWM NULL
511 
512 #define DIO9_PIN PIND1
513 #define DIO9_RPORT PIND
514 #define DIO9_WPORT PORTD
515 #define DIO9_DDR DDRD
516 #define DIO9_PWM NULL
517 
518 #define DIO10_PIN PIND2
519 #define DIO10_RPORT PIND
520 #define DIO10_WPORT PORTD
521 #define DIO10_DDR DDRD
522 #define DIO10_PWM NULL
523 
524 #define DIO11_PIN PIND3
525 #define DIO11_RPORT PIND
526 #define DIO11_WPORT PORTD
527 #define DIO11_DDR DDRD
528 #define DIO11_PWM NULL
529 
530 #define DIO12_PIN PIND4
531 #define DIO12_RPORT PIND
532 #define DIO12_WPORT PORTD
533 #define DIO12_DDR DDRD
534 #define DIO12_PWM OCR1B
535 
536 #define DIO13_PIN PIND5
537 #define DIO13_RPORT PIND
538 #define DIO13_WPORT PORTD
539 #define DIO13_DDR DDRD
540 #define DIO13_PWM OCR1A
541 
542 #define DIO14_PIN PIND6
543 #define DIO14_RPORT PIND
544 #define DIO14_WPORT PORTD
545 #define DIO14_DDR DDRD
546 #define DIO14_PWM OCR2B
547 
548 #define DIO15_PIN PIND7
549 #define DIO15_RPORT PIND
550 #define DIO15_WPORT PORTD
551 #define DIO15_DDR DDRD
552 #define DIO15_PWM OCR2A
553 
554 #define DIO16_PIN PINC0
555 #define DIO16_RPORT PINC
556 #define DIO16_WPORT PORTC
557 #define DIO16_DDR DDRC
558 #define DIO16_PWM NULL
559 
560 #define DIO17_PIN PINC1
561 #define DIO17_RPORT PINC
562 #define DIO17_WPORT PORTC
563 #define DIO17_DDR DDRC
564 #define DIO17_PWM NULL
565 
566 #define DIO18_PIN PINC2
567 #define DIO18_RPORT PINC
568 #define DIO18_WPORT PORTC
569 #define DIO18_DDR DDRC
570 #define DIO18_PWM NULL
571 
572 #define DIO19_PIN PINC3
573 #define DIO19_RPORT PINC
574 #define DIO19_WPORT PORTC
575 #define DIO19_DDR DDRC
576 #define DIO19_PWM NULL
577 
578 #define DIO20_PIN PINC4
579 #define DIO20_RPORT PINC
580 #define DIO20_WPORT PORTC
581 #define DIO20_DDR DDRC
582 #define DIO20_PWM NULL
583 
584 #define DIO21_PIN PINC5
585 #define DIO21_RPORT PINC
586 #define DIO21_WPORT PORTC
587 #define DIO21_DDR DDRC
588 #define DIO21_PWM NULL
589 
590 #define DIO22_PIN PINC6
591 #define DIO22_RPORT PINC
592 #define DIO22_WPORT PORTC
593 #define DIO22_DDR DDRC
594 #define DIO22_PWM NULL
595 
596 #define DIO23_PIN PINC7
597 #define DIO23_RPORT PINC
598 #define DIO23_WPORT PORTC
599 #define DIO23_DDR DDRC
600 #define DIO23_PWM NULL
601 
602 #define DIO24_PIN PINA7
603 #define DIO24_RPORT PINA
604 #define DIO24_WPORT PORTA
605 #define DIO24_DDR DDRA
606 #define DIO24_PWM NULL
607 
608 #define DIO25_PIN PINA6
609 #define DIO25_RPORT PINA
610 #define DIO25_WPORT PORTA
611 #define DIO25_DDR DDRA
612 #define DIO25_PWM NULL
613 
614 #define DIO26_PIN PINA5
615 #define DIO26_RPORT PINA
616 #define DIO26_WPORT PORTA
617 #define DIO26_DDR DDRA
618 #define DIO26_PWM NULL
619 
620 #define DIO27_PIN PINA4
621 #define DIO27_RPORT PINA
622 #define DIO27_WPORT PORTA
623 #define DIO27_DDR DDRA
624 #define DIO27_PWM NULL
625 
626 #define DIO28_PIN PINA3
627 #define DIO28_RPORT PINA
628 #define DIO28_WPORT PORTA
629 #define DIO28_DDR DDRA
630 #define DIO28_PWM NULL
631 
632 #define DIO29_PIN PINA2
633 #define DIO29_RPORT PINA
634 #define DIO29_WPORT PORTA
635 #define DIO29_DDR DDRA
636 #define DIO29_PWM NULL
637 
638 #define DIO30_PIN PINA1
639 #define DIO30_RPORT PINA
640 #define DIO30_WPORT PORTA
641 #define DIO30_DDR DDRA
642 #define DIO30_PWM NULL
643 
644 #define DIO31_PIN PINA0
645 #define DIO31_RPORT PINA
646 #define DIO31_WPORT PORTA
647 #define DIO31_DDR DDRA
648 #define DIO31_PWM NULL
649 
650 #define AIO0_PIN PINA0
651 #define AIO0_RPORT PINA
652 #define AIO0_WPORT PORTA
653 #define AIO0_DDR DDRA
654 #define AIO0_PWM NULL
655 
656 #define AIO1_PIN PINA1
657 #define AIO1_RPORT PINA
658 #define AIO1_WPORT PORTA
659 #define AIO1_DDR DDRA
660 #define AIO1_PWM NULL
661 
662 #define AIO2_PIN PINA2
663 #define AIO2_RPORT PINA
664 #define AIO2_WPORT PORTA
665 #define AIO2_DDR DDRA
666 #define AIO2_PWM NULL
667 
668 #define AIO3_PIN PINA3
669 #define AIO3_RPORT PINA
670 #define AIO3_WPORT PORTA
671 #define AIO3_DDR DDRA
672 #define AIO3_PWM NULL
673 
674 #define AIO4_PIN PINA4
675 #define AIO4_RPORT PINA
676 #define AIO4_WPORT PORTA
677 #define AIO4_DDR DDRA
678 #define AIO4_PWM NULL
679 
680 #define AIO5_PIN PINA5
681 #define AIO5_RPORT PINA
682 #define AIO5_WPORT PORTA
683 #define AIO5_DDR DDRA
684 #define AIO5_PWM NULL
685 
686 #define AIO6_PIN PINA6
687 #define AIO6_RPORT PINA
688 #define AIO6_WPORT PORTA
689 #define AIO6_DDR DDRA
690 #define AIO6_PWM NULL
691 
692 #define AIO7_PIN PINA7
693 #define AIO7_RPORT PINA
694 #define AIO7_WPORT PORTA
695 #define AIO7_DDR DDRA
696 #define AIO7_PWM NULL
697 
698 
699 
700 #undef PA0
701 #define PA0_PIN PINA0
702 #define PA0_RPORT PINA
703 #define PA0_WPORT PORTA
704 #define PA0_DDR DDRA
705 #define PA0_PWM NULL
706 
707 #undef PA1
708 #define PA1_PIN PINA1
709 #define PA1_RPORT PINA
710 #define PA1_WPORT PORTA
711 #define PA1_DDR DDRA
712 #define PA1_PWM NULL
713 
714 #undef PA2
715 #define PA2_PIN PINA2
716 #define PA2_RPORT PINA
717 #define PA2_WPORT PORTA
718 #define PA2_DDR DDRA
719 #define PA2_PWM NULL
720 
721 #undef PA3
722 #define PA3_PIN PINA3
723 #define PA3_RPORT PINA
724 #define PA3_WPORT PORTA
725 #define PA3_DDR DDRA
726 #define PA3_PWM NULL
727 
728 #undef PA4
729 #define PA4_PIN PINA4
730 #define PA4_RPORT PINA
731 #define PA4_WPORT PORTA
732 #define PA4_DDR DDRA
733 #define PA4_PWM NULL
734 
735 #undef PA5
736 #define PA5_PIN PINA5
737 #define PA5_RPORT PINA
738 #define PA5_WPORT PORTA
739 #define PA5_DDR DDRA
740 #define PA5_PWM NULL
741 
742 #undef PA6
743 #define PA6_PIN PINA6
744 #define PA6_RPORT PINA
745 #define PA6_WPORT PORTA
746 #define PA6_DDR DDRA
747 #define PA6_PWM NULL
748 
749 #undef PA7
750 #define PA7_PIN PINA7
751 #define PA7_RPORT PINA
752 #define PA7_WPORT PORTA
753 #define PA7_DDR DDRA
754 #define PA7_PWM NULL
755 
756 
757 #undef PB0
758 #define PB0_PIN PINB0
759 #define PB0_RPORT PINB
760 #define PB0_WPORT PORTB
761 #define PB0_DDR DDRB
762 #define PB0_PWM NULL
763 
764 #undef PB1
765 #define PB1_PIN PINB1
766 #define PB1_RPORT PINB
767 #define PB1_WPORT PORTB
768 #define PB1_DDR DDRB
769 #define PB1_PWM NULL
770 
771 #undef PB2
772 #define PB2_PIN PINB2
773 #define PB2_RPORT PINB
774 #define PB2_WPORT PORTB
775 #define PB2_DDR DDRB
776 #define PB2_PWM NULL
777 
778 #undef PB3
779 #define PB3_PIN PINB3
780 #define PB3_RPORT PINB
781 #define PB3_WPORT PORTB
782 #define PB3_DDR DDRB
783 #define PB3_PWM OCR0A
784 
785 #undef PB4
786 #define PB4_PIN PINB4
787 #define PB4_RPORT PINB
788 #define PB4_WPORT PORTB
789 #define PB4_DDR DDRB
790 #define PB4_PWM OCR0B
791 
792 #undef PB5
793 #define PB5_PIN PINB5
794 #define PB5_RPORT PINB
795 #define PB5_WPORT PORTB
796 #define PB5_DDR DDRB
797 #define PB5_PWM NULL
798 
799 #undef PB6
800 #define PB6_PIN PINB6
801 #define PB6_RPORT PINB
802 #define PB6_WPORT PORTB
803 #define PB6_DDR DDRB
804 #define PB6_PWM NULL
805 
806 #undef PB7
807 #define PB7_PIN PINB7
808 #define PB7_RPORT PINB
809 #define PB7_WPORT PORTB
810 #define PB7_DDR DDRB
811 #define PB7_PWM NULL
812 
813 
814 #undef PC0
815 #define PC0_PIN PINC0
816 #define PC0_RPORT PINC
817 #define PC0_WPORT PORTC
818 #define PC0_DDR DDRC
819 #define PC0_PWM NULL
820 
821 #undef PC1
822 #define PC1_PIN PINC1
823 #define PC1_RPORT PINC
824 #define PC1_WPORT PORTC
825 #define PC1_DDR DDRC
826 #define PC1_PWM NULL
827 
828 #undef PC2
829 #define PC2_PIN PINC2
830 #define PC2_RPORT PINC
831 #define PC2_WPORT PORTC
832 #define PC2_DDR DDRC
833 #define PC2_PWM NULL
834 
835 #undef PC3
836 #define PC3_PIN PINC3
837 #define PC3_RPORT PINC
838 #define PC3_WPORT PORTC
839 #define PC3_DDR DDRC
840 #define PC3_PWM NULL
841 
842 #undef PC4
843 #define PC4_PIN PINC4
844 #define PC4_RPORT PINC
845 #define PC4_WPORT PORTC
846 #define PC4_DDR DDRC
847 #define PC4_PWM NULL
848 
849 #undef PC5
850 #define PC5_PIN PINC5
851 #define PC5_RPORT PINC
852 #define PC5_WPORT PORTC
853 #define PC5_DDR DDRC
854 #define PC5_PWM NULL
855 
856 #undef PC6
857 #define PC6_PIN PINC6
858 #define PC6_RPORT PINC
859 #define PC6_WPORT PORTC
860 #define PC6_DDR DDRC
861 #define PC6_PWM NULL
862 
863 #undef PC7
864 #define PC7_PIN PINC7
865 #define PC7_RPORT PINC
866 #define PC7_WPORT PORTC
867 #define PC7_DDR DDRC
868 #define PC7_PWM NULL
869 
870 
871 #undef PD0
872 #define PD0_PIN PIND0
873 #define PD0_RPORT PIND
874 #define PD0_WPORT PORTD
875 #define PD0_DDR DDRD
876 #define PD0_PWM NULL
877 
878 #undef PD1
879 #define PD1_PIN PIND1
880 #define PD1_RPORT PIND
881 #define PD1_WPORT PORTD
882 #define PD1_DDR DDRD
883 #define PD1_PWM NULL
884 
885 #undef PD2
886 #define PD2_PIN PIND2
887 #define PD2_RPORT PIND
888 #define PD2_WPORT PORTD
889 #define PD2_DDR DDRD
890 #define PD2_PWM NULL
891 
892 #undef PD3
893 #define PD3_PIN PIND3
894 #define PD3_RPORT PIND
895 #define PD3_WPORT PORTD
896 #define PD3_DDR DDRD
897 #define PD3_PWM NULL
898 
899 #undef PD4
900 #define PD4_PIN PIND4
901 #define PD4_RPORT PIND
902 #define PD4_WPORT PORTD
903 #define PD4_DDR DDRD
904 #define PD4_PWM NULL
905 
906 #undef PD5
907 #define PD5_PIN PIND5
908 #define PD5_RPORT PIND
909 #define PD5_WPORT PORTD
910 #define PD5_DDR DDRD
911 #define PD5_PWM NULL
912 
913 #undef PD6
914 #define PD6_PIN PIND6
915 #define PD6_RPORT PIND
916 #define PD6_WPORT PORTD
917 #define PD6_DDR DDRD
918 #define PD6_PWM OCR2B
919 
920 #undef PD7
921 #define PD7_PIN PIND7
922 #define PD7_RPORT PIND
923 #define PD7_WPORT PORTD
924 #define PD7_DDR DDRD
925 #define PD7_PWM OCR2A
926 #endif /* _AVR_ATmega{644,644P,644PA}__ */
927 
928 #if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__)
929 // UART
930 #define RXD DIO0
931 #define TXD DIO1
932 
933 // SPI
934 #define SCK 52
935 #define MISO 50
936 #define MOSI 51
937 #define SS 53
938 
939 // TWI (I2C)
940 #define SCL DIO21
941 #define SDA DIO20
942 
943 // timers and PWM
944 #define OC0A DIO13
945 #define OC0B DIO4
946 #define OC1A DIO11
947 #define OC1B DIO12
948 #define OC2A DIO10
949 #define OC2B DIO9
950 #define OC3A DIO5
951 #define OC3B DIO2
952 #define OC3C DIO3
953 #define OC4A DIO6
954 #define OC4B DIO7
955 #define OC4C DIO8
956 #define OC5A DIO46
957 #define OC5B DIO45
958 #define OC5C DIO44
959 
960 // change for your board
961 #define DEBUG_LED DIO21
962 
963 /*
964 pins
965 */
966 #define DIO0_PIN PINE0
967 #define DIO0_RPORT PINE
968 #define DIO0_WPORT PORTE
969 #define DIO0_DDR DDRE
970 #define DIO0_PWM NULL
971 
972 #define DIO1_PIN PINE1
973 #define DIO1_RPORT PINE
974 #define DIO1_WPORT PORTE
975 #define DIO1_DDR DDRE
976 #define DIO1_PWM NULL
977 
978 #define DIO2_PIN PINE4
979 #define DIO2_RPORT PINE
980 #define DIO2_WPORT PORTE
981 #define DIO2_DDR DDRE
982 #define DIO2_PWM &OCR3BL
983 
984 #define DIO3_PIN PINE5
985 #define DIO3_RPORT PINE
986 #define DIO3_WPORT PORTE
987 #define DIO3_DDR DDRE
988 #define DIO3_PWM &OCR3CL
989 
990 #define DIO4_PIN PING5
991 #define DIO4_RPORT PING
992 #define DIO4_WPORT PORTG
993 #define DIO4_DDR DDRG
994 #define DIO4_PWM &OCR0B
995 
996 #define DIO5_PIN PINE3
997 #define DIO5_RPORT PINE
998 #define DIO5_WPORT PORTE
999 #define DIO5_DDR DDRE
1000 #define DIO5_PWM &OCR3AL
1001 
1002 #define DIO6_PIN PINH3
1003 #define DIO6_RPORT PINH
1004 #define DIO6_WPORT PORTH
1005 #define DIO6_DDR DDRH
1006 #define DIO6_PWM &OCR4AL
1007 
1008 #define DIO7_PIN PINH4
1009 #define DIO7_RPORT PINH
1010 #define DIO7_WPORT PORTH
1011 #define DIO7_DDR DDRH
1012 #define DIO7_PWM &OCR4BL
1013 
1014 #define DIO8_PIN PINH5
1015 #define DIO8_RPORT PINH
1016 #define DIO8_WPORT PORTH
1017 #define DIO8_DDR DDRH
1018 #define DIO8_PWM &OCR4CL
1019 
1020 #define DIO9_PIN PINH6
1021 #define DIO9_RPORT PINH
1022 #define DIO9_WPORT PORTH
1023 #define DIO9_DDR DDRH
1024 #define DIO9_PWM &OCR2B
1025 
1026 #define DIO10_PIN PINB4
1027 #define DIO10_RPORT PINB
1028 #define DIO10_WPORT PORTB
1029 #define DIO10_DDR DDRB
1030 #define DIO10_PWM &OCR2A
1031 
1032 #define DIO11_PIN PINB5
1033 #define DIO11_RPORT PINB
1034 #define DIO11_WPORT PORTB
1035 #define DIO11_DDR DDRB
1036 #define DIO11_PWM NULL
1037 
1038 #define DIO12_PIN PINB6
1039 #define DIO12_RPORT PINB
1040 #define DIO12_WPORT PORTB
1041 #define DIO12_DDR DDRB
1042 #define DIO12_PWM NULL
1043 
1044 #define DIO13_PIN PINB7
1045 #define DIO13_RPORT PINB
1046 #define DIO13_WPORT PORTB
1047 #define DIO13_DDR DDRB
1048 #define DIO13_PWM &OCR0A
1049 
1050 #define DIO14_PIN PINJ1
1051 #define DIO14_RPORT PINJ
1052 #define DIO14_WPORT PORTJ
1053 #define DIO14_DDR DDRJ
1054 #define DIO14_PWM NULL
1055 
1056 #define DIO15_PIN PINJ0
1057 #define DIO15_RPORT PINJ
1058 #define DIO15_WPORT PORTJ
1059 #define DIO15_DDR DDRJ
1060 #define DIO15_PWM NULL
1061 
1062 #define DIO16_PIN PINH1
1063 #define DIO16_RPORT PINH
1064 #define DIO16_WPORT PORTH
1065 #define DIO16_DDR DDRH
1066 #define DIO16_PWM NULL
1067 
1068 #define DIO17_PIN PINH0
1069 #define DIO17_RPORT PINH
1070 #define DIO17_WPORT PORTH
1071 #define DIO17_DDR DDRH
1072 #define DIO17_PWM NULL
1073 
1074 #define DIO18_PIN PIND3
1075 #define DIO18_RPORT PIND
1076 #define DIO18_WPORT PORTD
1077 #define DIO18_DDR DDRD
1078 #define DIO18_PWM NULL
1079 
1080 #define DIO19_PIN PIND2
1081 #define DIO19_RPORT PIND
1082 #define DIO19_WPORT PORTD
1083 #define DIO19_DDR DDRD
1084 #define DIO19_PWM NULL
1085 
1086 #define DIO20_PIN PIND1
1087 #define DIO20_RPORT PIND
1088 #define DIO20_WPORT PORTD
1089 #define DIO20_DDR DDRD
1090 #define DIO20_PWM NULL
1091 
1092 #define DIO21_PIN PIND0
1093 #define DIO21_RPORT PIND
1094 #define DIO21_WPORT PORTD
1095 #define DIO21_DDR DDRD
1096 #define DIO21_PWM NULL
1097 
1098 #define DIO22_PIN PINA0
1099 #define DIO22_RPORT PINA
1100 #define DIO22_WPORT PORTA
1101 #define DIO22_DDR DDRA
1102 #define DIO22_PWM NULL
1103 
1104 #define DIO23_PIN PINA1
1105 #define DIO23_RPORT PINA
1106 #define DIO23_WPORT PORTA
1107 #define DIO23_DDR DDRA
1108 #define DIO23_PWM NULL
1109 
1110 #define DIO24_PIN PINA2
1111 #define DIO24_RPORT PINA
1112 #define DIO24_WPORT PORTA
1113 #define DIO24_DDR DDRA
1114 #define DIO24_PWM NULL
1115 
1116 #define DIO25_PIN PINA3
1117 #define DIO25_RPORT PINA
1118 #define DIO25_WPORT PORTA
1119 #define DIO25_DDR DDRA
1120 #define DIO25_PWM NULL
1121 
1122 #define DIO26_PIN PINA4
1123 #define DIO26_RPORT PINA
1124 #define DIO26_WPORT PORTA
1125 #define DIO26_DDR DDRA
1126 #define DIO26_PWM NULL
1127 
1128 #define DIO27_PIN PINA5
1129 #define DIO27_RPORT PINA
1130 #define DIO27_WPORT PORTA
1131 #define DIO27_DDR DDRA
1132 #define DIO27_PWM NULL
1133 
1134 #define DIO28_PIN PINA6
1135 #define DIO28_RPORT PINA
1136 #define DIO28_WPORT PORTA
1137 #define DIO28_DDR DDRA
1138 #define DIO28_PWM NULL
1139 
1140 #define DIO29_PIN PINA7
1141 #define DIO29_RPORT PINA
1142 #define DIO29_WPORT PORTA
1143 #define DIO29_DDR DDRA
1144 #define DIO29_PWM NULL
1145 
1146 #define DIO30_PIN PINC7
1147 #define DIO30_RPORT PINC
1148 #define DIO30_WPORT PORTC
1149 #define DIO30_DDR DDRC
1150 #define DIO30_PWM NULL
1151 
1152 #define DIO31_PIN PINC6
1153 #define DIO31_RPORT PINC
1154 #define DIO31_WPORT PORTC
1155 #define DIO31_DDR DDRC
1156 #define DIO31_PWM NULL
1157 
1158 #define DIO32_PIN PINC5
1159 #define DIO32_RPORT PINC
1160 #define DIO32_WPORT PORTC
1161 #define DIO32_DDR DDRC
1162 #define DIO32_PWM NULL
1163 
1164 #define DIO33_PIN PINC4
1165 #define DIO33_RPORT PINC
1166 #define DIO33_WPORT PORTC
1167 #define DIO33_DDR DDRC
1168 #define DIO33_PWM NULL
1169 
1170 #define DIO34_PIN PINC3
1171 #define DIO34_RPORT PINC
1172 #define DIO34_WPORT PORTC
1173 #define DIO34_DDR DDRC
1174 #define DIO34_PWM NULL
1175 
1176 #define DIO35_PIN PINC2
1177 #define DIO35_RPORT PINC
1178 #define DIO35_WPORT PORTC
1179 #define DIO35_DDR DDRC
1180 #define DIO35_PWM NULL
1181 
1182 #define DIO36_PIN PINC1
1183 #define DIO36_RPORT PINC
1184 #define DIO36_WPORT PORTC
1185 #define DIO36_DDR DDRC
1186 #define DIO36_PWM NULL
1187 
1188 #define DIO37_PIN PINC0
1189 #define DIO37_RPORT PINC
1190 #define DIO37_WPORT PORTC
1191 #define DIO37_DDR DDRC
1192 #define DIO37_PWM NULL
1193 
1194 #define DIO38_PIN PIND7
1195 #define DIO38_RPORT PIND
1196 #define DIO38_WPORT PORTD
1197 #define DIO38_DDR DDRD
1198 #define DIO38_PWM NULL
1199 
1200 #define DIO39_PIN PING2
1201 #define DIO39_RPORT PING
1202 #define DIO39_WPORT PORTG
1203 #define DIO39_DDR DDRG
1204 #define DIO39_PWM NULL
1205 
1206 #define DIO40_PIN PING1
1207 #define DIO40_RPORT PING
1208 #define DIO40_WPORT PORTG
1209 #define DIO40_DDR DDRG
1210 #define DIO40_PWM NULL
1211 
1212 #define DIO41_PIN PING0
1213 #define DIO41_RPORT PING
1214 #define DIO41_WPORT PORTG
1215 #define DIO41_DDR DDRG
1216 #define DIO41_PWM NULL
1217 
1218 #define DIO42_PIN PINL7
1219 #define DIO42_RPORT PINL
1220 #define DIO42_WPORT PORTL
1221 #define DIO42_DDR DDRL
1222 #define DIO42_PWM NULL
1223 
1224 #define DIO43_PIN PINL6
1225 #define DIO43_RPORT PINL
1226 #define DIO43_WPORT PORTL
1227 #define DIO43_DDR DDRL
1228 #define DIO43_PWM NULL
1229 
1230 #define DIO44_PIN PINL5
1231 #define DIO44_RPORT PINL
1232 #define DIO44_WPORT PORTL
1233 #define DIO44_DDR DDRL
1234 #define DIO44_PWM &OCR5CL
1235 
1236 #define DIO45_PIN PINL4
1237 #define DIO45_RPORT PINL
1238 #define DIO45_WPORT PORTL
1239 #define DIO45_DDR DDRL
1240 #define DIO45_PWM &OCR5BL
1241 
1242 #define DIO46_PIN PINL3
1243 #define DIO46_RPORT PINL
1244 #define DIO46_WPORT PORTL
1245 #define DIO46_DDR DDRL
1246 #define DIO46_PWM &OCR5AL
1247 
1248 #define DIO47_PIN PINL2
1249 #define DIO47_RPORT PINL
1250 #define DIO47_WPORT PORTL
1251 #define DIO47_DDR DDRL
1252 #define DIO47_PWM NULL
1253 
1254 #define DIO48_PIN PINL1
1255 #define DIO48_RPORT PINL
1256 #define DIO48_WPORT PORTL
1257 #define DIO48_DDR DDRL
1258 #define DIO48_PWM NULL
1259 
1260 #define DIO49_PIN PINL0
1261 #define DIO49_RPORT PINL
1262 #define DIO49_WPORT PORTL
1263 #define DIO49_DDR DDRL
1264 #define DIO49_PWM NULL
1265 
1266 #define DIO50_PIN PINB3
1267 #define DIO50_RPORT PINB
1268 #define DIO50_WPORT PORTB
1269 #define DIO50_DDR DDRB
1270 #define DIO50_PWM NULL
1271 
1272 #define DIO51_PIN PINB2
1273 #define DIO51_RPORT PINB
1274 #define DIO51_WPORT PORTB
1275 #define DIO51_DDR DDRB
1276 #define DIO51_PWM NULL
1277 
1278 #define DIO52_PIN PINB1
1279 #define DIO52_RPORT PINB
1280 #define DIO52_WPORT PORTB
1281 #define DIO52_DDR DDRB
1282 #define DIO52_PWM NULL
1283 
1284 #define DIO53_PIN PINB0
1285 #define DIO53_RPORT PINB
1286 #define DIO53_WPORT PORTB
1287 #define DIO53_DDR DDRB
1288 #define DIO53_PWM NULL
1289 
1290 #define DIO54_PIN PINF0
1291 #define DIO54_RPORT PINF
1292 #define DIO54_WPORT PORTF
1293 #define DIO54_DDR DDRF
1294 #define DIO54_PWM NULL
1295 
1296 #define DIO55_PIN PINF1
1297 #define DIO55_RPORT PINF
1298 #define DIO55_WPORT PORTF
1299 #define DIO55_DDR DDRF
1300 #define DIO55_PWM NULL
1301 
1302 #define DIO56_PIN PINF2
1303 #define DIO56_RPORT PINF
1304 #define DIO56_WPORT PORTF
1305 #define DIO56_DDR DDRF
1306 #define DIO56_PWM NULL
1307 
1308 #define DIO57_PIN PINF3
1309 #define DIO57_RPORT PINF
1310 #define DIO57_WPORT PORTF
1311 #define DIO57_DDR DDRF
1312 #define DIO57_PWM NULL
1313 
1314 #define DIO58_PIN PINF4
1315 #define DIO58_RPORT PINF
1316 #define DIO58_WPORT PORTF
1317 #define DIO58_DDR DDRF
1318 #define DIO58_PWM NULL
1319 
1320 #define DIO59_PIN PINF5
1321 #define DIO59_RPORT PINF
1322 #define DIO59_WPORT PORTF
1323 #define DIO59_DDR DDRF
1324 #define DIO59_PWM NULL
1325 
1326 #define DIO60_PIN PINF6
1327 #define DIO60_RPORT PINF
1328 #define DIO60_WPORT PORTF
1329 #define DIO60_DDR DDRF
1330 #define DIO60_PWM NULL
1331 
1332 #define DIO61_PIN PINF7
1333 #define DIO61_RPORT PINF
1334 #define DIO61_WPORT PORTF
1335 #define DIO61_DDR DDRF
1336 #define DIO61_PWM NULL
1337 
1338 #define DIO62_PIN PINK0
1339 #define DIO62_RPORT PINK
1340 #define DIO62_WPORT PORTK
1341 #define DIO62_DDR DDRK
1342 #define DIO62_PWM NULL
1343 
1344 #define DIO63_PIN PINK1
1345 #define DIO63_RPORT PINK
1346 #define DIO63_WPORT PORTK
1347 #define DIO63_DDR DDRK
1348 #define DIO63_PWM NULL
1349 
1350 #define DIO64_PIN PINK2
1351 #define DIO64_RPORT PINK
1352 #define DIO64_WPORT PORTK
1353 #define DIO64_DDR DDRK
1354 #define DIO64_PWM NULL
1355 
1356 #define DIO65_PIN PINK3
1357 #define DIO65_RPORT PINK
1358 #define DIO65_WPORT PORTK
1359 #define DIO65_DDR DDRK
1360 #define DIO65_PWM NULL
1361 
1362 #define DIO66_PIN PINK4
1363 #define DIO66_RPORT PINK
1364 #define DIO66_WPORT PORTK
1365 #define DIO66_DDR DDRK
1366 #define DIO66_PWM NULL
1367 
1368 #define DIO67_PIN PINK5
1369 #define DIO67_RPORT PINK
1370 #define DIO67_WPORT PORTK
1371 #define DIO67_DDR DDRK
1372 #define DIO67_PWM NULL
1373 
1374 #define DIO68_PIN PINK6
1375 #define DIO68_RPORT PINK
1376 #define DIO68_WPORT PORTK
1377 #define DIO68_DDR DDRK
1378 #define DIO68_PWM NULL
1379 
1380 #define DIO69_PIN PINK7
1381 #define DIO69_RPORT PINK
1382 #define DIO69_WPORT PORTK
1383 #define DIO69_DDR DDRK
1384 #define DIO69_PWM NULL
1385 
1386 
1387 #define DIO76_PIN PINJ5
1388 #define DIO76_RPORT PINJ
1389 #define DIO76_WPORT PORTJ
1390 #define DIO76_DDR DDRJ
1391 #define DIO76_PWM NULL
1392 #define DIO77_PIN PINJ6
1393 #define DIO77_RPORT PINJ
1394 #define DIO77_WPORT PORTJ
1395 #define DIO77_DDR DDRJ
1396 #define DIO77_PWM NULL
1397 #define DIO78_PIN PINE2
1398 #define DIO78_RPORT PINE
1399 #define DIO78_WPORT PORTE
1400 #define DIO78_DDR DDRE
1401 #define DIO78_PWM NULL
1402 #define DIO79_PIN PINE6
1403 #define DIO79_RPORT PINE
1404 #define DIO79_WPORT PORTE
1405 #define DIO79_DDR DDRE
1406 #define DIO79_PWM NULL
1407 #define DIO80_PIN PINE7
1408 #define DIO80_RPORT PINE
1409 #define DIO80_WPORT PORTE
1410 #define DIO80_DDR DDRE
1411 #define DIO80_PWM NULL
1412 #define DIO81_PIN PIND4
1413 #define DIO81_RPORT PIND
1414 #define DIO81_WPORT PORTD
1415 #define DIO81_DDR DDRD
1416 #define DIO81_PWM NULL
1417 
1418 
1419 #define DIO70_PIN PING4
1420 #define DIO70_RPORT PING
1421 #define DIO70_WPORT PORTG
1422 #define DIO70_DDR DDRG
1423 #define DIO70_PWM NULL
1424 
1425 #define DIO71_PIN PING3
1426 #define DIO71_RPORT PING
1427 #define DIO71_WPORT PORTG
1428 #define DIO71_DDR DDRG
1429 #define DIO71_PWM NULL
1430 
1431 #define DIO72_PIN PINJ2
1432 #define DIO72_RPORT PINJ
1433 #define DIO72_WPORT PORTJ
1434 #define DIO72_DDR DDRJ
1435 #define DIO72_PWM NULL
1436 
1437 #define DIO73_PIN PINJ3
1438 #define DIO73_RPORT PINJ
1439 #define DIO73_WPORT PORTJ
1440 #define DIO73_DDR DDRJ
1441 #define DIO73_PWM NULL
1442 
1443 #define DIO74_PIN PINJ7
1444 #define DIO74_RPORT PINJ
1445 #define DIO74_WPORT PORTJ
1446 #define DIO74_DDR DDRJ
1447 #define DIO74_PWM NULL
1448 
1449 #define DIO75_PIN PINJ4
1450 #define DIO75_RPORT PINJ
1451 #define DIO75_WPORT PORTJ
1452 #define DIO75_DDR DDRJ
1453 #define DIO75_PWM NULL
1454 
1455 #define DIO76_PIN PINJ5
1456 #define DIO76_RPORT PINJ
1457 #define DIO76_WPORT PORTJ
1458 #define DIO76_DDR DDRJ
1459 #define DIO76_PWM NULL
1460 
1461 #define DIO77_PIN PINJ6
1462 #define DIO77_RPORT PINJ
1463 #define DIO77_WPORT PORTJ
1464 #define DIO77_DDR DDRJ
1465 #define DIO77_PWM NULL
1466 
1467 #define DIO78_PIN PINE2
1468 #define DIO78_RPORT PINE
1469 #define DIO78_WPORT PORTE
1470 #define DIO78_DDR DDRE
1471 #define DIO78_PWM NULL
1472 
1473 #define DIO79_PIN PINE6
1474 #define DIO79_RPORT PINE
1475 #define DIO79_WPORT PORTE
1476 #define DIO79_DDR DDRE
1477 #define DIO79_PWM NULL
1478 
1479 #define DIO80_PIN PINE7
1480 #define DIO80_RPORT PINE
1481 #define DIO80_WPORT PORTE
1482 #define DIO80_DDR DDRE
1483 #define DIO80_PWM NULL
1484 
1485 #define DIO81_PIN PIND4
1486 #define DIO81_RPORT PIND
1487 #define DIO81_WPORT PORTD
1488 #define DIO81_DDR DDRD
1489 #define DIO81_PWM NULL
1490 
1491 #define DIO82_PIN PIND5
1492 #define DIO82_RPORT PIND
1493 #define DIO82_WPORT PORTD
1494 #define DIO82_DDR DDRD
1495 #define DIO82_PWM NULL
1496 
1497 #define DIO83_PIN PIND6
1498 #define DIO83_RPORT PIND
1499 #define DIO83_WPORT PORTD
1500 #define DIO83_DDR DDRD
1501 #define DIO83_PWM NULL
1502 
1503 #define DIO84_PIN PINH2
1504 #define DIO84_RPORT PINH
1505 #define DIO84_WPORT PORTH
1506 #define DIO84_DDR DDRH
1507 #define DIO84_PWM NULL
1508 
1509 #define DIO85_PIN PINH7
1510 #define DIO85_RPORT PINH
1511 #define DIO85_WPORT PORTH
1512 #define DIO85_DDR DDRH
1513 #define DIO85_PWM NULL
1514 
1515 #undef PA0
1516 #define PA0_PIN PINA0
1517 #define PA0_RPORT PINA
1518 #define PA0_WPORT PORTA
1519 #define PA0_DDR DDRA
1520 #define PA0_PWM NULL
1521 #undef PA1
1522 #define PA1_PIN PINA1
1523 #define PA1_RPORT PINA
1524 #define PA1_WPORT PORTA
1525 #define PA1_DDR DDRA
1526 #define PA1_PWM NULL
1527 #undef PA2
1528 #define PA2_PIN PINA2
1529 #define PA2_RPORT PINA
1530 #define PA2_WPORT PORTA
1531 #define PA2_DDR DDRA
1532 #define PA2_PWM NULL
1533 #undef PA3
1534 #define PA3_PIN PINA3
1535 #define PA3_RPORT PINA
1536 #define PA3_WPORT PORTA
1537 #define PA3_DDR DDRA
1538 #define PA3_PWM NULL
1539 #undef PA4
1540 #define PA4_PIN PINA4
1541 #define PA4_RPORT PINA
1542 #define PA4_WPORT PORTA
1543 #define PA4_DDR DDRA
1544 #define PA4_PWM NULL
1545 #undef PA5
1546 #define PA5_PIN PINA5
1547 #define PA5_RPORT PINA
1548 #define PA5_WPORT PORTA
1549 #define PA5_DDR DDRA
1550 #define PA5_PWM NULL
1551 #undef PA6
1552 #define PA6_PIN PINA6
1553 #define PA6_RPORT PINA
1554 #define PA6_WPORT PORTA
1555 #define PA6_DDR DDRA
1556 #define PA6_PWM NULL
1557 #undef PA7
1558 #define PA7_PIN PINA7
1559 #define PA7_RPORT PINA
1560 #define PA7_WPORT PORTA
1561 #define PA7_DDR DDRA
1562 #define PA7_PWM NULL
1563 
1564 #undef PB0
1565 #define PB0_PIN PINB0
1566 #define PB0_RPORT PINB
1567 #define PB0_WPORT PORTB
1568 #define PB0_DDR DDRB
1569 #define PB0_PWM NULL
1570 #undef PB1
1571 #define PB1_PIN PINB1
1572 #define PB1_RPORT PINB
1573 #define PB1_WPORT PORTB
1574 #define PB1_DDR DDRB
1575 #define PB1_PWM NULL
1576 #undef PB2
1577 #define PB2_PIN PINB2
1578 #define PB2_RPORT PINB
1579 #define PB2_WPORT PORTB
1580 #define PB2_DDR DDRB
1581 #define PB2_PWM NULL
1582 #undef PB3
1583 #define PB3_PIN PINB3
1584 #define PB3_RPORT PINB
1585 #define PB3_WPORT PORTB
1586 #define PB3_DDR DDRB
1587 #define PB3_PWM NULL
1588 #undef PB4
1589 #define PB4_PIN PINB4
1590 #define PB4_RPORT PINB
1591 #define PB4_WPORT PORTB
1592 #define PB4_DDR DDRB
1593 #define PB4_PWM &OCR2A
1594 #undef PB5
1595 #define PB5_PIN PINB5
1596 #define PB5_RPORT PINB
1597 #define PB5_WPORT PORTB
1598 #define PB5_DDR DDRB
1599 #define PB5_PWM NULL
1600 #undef PB6
1601 #define PB6_PIN PINB6
1602 #define PB6_RPORT PINB
1603 #define PB6_WPORT PORTB
1604 #define PB6_DDR DDRB
1605 #define PB6_PWM NULL
1606 #undef PB7
1607 #define PB7_PIN PINB7
1608 #define PB7_RPORT PINB
1609 #define PB7_WPORT PORTB
1610 #define PB7_DDR DDRB
1611 #define PB7_PWM &OCR0A
1612 
1613 #undef PC0
1614 #define PC0_PIN PINC0
1615 #define PC0_RPORT PINC
1616 #define PC0_WPORT PORTC
1617 #define PC0_DDR DDRC
1618 #define PC0_PWM NULL
1619 #undef PC1
1620 #define PC1_PIN PINC1
1621 #define PC1_RPORT PINC
1622 #define PC1_WPORT PORTC
1623 #define PC1_DDR DDRC
1624 #define PC1_PWM NULL
1625 #undef PC2
1626 #define PC2_PIN PINC2
1627 #define PC2_RPORT PINC
1628 #define PC2_WPORT PORTC
1629 #define PC2_DDR DDRC
1630 #define PC2_PWM NULL
1631 #undef PC3
1632 #define PC3_PIN PINC3
1633 #define PC3_RPORT PINC
1634 #define PC3_WPORT PORTC
1635 #define PC3_DDR DDRC
1636 #define PC3_PWM NULL
1637 #undef PC4
1638 #define PC4_PIN PINC4
1639 #define PC4_RPORT PINC
1640 #define PC4_WPORT PORTC
1641 #define PC4_DDR DDRC
1642 #define PC4_PWM NULL
1643 #undef PC5
1644 #define PC5_PIN PINC5
1645 #define PC5_RPORT PINC
1646 #define PC5_WPORT PORTC
1647 #define PC5_DDR DDRC
1648 #define PC5_PWM NULL
1649 #undef PC6
1650 #define PC6_PIN PINC6
1651 #define PC6_RPORT PINC
1652 #define PC6_WPORT PORTC
1653 #define PC6_DDR DDRC
1654 #define PC6_PWM NULL
1655 #undef PC7
1656 #define PC7_PIN PINC7
1657 #define PC7_RPORT PINC
1658 #define PC7_WPORT PORTC
1659 #define PC7_DDR DDRC
1660 #define PC7_PWM NULL
1661 
1662 #undef PD0
1663 #define PD0_PIN PIND0
1664 #define PD0_RPORT PIND
1665 #define PD0_WPORT PORTD
1666 #define PD0_DDR DDRD
1667 #define PD0_PWM NULL
1668 #undef PD1
1669 #define PD1_PIN PIND1
1670 #define PD1_RPORT PIND
1671 #define PD1_WPORT PORTD
1672 #define PD1_DDR DDRD
1673 #define PD1_PWM NULL
1674 #undef PD2
1675 #define PD2_PIN PIND2
1676 #define PD2_RPORT PIND
1677 #define PD2_WPORT PORTD
1678 #define PD2_DDR DDRD
1679 #define PD2_PWM NULL
1680 #undef PD3
1681 #define PD3_PIN PIND3
1682 #define PD3_RPORT PIND
1683 #define PD3_WPORT PORTD
1684 #define PD3_DDR DDRD
1685 #define PD3_PWM NULL
1686 #undef PD4
1687 #define PD4_PIN PIND4
1688 #define PD4_RPORT PIND
1689 #define PD4_WPORT PORTD
1690 #define PD4_DDR DDRD
1691 #define PD4_PWM NULL
1692 #undef PD5
1693 #define PD5_PIN PIND5
1694 #define PD5_RPORT PIND
1695 #define PD5_WPORT PORTD
1696 #define PD5_DDR DDRD
1697 #define PD5_PWM NULL
1698 #undef PD6
1699 #define PD6_PIN PIND6
1700 #define PD6_RPORT PIND
1701 #define PD6_WPORT PORTD
1702 #define PD6_DDR DDRD
1703 #define PD6_PWM NULL
1704 #undef PD7
1705 #define PD7_PIN PIND7
1706 #define PD7_RPORT PIND
1707 #define PD7_WPORT PORTD
1708 #define PD7_DDR DDRD
1709 #define PD7_PWM NULL
1710 
1711 #undef PE0
1712 #define PE0_PIN PINE0
1713 #define PE0_RPORT PINE
1714 #define PE0_WPORT PORTE
1715 #define PE0_DDR DDRE
1716 #define PE0_PWM NULL
1717 #undef PE1
1718 #define PE1_PIN PINE1
1719 #define PE1_RPORT PINE
1720 #define PE1_WPORT PORTE
1721 #define PE1_DDR DDRE
1722 #define PE1_PWM NULL
1723 #undef PE2
1724 #define PE2_PIN PINE2
1725 #define PE2_RPORT PINE
1726 #define PE2_WPORT PORTE
1727 #define PE2_DDR DDRE
1728 #define PE2_PWM NULL
1729 #undef PE3
1730 #define PE3_PIN PINE3
1731 #define PE3_RPORT PINE
1732 #define PE3_WPORT PORTE
1733 #define PE3_DDR DDRE
1734 #define PE3_PWM &OCR3AL
1735 #undef PE4
1736 #define PE4_PIN PINE4
1737 #define PE4_RPORT PINE
1738 #define PE4_WPORT PORTE
1739 #define PE4_DDR DDRE
1740 #define PE4_PWM &OCR3BL
1741 #undef PE5
1742 #define PE5_PIN PINE5
1743 #define PE5_RPORT PINE
1744 #define PE5_WPORT PORTE
1745 #define PE5_DDR DDRE
1746 #define PE5_PWM &OCR3CL
1747 #undef PE6
1748 #define PE6_PIN PINE6
1749 #define PE6_RPORT PINE
1750 #define PE6_WPORT PORTE
1751 #define PE6_DDR DDRE
1752 #define PE6_PWM NULL
1753 #undef PE7
1754 #define PE7_PIN PINE7
1755 #define PE7_RPORT PINE
1756 #define PE7_WPORT PORTE
1757 #define PE7_DDR DDRE
1758 #define PE7_PWM NULL
1759 
1760 #undef PF0
1761 #define PF0_PIN PINF0
1762 #define PF0_RPORT PINF
1763 #define PF0_WPORT PORTF
1764 #define PF0_DDR DDRF
1765 #define PF0_PWM NULL
1766 #undef PF1
1767 #define PF1_PIN PINF1
1768 #define PF1_RPORT PINF
1769 #define PF1_WPORT PORTF
1770 #define PF1_DDR DDRF
1771 #define PF1_PWM NULL
1772 #undef PF2
1773 #define PF2_PIN PINF2
1774 #define PF2_RPORT PINF
1775 #define PF2_WPORT PORTF
1776 #define PF2_DDR DDRF
1777 #define PF2_PWM NULL
1778 #undef PF3
1779 #define PF3_PIN PINF3
1780 #define PF3_RPORT PINF
1781 #define PF3_WPORT PORTF
1782 #define PF3_DDR DDRF
1783 #define PF3_PWM NULL
1784 #undef PF4
1785 #define PF4_PIN PINF4
1786 #define PF4_RPORT PINF
1787 #define PF4_WPORT PORTF
1788 #define PF4_DDR DDRF
1789 #define PF4_PWM NULL
1790 #undef PF5
1791 #define PF5_PIN PINF5
1792 #define PF5_RPORT PINF
1793 #define PF5_WPORT PORTF
1794 #define PF5_DDR DDRF
1795 #define PF5_PWM NULL
1796 #undef PF6
1797 #define PF6_PIN PINF6
1798 #define PF6_RPORT PINF
1799 #define PF6_WPORT PORTF
1800 #define PF6_DDR DDRF
1801 #define PF6_PWM NULL
1802 #undef PF7
1803 #define PF7_PIN PINF7
1804 #define PF7_RPORT PINF
1805 #define PF7_WPORT PORTF
1806 #define PF7_DDR DDRF
1807 #define PF7_PWM NULL
1808 
1809 #undef PG0
1810 #define PG0_PIN PING0
1811 #define PG0_RPORT PING
1812 #define PG0_WPORT PORTG
1813 #define PG0_DDR DDRG
1814 #define PG0_PWM NULL
1815 #undef PG1
1816 #define PG1_PIN PING1
1817 #define PG1_RPORT PING
1818 #define PG1_WPORT PORTG
1819 #define PG1_DDR DDRG
1820 #define PG1_PWM NULL
1821 #undef PG2
1822 #define PG2_PIN PING2
1823 #define PG2_RPORT PING
1824 #define PG2_WPORT PORTG
1825 #define PG2_DDR DDRG
1826 #define PG2_PWM NULL
1827 #undef PG3
1828 #define PG3_PIN PING3
1829 #define PG3_RPORT PING
1830 #define PG3_WPORT PORTG
1831 #define PG3_DDR DDRG
1832 #define PG3_PWM NULL
1833 #undef PG4
1834 #define PG4_PIN PING4
1835 #define PG4_RPORT PING
1836 #define PG4_WPORT PORTG
1837 #define PG4_DDR DDRG
1838 #define PG4_PWM NULL
1839 #undef PG5
1840 #define PG5_PIN PING5
1841 #define PG5_RPORT PING
1842 #define PG5_WPORT PORTG
1843 #define PG5_DDR DDRG
1844 #define PG5_PWM &OCR0B
1845 #undef PG6
1846 #define PG6_PIN PING6
1847 #define PG6_RPORT PING
1848 #define PG6_WPORT PORTG
1849 #define PG6_DDR DDRG
1850 #define PG6_PWM NULL
1851 #undef PG7
1852 #define PG7_PIN PING7
1853 #define PG7_RPORT PING
1854 #define PG7_WPORT PORTG
1855 #define PG7_DDR DDRG
1856 #define PG7_PWM NULL
1857 
1858 #undef PH0
1859 #define PH0_PIN PINH0
1860 #define PH0_RPORT PINH
1861 #define PH0_WPORT PORTH
1862 #define PH0_DDR DDRH
1863 #define PH0_PWM NULL
1864 #undef PH1
1865 #define PH1_PIN PINH1
1866 #define PH1_RPORT PINH
1867 #define PH1_WPORT PORTH
1868 #define PH1_DDR DDRH
1869 #define PH1_PWM NULL
1870 #undef PH2
1871 #define PH2_PIN PINH2
1872 #define PH2_RPORT PINH
1873 #define PH2_WPORT PORTH
1874 #define PH2_DDR DDRH
1875 #define PH2_PWM NULL
1876 #undef PH3
1877 #define PH3_PIN PINH3
1878 #define PH3_RPORT PINH
1879 #define PH3_WPORT PORTH
1880 #define PH3_DDR DDRH
1881 #define PH3_PWM &OCR4AL
1882 #undef PH4
1883 #define PH4_PIN PINH4
1884 #define PH4_RPORT PINH
1885 #define PH4_WPORT PORTH
1886 #define PH4_DDR DDRH
1887 #define PH4_PWM &OCR4BL
1888 #undef PH5
1889 #define PH5_PIN PINH5
1890 #define PH5_RPORT PINH
1891 #define PH5_WPORT PORTH
1892 #define PH5_DDR DDRH
1893 #define PH5_PWM &OCR4CL
1894 #undef PH6
1895 #define PH6_PIN PINH6
1896 #define PH6_RPORT PINH
1897 #define PH6_WPORT PORTH
1898 #define PH6_DDR DDRH
1899 #define PH6_PWM &OCR2B
1900 #undef PH7
1901 #define PH7_PIN PINH7
1902 #define PH7_RPORT PINH
1903 #define PH7_WPORT PORTH
1904 #define PH7_DDR DDRH
1905 #define PH7_PWM NULL
1906 
1907 #undef PJ0
1908 #define PJ0_PIN PINJ0
1909 #define PJ0_RPORT PINJ
1910 #define PJ0_WPORT PORTJ
1911 #define PJ0_DDR DDRJ
1912 #define PJ0_PWM NULL
1913 #undef PJ1
1914 #define PJ1_PIN PINJ1
1915 #define PJ1_RPORT PINJ
1916 #define PJ1_WPORT PORTJ
1917 #define PJ1_DDR DDRJ
1918 #define PJ1_PWM NULL
1919 #undef PJ2
1920 #define PJ2_PIN PINJ2
1921 #define PJ2_RPORT PINJ
1922 #define PJ2_WPORT PORTJ
1923 #define PJ2_DDR DDRJ
1924 #define PJ2_PWM NULL
1925 #undef PJ3
1926 #define PJ3_PIN PINJ3
1927 #define PJ3_RPORT PINJ
1928 #define PJ3_WPORT PORTJ
1929 #define PJ3_DDR DDRJ
1930 #define PJ3_PWM NULL
1931 #undef PJ4
1932 #define PJ4_PIN PINJ4
1933 #define PJ4_RPORT PINJ
1934 #define PJ4_WPORT PORTJ
1935 #define PJ4_DDR DDRJ
1936 #define PJ4_PWM NULL
1937 #undef PJ5
1938 #define PJ5_PIN PINJ5
1939 #define PJ5_RPORT PINJ
1940 #define PJ5_WPORT PORTJ
1941 #define PJ5_DDR DDRJ
1942 #define PJ5_PWM NULL
1943 #undef PJ6
1944 #define PJ6_PIN PINJ6
1945 #define PJ6_RPORT PINJ
1946 #define PJ6_WPORT PORTJ
1947 #define PJ6_DDR DDRJ
1948 #define PJ6_PWM NULL
1949 #undef PJ7
1950 #define PJ7_PIN PINJ7
1951 #define PJ7_RPORT PINJ
1952 #define PJ7_WPORT PORTJ
1953 #define PJ7_DDR DDRJ
1954 #define PJ7_PWM NULL
1955 
1956 #undef PK0
1957 #define PK0_PIN PINK0
1958 #define PK0_RPORT PINK
1959 #define PK0_WPORT PORTK
1960 #define PK0_DDR DDRK
1961 #define PK0_PWM NULL
1962 #undef PK1
1963 #define PK1_PIN PINK1
1964 #define PK1_RPORT PINK
1965 #define PK1_WPORT PORTK
1966 #define PK1_DDR DDRK
1967 #define PK1_PWM NULL
1968 #undef PK2
1969 #define PK2_PIN PINK2
1970 #define PK2_RPORT PINK
1971 #define PK2_WPORT PORTK
1972 #define PK2_DDR DDRK
1973 #define PK2_PWM NULL
1974 #undef PK3
1975 #define PK3_PIN PINK3
1976 #define PK3_RPORT PINK
1977 #define PK3_WPORT PORTK
1978 #define PK3_DDR DDRK
1979 #define PK3_PWM NULL
1980 #undef PK4
1981 #define PK4_PIN PINK4
1982 #define PK4_RPORT PINK
1983 #define PK4_WPORT PORTK
1984 #define PK4_DDR DDRK
1985 #define PK4_PWM NULL
1986 #undef PK5
1987 #define PK5_PIN PINK5
1988 #define PK5_RPORT PINK
1989 #define PK5_WPORT PORTK
1990 #define PK5_DDR DDRK
1991 #define PK5_PWM NULL
1992 #undef PK6
1993 #define PK6_PIN PINK6
1994 #define PK6_RPORT PINK
1995 #define PK6_WPORT PORTK
1996 #define PK6_DDR DDRK
1997 #define PK6_PWM NULL
1998 #undef PK7
1999 #define PK7_PIN PINK7
2000 #define PK7_RPORT PINK
2001 #define PK7_WPORT PORTK
2002 #define PK7_DDR DDRK
2003 #define PK7_PWM NULL
2004 
2005 #undef PL0
2006 #define PL0_PIN PINL0
2007 #define PL0_RPORT PINL
2008 #define PL0_WPORT PORTL
2009 #define PL0_DDR DDRL
2010 #define PL0_PWM NULL
2011 #undef PL1
2012 #define PL1_PIN PINL1
2013 #define PL1_RPORT PINL
2014 #define PL1_WPORT PORTL
2015 #define PL1_DDR DDRL
2016 #define PL1_PWM NULL
2017 #undef PL2
2018 #define PL2_PIN PINL2
2019 #define PL2_RPORT PINL
2020 #define PL2_WPORT PORTL
2021 #define PL2_DDR DDRL
2022 #define PL2_PWM NULL
2023 #undef PL3
2024 #define PL3_PIN PINL3
2025 #define PL3_RPORT PINL
2026 #define PL3_WPORT PORTL
2027 #define PL3_DDR DDRL
2028 #define PL3_PWM &OCR5AL
2029 #undef PL4
2030 #define PL4_PIN PINL4
2031 #define PL4_RPORT PINL
2032 #define PL4_WPORT PORTL
2033 #define PL4_DDR DDRL
2034 #define PL4_PWM &OCR5BL
2035 #undef PL5
2036 #define PL5_PIN PINL5
2037 #define PL5_RPORT PINL
2038 #define PL5_WPORT PORTL
2039 #define PL5_DDR DDRL
2040 #define PL5_PWM &OCR5CL
2041 #undef PL6
2042 #define PL6_PIN PINL6
2043 #define PL6_RPORT PINL
2044 #define PL6_WPORT PORTL
2045 #define PL6_DDR DDRL
2046 #define PL6_PWM NULL
2047 #undef PL7
2048 #define PL7_PIN PINL7
2049 #define PL7_RPORT PINL
2050 #define PL7_WPORT PORTL
2051 #define PL7_DDR DDRL
2052 #define PL7_PWM NULL
2053 
2054 #endif
2055 
2056 #if defined (__AVR_AT90USB1287__) || defined (__AVR_AT90USB1286__) || defined (__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
2057 // SPI
2058 #define SCK DIO9
2059 #define MISO DIO11
2060 #define MOSI DIO10
2061 #define SS DIO8
2062 
2063 // change for your board
2064 #define DEBUG_LED DIO31 /* led D5 red */
2065 
2066 /*
2067 pins
2068 */
2069 
2070 //#define AT90USBxx_TEENSYPP_ASSIGNMENTS // Use Teensy++ 2.0 assignments
2071 #ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // Use traditional Marlin pin assignments
2072 
2073 #define DIO0_PIN PINA0
2074 #define DIO0_RPORT PINA
2075 #define DIO0_WPORT PORTA
2076 #define DIO0_PWM NULL
2077 #define DIO0_DDR DDRA
2078 
2079 #define DIO1_PIN PINA1
2080 #define DIO1_RPORT PINA
2081 #define DIO1_WPORT PORTA
2082 #define DIO1_PWM NULL
2083 #define DIO1_DDR DDRA
2084 
2085 #define DIO2_PIN PINA2
2086 #define DIO2_RPORT PINA
2087 #define DIO2_WPORT PORTA
2088 #define DIO2_PWM NULL
2089 #define DIO2_DDR DDRA
2090 
2091 #define DIO3_PIN PINA3
2092 #define DIO3_RPORT PINA
2093 #define DIO3_WPORT PORTA
2094 #define DIO3_PWM NULL
2095 #define DIO3_DDR DDRA
2096 
2097 #define DIO4_PIN PINA4
2098 #define DIO4_RPORT PINA
2099 #define DIO4_WPORT PORTA
2100 #define DIO4_PWM NULL
2101 #define DIO4_DDR DDRA
2102 
2103 #define DIO5_PIN PINA5
2104 #define DIO5_RPORT PINA
2105 #define DIO5_WPORT PORTA
2106 #define DIO5_PWM NULL
2107 #define DIO5_DDR DDRA
2108 
2109 #define DIO6_PIN PINA6
2110 #define DIO6_RPORT PINA
2111 #define DIO6_WPORT PORTA
2112 #define DIO6_PWM NULL
2113 #define DIO6_DDR DDRA
2114 
2115 #define DIO7_PIN PINA7
2116 #define DIO7_RPORT PINA
2117 #define DIO7_WPORT PORTA
2118 #define DIO7_PWM NULL
2119 #define DIO7_DDR DDRA
2120 
2121 #define DIO8_PIN PINB0
2122 #define DIO8_RPORT PINB
2123 #define DIO8_WPORT PORTB
2124 #define DIO8_PWM NULL
2125 #define DIO8_DDR DDRB
2126 
2127 #define DIO9_PIN PINB1
2128 #define DIO9_RPORT PINB
2129 #define DIO9_WPORT PORTB
2130 #define DIO9_PWM NULL
2131 #define DIO9_DDR DDRB
2132 
2133 #define DIO10_PIN PINB2
2134 #define DIO10_RPORT PINB
2135 #define DIO10_WPORT PORTB
2136 #define DIO10_PWM NULL
2137 #define DIO10_DDR DDRB
2138 
2139 #define DIO11_PIN PINB3
2140 #define DIO11_RPORT PINB
2141 #define DIO11_WPORT PORTB
2142 #define DIO11_PWM NULL
2143 #define DIO11_DDR DDRB
2144 
2145 #define DIO12_PIN PINB4
2146 #define DIO12_RPORT PINB
2147 #define DIO12_WPORT PORTB
2148 #define DIO12_PWM NULL
2149 #define DIO12_DDR DDRB
2150 
2151 #define DIO13_PIN PINB5
2152 #define DIO13_RPORT PINB
2153 #define DIO13_WPORT PORTB
2154 #define DIO13_PWM NULL
2155 #define DIO13_DDR DDRB
2156 
2157 #define DIO14_PIN PINB6
2158 #define DIO14_RPORT PINB
2159 #define DIO14_WPORT PORTB
2160 #define DIO14_PWM NULL
2161 #define DIO14_DDR DDRB
2162 
2163 #define DIO15_PIN PINB7
2164 #define DIO15_RPORT PINB
2165 #define DIO15_WPORT PORTB
2166 #define DIO15_PWM NULL
2167 #define DIO15_DDR DDRB
2168 
2169 #define DIO16_PIN PINC0
2170 #define DIO16_RPORT PINC
2171 #define DIO16_WPORT PORTC
2172 #define DIO16_PWM NULL
2173 #define DIO16_DDR DDRC
2174 
2175 #define DIO17_PIN PINC1
2176 #define DIO17_RPORT PINC
2177 #define DIO17_WPORT PORTC
2178 #define DIO17_PWM NULL
2179 #define DIO17_DDR DDRC
2180 
2181 #define DIO18_PIN PINC2
2182 #define DIO18_RPORT PINC
2183 #define DIO18_WPORT PORTC
2184 #define DIO18_PWM NULL
2185 #define DIO18_DDR DDRC
2186 
2187 #define DIO19_PIN PINC3
2188 #define DIO19_RPORT PINC
2189 #define DIO19_WPORT PORTC
2190 #define DIO19_PWM NULL
2191 #define DIO19_DDR DDRC
2192 
2193 #define DIO20_PIN PINC4
2194 #define DIO20_RPORT PINC
2195 #define DIO20_WPORT PORTC
2196 #define DIO20_PWM NULL
2197 #define DIO20_DDR DDRC
2198 
2199 #define DIO21_PIN PINC5
2200 #define DIO21_RPORT PINC
2201 #define DIO21_WPORT PORTC
2202 #define DIO21_PWM NULL
2203 #define DIO21_DDR DDRC
2204 
2205 #define DIO22_PIN PINC6
2206 #define DIO22_RPORT PINC
2207 #define DIO22_WPORT PORTC
2208 #define DIO22_PWM NULL
2209 #define DIO22_DDR DDRC
2210 
2211 #define DIO23_PIN PINC7
2212 #define DIO23_RPORT PINC
2213 #define DIO23_WPORT PORTC
2214 #define DIO23_PWM NULL
2215 #define DIO23_DDR DDRC
2216 
2217 #define DIO24_PIN PIND0
2218 #define DIO24_RPORT PIND
2219 #define DIO24_WPORT PORTD
2220 #define DIO24_PWM NULL
2221 #define DIO24_DDR DDRD
2222 
2223 #define DIO25_PIN PIND1
2224 #define DIO25_RPORT PIND
2225 #define DIO25_WPORT PORTD
2226 #define DIO25_PWM NULL
2227 #define DIO25_DDR DDRD
2228 
2229 #define DIO26_PIN PIND2
2230 #define DIO26_RPORT PIND
2231 #define DIO26_WPORT PORTD
2232 #define DIO26_PWM NULL
2233 #define DIO26_DDR DDRD
2234 
2235 #define DIO27_PIN PIND3
2236 #define DIO27_RPORT PIND
2237 #define DIO27_WPORT PORTD
2238 #define DIO27_PWM NULL
2239 #define DIO27_DDR DDRD
2240 
2241 #define DIO28_PIN PIND4
2242 #define DIO28_RPORT PIND
2243 #define DIO28_WPORT PORTD
2244 #define DIO28_PWM NULL
2245 #define DIO28_DDR DDRD
2246 
2247 #define DIO29_PIN PIND5
2248 #define DIO29_RPORT PIND
2249 #define DIO29_WPORT PORTD
2250 #define DIO29_PWM NULL
2251 #define DIO29_DDR DDRD
2252 
2253 #define DIO30_PIN PIND6
2254 #define DIO30_RPORT PIND
2255 #define DIO30_WPORT PORTD
2256 #define DIO30_PWM NULL
2257 #define DIO30_DDR DDRD
2258 
2259 #define DIO31_PIN PIND7
2260 #define DIO31_RPORT PIND
2261 #define DIO31_WPORT PORTD
2262 #define DIO31_PWM NULL
2263 #define DIO31_DDR DDRD
2264 
2265 
2266 #define DIO32_PIN PINE0
2267 #define DIO32_RPORT PINE
2268 #define DIO32_WPORT PORTE
2269 #define DIO32_PWM NULL
2270 #define DIO32_DDR DDRE
2271 
2272 #define DIO33_PIN PINE1
2273 #define DIO33_RPORT PINE
2274 #define DIO33_WPORT PORTE
2275 #define DIO33_PWM NULL
2276 #define DIO33_DDR DDRE
2277 
2278 #define DIO34_PIN PINE2
2279 #define DIO34_RPORT PINE
2280 #define DIO34_WPORT PORTE
2281 #define DIO34_PWM NULL
2282 #define DIO34_DDR DDRE
2283 
2284 #define DIO35_PIN PINE3
2285 #define DIO35_RPORT PINE
2286 #define DIO35_WPORT PORTE
2287 #define DIO35_PWM NULL
2288 #define DIO35_DDR DDRE
2289 
2290 #define DIO36_PIN PINE4
2291 #define DIO36_RPORT PINE
2292 #define DIO36_WPORT PORTE
2293 #define DIO36_PWM NULL
2294 #define DIO36_DDR DDRE
2295 
2296 #define DIO37_PIN PINE5
2297 #define DIO37_RPORT PINE
2298 #define DIO37_WPORT PORTE
2299 #define DIO37_PWM NULL
2300 #define DIO37_DDR DDRE
2301 
2302 #define DIO38_PIN PINE6
2303 #define DIO38_RPORT PINE
2304 #define DIO38_WPORT PORTE
2305 #define DIO38_PWM NULL
2306 #define DIO38_DDR DDRE
2307 
2308 #define DIO39_PIN PINE7
2309 #define DIO39_RPORT PINE
2310 #define DIO39_WPORT PORTE
2311 #define DIO39_PWM NULL
2312 #define DIO39_DDR DDRE
2313 
2314 #define AIO0_PIN PINF0
2315 #define AIO0_RPORT PINF
2316 #define AIO0_WPORT PORTF
2317 #define AIO0_PWM NULL
2318 #define AIO0_DDR DDRF
2319 
2320 #define AIO1_PIN PINF1
2321 #define AIO1_RPORT PINF
2322 #define AIO1_WPORT PORTF
2323 #define AIO1_PWM NULL
2324 #define AIO1_DDR DDRF
2325 
2326 #define AIO2_PIN PINF2
2327 #define AIO2_RPORT PINF
2328 #define AIO2_WPORT PORTF
2329 #define AIO2_PWM NULL
2330 #define AIO2_DDR DDRF
2331 
2332 #define AIO3_PIN PINF3
2333 #define AIO3_RPORT PINF
2334 #define AIO3_WPORT PORTF
2335 #define AIO3_PWM NULL
2336 #define AIO3_DDR DDRF
2337 
2338 #define AIO4_PIN PINF4
2339 #define AIO4_RPORT PINF
2340 #define AIO4_WPORT PORTF
2341 #define AIO4_PWM NULL
2342 #define AIO4_DDR DDRF
2343 
2344 #define AIO5_PIN PINF5
2345 #define AIO5_RPORT PINF
2346 #define AIO5_WPORT PORTF
2347 #define AIO5_PWM NULL
2348 #define AIO5_DDR DDRF
2349 
2350 #define AIO6_PIN PINF6
2351 #define AIO6_RPORT PINF
2352 #define AIO6_WPORT PORTF
2353 #define AIO6_PWM NULL
2354 #define AIO6_DDR DDRF
2355 
2356 #define AIO7_PIN PINF7
2357 #define AIO7_RPORT PINF
2358 #define AIO7_WPORT PORTF
2359 #define AIO7_PWM NULL
2360 #define AIO7_DDR DDRF
2361 
2362 #define DIO40_PIN PINF0
2363 #define DIO40_RPORT PINF
2364 #define DIO40_WPORT PORTF
2365 #define DIO40_PWM NULL
2366 #define DIO40_DDR DDRF
2367 
2368 #define DIO41_PIN PINF1
2369 #define DIO41_RPORT PINF
2370 #define DIO41_WPORT PORTF
2371 #define DIO41_PWM NULL
2372 #define DIO41_DDR DDRF
2373 
2374 #define DIO42_PIN PINF2
2375 #define DIO42_RPORT PINF
2376 #define DIO42_WPORT PORTF
2377 #define DIO42_PWM NULL
2378 #define DIO42_DDR DDRF
2379 
2380 #define DIO43_PIN PINF3
2381 #define DIO43_RPORT PINF
2382 #define DIO43_WPORT PORTF
2383 #define DIO43_PWM NULL
2384 #define DIO43_DDR DDRF
2385 
2386 #define DIO44_PIN PINF4
2387 #define DIO44_RPORT PINF
2388 #define DIO44_WPORT PORTF
2389 #define DIO44_PWM NULL
2390 #define DIO44_DDR DDRF
2391 
2392 #define DIO45_PIN PINF5
2393 #define DIO45_RPORT PINF
2394 #define DIO45_WPORT PORTF
2395 #define DIO45_PWM NULL
2396 #define DIO45_DDR DDRF
2397 
2398 #define DIO46_PIN PINF6
2399 #define DIO46_RPORT PINF
2400 #define DIO46_WPORT PORTF
2401 #define DIO46_PWM NULL
2402 #define DIO46_DDR DDRF
2403 
2404 #define DIO47_PIN PINF7
2405 #define DIO47_RPORT PINF
2406 #define DIO47_WPORT PORTF
2407 #define DIO47_PWM NULL
2408 #define DIO47_DDR DDRF
2409 
2410 
2411 
2412 #undef PA0
2413 #define PA0_PIN PINA0
2414 #define PA0_RPORT PINA
2415 #define PA0_WPORT PORTA
2416 #define PA0_PWM NULL
2417 #define PA0_DDR DDRA
2418 #undef PA1
2419 #define PA1_PIN PINA1
2420 #define PA1_RPORT PINA
2421 #define PA1_WPORT PORTA
2422 #define PA1_PWM NULL
2423 #define PA1_DDR DDRA
2424 #undef PA2
2425 #define PA2_PIN PINA2
2426 #define PA2_RPORT PINA
2427 #define PA2_WPORT PORTA
2428 #define PA2_PWM NULL
2429 #define PA2_DDR DDRA
2430 #undef PA3
2431 #define PA3_PIN PINA3
2432 #define PA3_RPORT PINA
2433 #define PA3_WPORT PORTA
2434 #define PA3_PWM NULL
2435 #define PA3_DDR DDRA
2436 #undef PA4
2437 #define PA4_PIN PINA4
2438 #define PA4_RPORT PINA
2439 #define PA4_WPORT PORTA
2440 #define PA4_PWM NULL
2441 #define PA4_DDR DDRA
2442 #undef PA5
2443 #define PA5_PIN PINA5
2444 #define PA5_RPORT PINA
2445 #define PA5_WPORT PORTA
2446 #define PA5_PWM NULL
2447 #define PA5_DDR DDRA
2448 #undef PA6
2449 #define PA6_PIN PINA6
2450 #define PA6_RPORT PINA
2451 #define PA6_WPORT PORTA
2452 #define PA6_PWM NULL
2453 #define PA6_DDR DDRA
2454 #undef PA7
2455 #define PA7_PIN PINA7
2456 #define PA7_RPORT PINA
2457 #define PA7_WPORT PORTA
2458 #define PA7_PWM NULL
2459 #define PA7_DDR DDRA
2460 
2461 #undef PB0
2462 #define PB0_PIN PINB0
2463 #define PB0_RPORT PINB
2464 #define PB0_WPORT PORTB
2465 #define PB0_PWM NULL
2466 #define PB0_DDR DDRB
2467 #undef PB1
2468 #define PB1_PIN PINB1
2469 #define PB1_RPORT PINB
2470 #define PB1_WPORT PORTB
2471 #define PB1_PWM NULL
2472 #define PB1_DDR DDRB
2473 #undef PB2
2474 #define PB2_PIN PINB2
2475 #define PB2_RPORT PINB
2476 #define PB2_WPORT PORTB
2477 #define PB2_PWM NULL
2478 #define PB2_DDR DDRB
2479 #undef PB3
2480 #define PB3_PIN PINB3
2481 #define PB3_RPORT PINB
2482 #define PB3_WPORT PORTB
2483 #define PB3_PWM NULL
2484 #define PB3_DDR DDRB
2485 #undef PB4
2486 #define PB4_PIN PINB4
2487 #define PB4_RPORT PINB
2488 #define PB4_WPORT PORTB
2489 #define PB4_PWM NULL
2490 #define PB4_DDR DDRB
2491 #undef PB5
2492 #define PB5_PIN PINB5
2493 #define PB5_RPORT PINB
2494 #define PB5_WPORT PORTB
2495 #define PB5_PWM NULL
2496 #define PB5_DDR DDRB
2497 #undef PB6
2498 #define PB6_PIN PINB6
2499 #define PB6_RPORT PINB
2500 #define PB6_WPORT PORTB
2501 #define PB6_PWM NULL
2502 #define PB6_DDR DDRB
2503 #undef PB7
2504 #define PB7_PIN PINB7
2505 #define PB7_RPORT PINB
2506 #define PB7_WPORT PORTB
2507 #define PB7_PWM NULL
2508 #define PB7_DDR DDRB
2509 
2510 #undef PC0
2511 #define PC0_PIN PINC0
2512 #define PC0_RPORT PINC
2513 #define PC0_WPORT PORTC
2514 #define PC0_PWM NULL
2515 #define PC0_DDR DDRC
2516 #undef PC1
2517 #define PC1_PIN PINC1
2518 #define PC1_RPORT PINC
2519 #define PC1_WPORT PORTC
2520 #define PC1_PWM NULL
2521 #define PC1_DDR DDRC
2522 #undef PC2
2523 #define PC2_PIN PINC2
2524 #define PC2_RPORT PINC
2525 #define PC2_WPORT PORTC
2526 #define PC2_PWM NULL
2527 #define PC2_DDR DDRC
2528 #undef PC3
2529 #define PC3_PIN PINC3
2530 #define PC3_RPORT PINC
2531 #define PC3_WPORT PORTC
2532 #define PC3_PWM NULL
2533 #define PC3_DDR DDRC
2534 #undef PC4
2535 #define PC4_PIN PINC4
2536 #define PC4_RPORT PINC
2537 #define PC4_WPORT PORTC
2538 #define PC4_PWM NULL
2539 #define PC4_DDR DDRC
2540 #undef PC5
2541 #define PC5_PIN PINC5
2542 #define PC5_RPORT PINC
2543 #define PC5_WPORT PORTC
2544 #define PC5_PWM NULL
2545 #define PC5_DDR DDRC
2546 #undef PC6
2547 #define PC6_PIN PINC6
2548 #define PC6_RPORT PINC
2549 #define PC6_WPORT PORTC
2550 #define PC6_PWM NULL
2551 #define PC6_DDR DDRC
2552 #undef PC7
2553 #define PC7_PIN PINC7
2554 #define PC7_RPORT PINC
2555 #define PC7_WPORT PORTC
2556 #define PC7_PWM NULL
2557 #define PC7_DDR DDRC
2558 
2559 #undef PD0
2560 #define PD0_PIN PIND0
2561 #define PD0_RPORT PIND
2562 #define PD0_WPORT PORTD
2563 #define PD0_PWM NULL
2564 #define PD0_DDR DDRD
2565 #undef PD1
2566 #define PD1_PIN PIND1
2567 #define PD1_RPORT PIND
2568 #define PD1_WPORT PORTD
2569 #define PD1_PWM NULL
2570 #define PD1_DDR DDRD
2571 #undef PD2
2572 #define PD2_PIN PIND2
2573 #define PD2_RPORT PIND
2574 #define PD2_WPORT PORTD
2575 #define PD2_PWM NULL
2576 #define PD2_DDR DDRD
2577 #undef PD3
2578 #define PD3_PIN PIND3
2579 #define PD3_RPORT PIND
2580 #define PD3_WPORT PORTD
2581 #define PD3_PWM NULL
2582 #define PD3_DDR DDRD
2583 #undef PD4
2584 #define PD4_PIN PIND4
2585 #define PD4_RPORT PIND
2586 #define PD4_WPORT PORTD
2587 #define PD4_PWM NULL
2588 #define PD4_DDR DDRD
2589 #undef PD5
2590 #define PD5_PIN PIND5
2591 #define PD5_RPORT PIND
2592 #define PD5_WPORT PORTD
2593 #define PD5_PWM NULL
2594 #define PD5_DDR DDRD
2595 #undef PD6
2596 #define PD6_PIN PIND6
2597 #define PD6_RPORT PIND
2598 #define PD6_WPORT PORTD
2599 #define PD6_PWM NULL
2600 #define PD6_DDR DDRD
2601 #undef PD7
2602 #define PD7_PIN PIND7
2603 #define PD7_RPORT PIND
2604 #define PD7_WPORT PORTD
2605 #define PD7_PWM NULL
2606 #define PD7_DDR DDRD
2607 
2608 #undef PE0
2609 #define PE0_PIN PINE0
2610 #define PE0_RPORT PINE
2611 #define PE0_WPORT PORTE
2612 #define PE0_PWM NULL
2613 #define PE0_DDR DDRE
2614 #undef PE1
2615 #define PE1_PIN PINE1
2616 #define PE1_RPORT PINE
2617 #define PE1_WPORT PORTE
2618 #define PE1_PWM NULL
2619 #define PE1_DDR DDRE
2620 #undef PE2
2621 #define PE2_PIN PINE2
2622 #define PE2_RPORT PINE
2623 #define PE2_WPORT PORTE
2624 #define PE2_PWM NULL
2625 #define PE2_DDR DDRE
2626 #undef PE3
2627 #define PE3_PIN PINE3
2628 #define PE3_RPORT PINE
2629 #define PE3_WPORT PORTE
2630 #define PE3_PWM NULL
2631 #define PE3_DDR DDRE
2632 #undef PE4
2633 #define PE4_PIN PINE4
2634 #define PE4_RPORT PINE
2635 #define PE4_WPORT PORTE
2636 #define PE4_PWM NULL
2637 #define PE4_DDR DDRE
2638 #undef PE5
2639 #define PE5_PIN PINE5
2640 #define PE5_RPORT PINE
2641 #define PE5_WPORT PORTE
2642 #define PE5_PWM NULL
2643 #define PE5_DDR DDRE
2644 #undef PE6
2645 #define PE6_PIN PINE6
2646 #define PE6_RPORT PINE
2647 #define PE6_WPORT PORTE
2648 #define PE6_PWM NULL
2649 #define PE6_DDR DDRE
2650 #undef PE7
2651 #define PE7_PIN PINE7
2652 #define PE7_RPORT PINE
2653 #define PE7_WPORT PORTE
2654 #define PE7_PWM NULL
2655 #define PE7_DDR DDRE
2656 
2657 #undef PF0
2658 #define PF0_PIN PINF0
2659 #define PF0_RPORT PINF
2660 #define PF0_WPORT PORTF
2661 #define PF0_PWM NULL
2662 #define PF0_DDR DDRF
2663 #undef PF1
2664 #define PF1_PIN PINF1
2665 #define PF1_RPORT PINF
2666 #define PF1_WPORT PORTF
2667 #define PF1_PWM NULL
2668 #define PF1_DDR DDRF
2669 #undef PF2
2670 #define PF2_PIN PINF2
2671 #define PF2_RPORT PINF
2672 #define PF2_WPORT PORTF
2673 #define PF2_PWM NULL
2674 #define PF2_DDR DDRF
2675 #undef PF3
2676 #define PF3_PIN PINF3
2677 #define PF3_RPORT PINF
2678 #define PF3_WPORT PORTF
2679 #define PF3_PWM NULL
2680 #define PF3_DDR DDRF
2681 #undef PF4
2682 #define PF4_PIN PINF4
2683 #define PF4_RPORT PINF
2684 #define PF4_WPORT PORTF
2685 #define PF4_PWM NULL
2686 #define PF4_DDR DDRF
2687 #undef PF5
2688 #define PF5_PIN PINF5
2689 #define PF5_RPORT PINF
2690 #define PF5_WPORT PORTF
2691 #define PF5_PWM NULL
2692 #define PF5_DDR DDRF
2693 #undef PF6
2694 #define PF6_PIN PINF6
2695 #define PF6_RPORT PINF
2696 #define PF6_WPORT PORTF
2697 #define PF6_PWM NULL
2698 #define PF6_DDR DDRF
2699 #undef PF7
2700 #define PF7_PIN PINF7
2701 #define PF7_RPORT PINF
2702 #define PF7_WPORT PORTF
2703 #define PF7_PWM NULL
2704 #define PF7_DDR DDRF
2705 
2706 #else // AT90USBxx_TEENSYPP_ASSIGNMENTS -- Use Teensyduino Teensy++2.0 assignments.
2707 
2708 /*
2709 
2710 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
2711 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
2712 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
2713 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
2714  The pins 46 and 47 are not supported by Teensyduino, but are supported below.
2715 */
2716 
2717 #define DIO0_PIN PIND0
2718 #define DIO0_RPORT PIND
2719 #define DIO0_WPORT PORTD
2720 #define DIO0_PWM NULL
2721 #define DIO0_DDR DDRD
2722 
2723 #define DIO1_PIN PIND1
2724 #define DIO1_RPORT PIND
2725 #define DIO1_WPORT PORTD
2726 #define DIO1_PWM NULL
2727 #define DIO1_DDR DDRD
2728 
2729 #define DIO2_PIN PIND2
2730 #define DIO2_RPORT PIND
2731 #define DIO2_WPORT PORTD
2732 #define DIO2_PWM NULL
2733 #define DIO2_DDR DDRD
2734 
2735 #define DIO3_PIN PIND3
2736 #define DIO3_RPORT PIND
2737 #define DIO3_WPORT PORTD
2738 #define DIO3_PWM NULL
2739 #define DIO3_DDR DDRD
2740 
2741 #define DIO4_PIN PIND4
2742 #define DIO4_RPORT PIND
2743 #define DIO4_WPORT PORTD
2744 #define DIO4_PWM NULL
2745 #define DIO4_DDR DDRD
2746 
2747 #define DIO5_PIN PIND5
2748 #define DIO5_RPORT PIND
2749 #define DIO5_WPORT PORTD
2750 #define DIO5_PWM NULL
2751 #define DIO5_DDR DDRD
2752 
2753 #define DIO6_PIN PIND6
2754 #define DIO6_RPORT PIND
2755 #define DIO6_WPORT PORTD
2756 #define DIO6_PWM NULL
2757 #define DIO6_DDR DDRD
2758 
2759 #define DIO7_PIN PIND7
2760 #define DIO7_RPORT PIND
2761 #define DIO7_WPORT PORTD
2762 #define DIO7_PWM NULL
2763 #define DIO7_DDR DDRD
2764 
2765 #define DIO8_PIN PINE0
2766 #define DIO8_RPORT PINE
2767 #define DIO8_WPORT PORTE
2768 #define DIO8_PWM NULL
2769 #define DIO8_DDR DDRE
2770 
2771 #define DIO9_PIN PINE1
2772 #define DIO9_RPORT PINE
2773 #define DIO9_WPORT PORTE
2774 #define DIO9_PWM NULL
2775 #define DIO9_DDR DDRE
2776 
2777 #define DIO10_PIN PINC0
2778 #define DIO10_RPORT PINC
2779 #define DIO10_WPORT PORTC
2780 #define DIO10_PWM NULL
2781 #define DIO10_DDR DDRC
2782 
2783 #define DIO11_PIN PINC1
2784 #define DIO11_RPORT PINC
2785 #define DIO11_WPORT PORTC
2786 #define DIO11_PWM NULL
2787 #define DIO11_DDR DDRC
2788 
2789 #define DIO12_PIN PINC2
2790 #define DIO12_RPORT PINC
2791 #define DIO12_WPORT PORTC
2792 #define DIO12_PWM NULL
2793 #define DIO12_DDR DDRC
2794 
2795 #define DIO13_PIN PINC3
2796 #define DIO13_RPORT PINC
2797 #define DIO13_WPORT PORTC
2798 #define DIO13_PWM NULL
2799 #define DIO13_DDR DDRC
2800 
2801 #define DIO14_PIN PINC4
2802 #define DIO14_RPORT PINC
2803 #define DIO14_WPORT PORTC
2804 #define DIO14_PWM NULL
2805 #define DIO14_DDR DDRC
2806 
2807 #define DIO15_PIN PINC5
2808 #define DIO15_RPORT PINC
2809 #define DIO15_WPORT PORTC
2810 #define DIO15_PWM NULL
2811 #define DIO15_DDR DDRC
2812 
2813 #define DIO16_PIN PINC6
2814 #define DIO16_RPORT PINC
2815 #define DIO16_WPORT PORTC
2816 #define DIO16_PWM NULL
2817 #define DIO16_DDR DDRC
2818 
2819 #define DIO17_PIN PINC7
2820 #define DIO17_RPORT PINC
2821 #define DIO17_WPORT PORTC
2822 #define DIO17_PWM NULL
2823 #define DIO17_DDR DDRC
2824 
2825 #define DIO18_PIN PINE6
2826 #define DIO18_RPORT PINE
2827 #define DIO18_WPORT PORTE
2828 #define DIO18_PWM NULL
2829 #define DIO18_DDR DDRE
2830 
2831 #define DIO19_PIN PINE7
2832 #define DIO19_RPORT PINE
2833 #define DIO19_WPORT PORTE
2834 #define DIO19_PWM NULL
2835 #define DIO19_DDR DDRE
2836 
2837 #define DIO20_PIN PINB0
2838 #define DIO20_RPORT PINB
2839 #define DIO20_WPORT PORTB
2840 #define DIO20_PWM NULL
2841 #define DIO20_DDR DDRB
2842 
2843 #define DIO21_PIN PINB1
2844 #define DIO21_RPORT PINB
2845 #define DIO21_WPORT PORTB
2846 #define DIO21_PWM NULL
2847 #define DIO21_DDR DDRB
2848 
2849 #define DIO22_PIN PINB2
2850 #define DIO22_RPORT PINB
2851 #define DIO22_WPORT PORTB
2852 #define DIO22_PWM NULL
2853 #define DIO22_DDR DDRB
2854 
2855 #define DIO23_PIN PINB3
2856 #define DIO23_RPORT PINB
2857 #define DIO23_WPORT PORTB
2858 #define DIO23_PWM NULL
2859 #define DIO23_DDR DDRB
2860 
2861 #define DIO24_PIN PINB4
2862 #define DIO24_RPORT PINB
2863 #define DIO24_WPORT PORTB
2864 #define DIO24_PWM NULL
2865 #define DIO24_DDR DDRB
2866 
2867 #define DIO25_PIN PINB5
2868 #define DIO25_RPORT PINB
2869 #define DIO25_WPORT PORTB
2870 #define DIO25_PWM NULL
2871 #define DIO25_DDR DDRB
2872 
2873 #define DIO26_PIN PINB6
2874 #define DIO26_RPORT PINB
2875 #define DIO26_WPORT PORTB
2876 #define DIO26_PWM NULL
2877 #define DIO26_DDR DDRB
2878 
2879 #define DIO27_PIN PINB7
2880 #define DIO27_RPORT PINB
2881 #define DIO27_WPORT PORTB
2882 #define DIO27_PWM NULL
2883 #define DIO27_DDR DDRB
2884 
2885 #define DIO28_PIN PINA0
2886 #define DIO28_RPORT PINA
2887 #define DIO28_WPORT PORTA
2888 #define DIO28_PWM NULL
2889 #define DIO28_DDR DDRA
2890 
2891 #define DIO29_PIN PINA1
2892 #define DIO29_RPORT PINA
2893 #define DIO29_WPORT PORTA
2894 #define DIO29_PWM NULL
2895 #define DIO29_DDR DDRA
2896 
2897 #define DIO30_PIN PINA2
2898 #define DIO30_RPORT PINA
2899 #define DIO30_WPORT PORTA
2900 #define DIO30_PWM NULL
2901 #define DIO30_DDR DDRA
2902 
2903 #define DIO31_PIN PINA3
2904 #define DIO31_RPORT PINA
2905 #define DIO31_WPORT PORTA
2906 #define DIO31_PWM NULL
2907 #define DIO31_DDR DDRA
2908 
2909 #define DIO32_PIN PINA4
2910 #define DIO32_RPORT PINA
2911 #define DIO32_WPORT PORTA
2912 #define DIO32_PWM NULL
2913 #define DIO32_DDR DDRA
2914 
2915 #define DIO33_PIN PINA5
2916 #define DIO33_RPORT PINA
2917 #define DIO33_WPORT PORTA
2918 #define DIO33_PWM NULL
2919 #define DIO33_DDR DDRA
2920 
2921 #define DIO34_PIN PINA6
2922 #define DIO34_RPORT PINA
2923 #define DIO34_WPORT PORTA
2924 #define DIO34_PWM NULL
2925 #define DIO34_DDR DDRA
2926 
2927 #define DIO35_PIN PINA7
2928 #define DIO35_RPORT PINA
2929 #define DIO35_WPORT PORTA
2930 #define DIO35_PWM NULL
2931 #define DIO35_DDR DDRA
2932 
2933 #define DIO36_PIN PINE4
2934 #define DIO36_RPORT PINE
2935 #define DIO36_WPORT PORTE
2936 #define DIO36_PWM NULL
2937 #define DIO36_DDR DDRE
2938 
2939 #define DIO37_PIN PINE5
2940 #define DIO37_RPORT PINE
2941 #define DIO37_WPORT PORTE
2942 #define DIO37_PWM NULL
2943 #define DIO37_DDR DDRE
2944 
2945 #define DIO38_PIN PINF0
2946 #define DIO38_RPORT PINF
2947 #define DIO38_WPORT PORTF
2948 #define DIO38_PWM NULL
2949 #define DIO38_DDR DDRF
2950 
2951 #define DIO39_PIN PINF1
2952 #define DIO39_RPORT PINF
2953 #define DIO39_WPORT PORTF
2954 #define DIO39_PWM NULL
2955 #define DIO39_DDR DDRF
2956 
2957 #define DIO40_PIN PINF2
2958 #define DIO40_RPORT PINF
2959 #define DIO40_WPORT PORTF
2960 #define DIO40_PWM NULL
2961 #define DIO40_DDR DDRF
2962 
2963 #define DIO41_PIN PINF3
2964 #define DIO41_RPORT PINF
2965 #define DIO41_WPORT PORTF
2966 #define DIO41_PWM NULL
2967 #define DIO41_DDR DDRF
2968 
2969 #define DIO42_PIN PINF4
2970 #define DIO42_RPORT PINF
2971 #define DIO42_WPORT PORTF
2972 #define DIO42_PWM NULL
2973 #define DIO42_DDR DDRF
2974 
2975 #define DIO43_PIN PINF5
2976 #define DIO43_RPORT PINF
2977 #define DIO43_WPORT PORTF
2978 #define DIO43_PWM NULL
2979 #define DIO43_DDR DDRF
2980 
2981 #define DIO44_PIN PINF6
2982 #define DIO44_RPORT PINF
2983 #define DIO44_WPORT PORTF
2984 #define DIO44_PWM NULL
2985 #define DIO44_DDR DDRF
2986 
2987 #define DIO45_PIN PINF7
2988 #define DIO45_RPORT PINF
2989 #define DIO45_WPORT PORTF
2990 #define DIO45_PWM NULL
2991 #define DIO45_DDR DDRF
2992 
2993 #define AIO0_PIN PINF0
2994 #define AIO0_RPORT PINF
2995 #define AIO0_WPORT PORTF
2996 #define AIO0_PWM NULL
2997 #define AIO0_DDR DDRF
2998 
2999 #define AIO1_PIN PINF1
3000 #define AIO1_RPORT PINF
3001 #define AIO1_WPORT PORTF
3002 #define AIO1_PWM NULL
3003 #define AIO1_DDR DDRF
3004 
3005 #define AIO2_PIN PINF2
3006 #define AIO2_RPORT PINF
3007 #define AIO2_WPORT PORTF
3008 #define AIO2_PWM NULL
3009 #define AIO2_DDR DDRF
3010 
3011 #define AIO3_PIN PINF3
3012 #define AIO3_RPORT PINF
3013 #define AIO3_WPORT PORTF
3014 #define AIO3_PWM NULL
3015 #define AIO3_DDR DDRF
3016 
3017 #define AIO4_PIN PINF4
3018 #define AIO4_RPORT PINF
3019 #define AIO4_WPORT PORTF
3020 #define AIO4_PWM NULL
3021 #define AIO4_DDR DDRF
3022 
3023 #define AIO5_PIN PINF5
3024 #define AIO5_RPORT PINF
3025 #define AIO5_WPORT PORTF
3026 #define AIO5_PWM NULL
3027 #define AIO5_DDR DDRF
3028 
3029 #define AIO6_PIN PINF6
3030 #define AIO6_RPORT PINF
3031 #define AIO6_WPORT PORTF
3032 #define AIO6_PWM NULL
3033 #define AIO6_DDR DDRF
3034 
3035 #define AIO7_PIN PINF7
3036 #define AIO7_RPORT PINF
3037 #define AIO7_WPORT PORTF
3038 #define AIO7_PWM NULL
3039 #define AIO7_DDR DDRF
3040 
3041 //-- Begin not supported by Teensyduino
3042 //-- don't use Arduino functions on these pins pinMode/digitalWrite/etc
3043 #define DIO46_PIN PINE2
3044 #define DIO46_RPORT PINE
3045 #define DIO46_WPORT PORTE
3046 #define DIO46_PWM NULL
3047 #define DIO46_DDR DDRE
3048 
3049 #define DIO47_PIN PINE3
3050 #define DIO47_RPORT PINE
3051 #define DIO47_WPORT PORTE
3052 #define DIO47_PWM NULL
3053 #define DIO47_DDR DDRE
3054 //-- end not supported by Teensyduino
3055 
3056 #undef PA0
3057 #define PA0_PIN PINA0
3058 #define PA0_RPORT PINA
3059 #define PA0_WPORT PORTA
3060 #define PA0_PWM NULL
3061 #define PA0_DDR DDRA
3062 #undef PA1
3063 #define PA1_PIN PINA1
3064 #define PA1_RPORT PINA
3065 #define PA1_WPORT PORTA
3066 #define PA1_PWM NULL
3067 #define PA1_DDR DDRA
3068 #undef PA2
3069 #define PA2_PIN PINA2
3070 #define PA2_RPORT PINA
3071 #define PA2_WPORT PORTA
3072 #define PA2_PWM NULL
3073 #define PA2_DDR DDRA
3074 #undef PA3
3075 #define PA3_PIN PINA3
3076 #define PA3_RPORT PINA
3077 #define PA3_WPORT PORTA
3078 #define PA3_PWM NULL
3079 #define PA3_DDR DDRA
3080 #undef PA4
3081 #define PA4_PIN PINA4
3082 #define PA4_RPORT PINA
3083 #define PA4_WPORT PORTA
3084 #define PA4_PWM NULL
3085 #define PA4_DDR DDRA
3086 #undef PA5
3087 #define PA5_PIN PINA5
3088 #define PA5_RPORT PINA
3089 #define PA5_WPORT PORTA
3090 #define PA5_PWM NULL
3091 #define PA5_DDR DDRA
3092 #undef PA6
3093 #define PA6_PIN PINA6
3094 #define PA6_RPORT PINA
3095 #define PA6_WPORT PORTA
3096 #define PA6_PWM NULL
3097 #define PA6_DDR DDRA
3098 #undef PA7
3099 #define PA7_PIN PINA7
3100 #define PA7_RPORT PINA
3101 #define PA7_WPORT PORTA
3102 #define PA7_PWM NULL
3103 #define PA7_DDR DDRA
3104 
3105 #undef PB0
3106 #define PB0_PIN PINB0
3107 #define PB0_RPORT PINB
3108 #define PB0_WPORT PORTB
3109 #define PB0_PWM NULL
3110 #define PB0_DDR DDRB
3111 #undef PB1
3112 #define PB1_PIN PINB1
3113 #define PB1_RPORT PINB
3114 #define PB1_WPORT PORTB
3115 #define PB1_PWM NULL
3116 #define PB1_DDR DDRB
3117 #undef PB2
3118 #define PB2_PIN PINB2
3119 #define PB2_RPORT PINB
3120 #define PB2_WPORT PORTB
3121 #define PB2_PWM NULL
3122 #define PB2_DDR DDRB
3123 #undef PB3
3124 #define PB3_PIN PINB3
3125 #define PB3_RPORT PINB
3126 #define PB3_WPORT PORTB
3127 #define PB3_PWM NULL
3128 #define PB3_DDR DDRB
3129 #undef PB4
3130 #define PB4_PIN PINB4
3131 #define PB4_RPORT PINB
3132 #define PB4_WPORT PORTB
3133 #define PB4_PWM NULL
3134 #define PB4_DDR DDRB
3135 #undef PB5
3136 #define PB5_PIN PINB5
3137 #define PB5_RPORT PINB
3138 #define PB5_WPORT PORTB
3139 #define PB5_PWM NULL
3140 #define PB5_DDR DDRB
3141 #undef PB6
3142 #define PB6_PIN PINB6
3143 #define PB6_RPORT PINB
3144 #define PB6_WPORT PORTB
3145 #define PB6_PWM NULL
3146 #define PB6_DDR DDRB
3147 #undef PB7
3148 #define PB7_PIN PINB7
3149 #define PB7_RPORT PINB
3150 #define PB7_WPORT PORTB
3151 #define PB7_PWM NULL
3152 #define PB7_DDR DDRB
3153 
3154 #undef PC0
3155 #define PC0_PIN PINC0
3156 #define PC0_RPORT PINC
3157 #define PC0_WPORT PORTC
3158 #define PC0_PWM NULL
3159 #define PC0_DDR DDRC
3160 #undef PC1
3161 #define PC1_PIN PINC1
3162 #define PC1_RPORT PINC
3163 #define PC1_WPORT PORTC
3164 #define PC1_PWM NULL
3165 #define PC1_DDR DDRC
3166 #undef PC2
3167 #define PC2_PIN PINC2
3168 #define PC2_RPORT PINC
3169 #define PC2_WPORT PORTC
3170 #define PC2_PWM NULL
3171 #define PC2_DDR DDRC
3172 #undef PC3
3173 #define PC3_PIN PINC3
3174 #define PC3_RPORT PINC
3175 #define PC3_WPORT PORTC
3176 #define PC3_PWM NULL
3177 #define PC3_DDR DDRC
3178 #undef PC4
3179 #define PC4_PIN PINC4
3180 #define PC4_RPORT PINC
3181 #define PC4_WPORT PORTC
3182 #define PC4_PWM NULL
3183 #define PC4_DDR DDRC
3184 #undef PC5
3185 #define PC5_PIN PINC5
3186 #define PC5_RPORT PINC
3187 #define PC5_WPORT PORTC
3188 #define PC5_PWM NULL
3189 #define PC5_DDR DDRC
3190 #undef PC6
3191 #define PC6_PIN PINC6
3192 #define PC6_RPORT PINC
3193 #define PC6_WPORT PORTC
3194 #define PC6_PWM NULL
3195 #define PC6_DDR DDRC
3196 #undef PC7
3197 #define PC7_PIN PINC7
3198 #define PC7_RPORT PINC
3199 #define PC7_WPORT PORTC
3200 #define PC7_PWM NULL
3201 #define PC7_DDR DDRC
3202 
3203 #undef PD0
3204 #define PD0_PIN PIND0
3205 #define PD0_RPORT PIND
3206 #define PD0_WPORT PORTD
3207 #define PD0_PWM NULL
3208 #define PD0_DDR DDRD
3209 #undef PD1
3210 #define PD1_PIN PIND1
3211 #define PD1_RPORT PIND
3212 #define PD1_WPORT PORTD
3213 #define PD1_PWM NULL
3214 #define PD1_DDR DDRD
3215 #undef PD2
3216 #define PD2_PIN PIND2
3217 #define PD2_RPORT PIND
3218 #define PD2_WPORT PORTD
3219 #define PD2_PWM NULL
3220 #define PD2_DDR DDRD
3221 #undef PD3
3222 #define PD3_PIN PIND3
3223 #define PD3_RPORT PIND
3224 #define PD3_WPORT PORTD
3225 #define PD3_PWM NULL
3226 #define PD3_DDR DDRD
3227 #undef PD4
3228 #define PD4_PIN PIND4
3229 #define PD4_RPORT PIND
3230 #define PD4_WPORT PORTD
3231 #define PD4_PWM NULL
3232 #define PD4_DDR DDRD
3233 #undef PD5
3234 #define PD5_PIN PIND5
3235 #define PD5_RPORT PIND
3236 #define PD5_WPORT PORTD
3237 #define PD5_PWM NULL
3238 #define PD5_DDR DDRD
3239 #undef PD6
3240 #define PD6_PIN PIND6
3241 #define PD6_RPORT PIND
3242 #define PD6_WPORT PORTD
3243 #define PD6_PWM NULL
3244 #define PD6_DDR DDRD
3245 #undef PD7
3246 #define PD7_PIN PIND7
3247 #define PD7_RPORT PIND
3248 #define PD7_WPORT PORTD
3249 #define PD7_PWM NULL
3250 #define PD7_DDR DDRD
3251 
3252 #undef PE0
3253 #define PE0_PIN PINE0
3254 #define PE0_RPORT PINE
3255 #define PE0_WPORT PORTE
3256 #define PE0_PWM NULL
3257 #define PE0_DDR DDRE
3258 #undef PE1
3259 #define PE1_PIN PINE1
3260 #define PE1_RPORT PINE
3261 #define PE1_WPORT PORTE
3262 #define PE1_PWM NULL
3263 #define PE1_DDR DDRE
3264 #undef PE2
3265 #define PE2_PIN PINE2
3266 #define PE2_RPORT PINE
3267 #define PE2_WPORT PORTE
3268 #define PE2_PWM NULL
3269 #define PE2_DDR DDRE
3270 #undef PE3
3271 #define PE3_PIN PINE3
3272 #define PE3_RPORT PINE
3273 #define PE3_WPORT PORTE
3274 #define PE3_PWM NULL
3275 #define PE3_DDR DDRE
3276 #undef PE4
3277 #define PE4_PIN PINE4
3278 #define PE4_RPORT PINE
3279 #define PE4_WPORT PORTE
3280 #define PE4_PWM NULL
3281 #define PE4_DDR DDRE
3282 #undef PE5
3283 #define PE5_PIN PINE5
3284 #define PE5_RPORT PINE
3285 #define PE5_WPORT PORTE
3286 #define PE5_PWM NULL
3287 #define PE5_DDR DDRE
3288 #undef PE6
3289 #define PE6_PIN PINE6
3290 #define PE6_RPORT PINE
3291 #define PE6_WPORT PORTE
3292 #define PE6_PWM NULL
3293 #define PE6_DDR DDRE
3294 #undef PE7
3295 #define PE7_PIN PINE7
3296 #define PE7_RPORT PINE
3297 #define PE7_WPORT PORTE
3298 #define PE7_PWM NULL
3299 #define PE7_DDR DDRE
3300 
3301 #undef PF0
3302 #define PF0_PIN PINF0
3303 #define PF0_RPORT PINF
3304 #define PF0_WPORT PORTF
3305 #define PF0_PWM NULL
3306 #define PF0_DDR DDRF
3307 #undef PF1
3308 #define PF1_PIN PINF1
3309 #define PF1_RPORT PINF
3310 #define PF1_WPORT PORTF
3311 #define PF1_PWM NULL
3312 #define PF1_DDR DDRF
3313 #undef PF2
3314 #define PF2_PIN PINF2
3315 #define PF2_RPORT PINF
3316 #define PF2_WPORT PORTF
3317 #define PF2_PWM NULL
3318 #define PF2_DDR DDRF
3319 #undef PF3
3320 #define PF3_PIN PINF3
3321 #define PF3_RPORT PINF
3322 #define PF3_WPORT PORTF
3323 #define PF3_PWM NULL
3324 #define PF3_DDR DDRF
3325 #undef PF4
3326 #define PF4_PIN PINF4
3327 #define PF4_RPORT PINF
3328 #define PF4_WPORT PORTF
3329 #define PF4_PWM NULL
3330 #define PF4_DDR DDRF
3331 #undef PF5
3332 #define PF5_PIN PINF5
3333 #define PF5_RPORT PINF
3334 #define PF5_WPORT PORTF
3335 #define PF5_PWM NULL
3336 #define PF5_DDR DDRF
3337 #undef PF6
3338 #define PF6_PIN PINF6
3339 #define PF6_RPORT PINF
3340 #define PF6_WPORT PORTF
3341 #define PF6_PWM NULL
3342 #define PF6_DDR DDRF
3343 #undef PF7
3344 #define PF7_PIN PINF7
3345 #define PF7_RPORT PINF
3346 #define PF7_WPORT PORTF
3347 #define PF7_PWM NULL
3348 #define PF7_DDR DDRF
3349 
3350 #endif // AT90USBxx_TEENSYPP_ASSIGNMENTS Teensyduino assignments
3351 #endif // __AVR_AT90usbxxx__
3352 
3353 
3354 #if defined (__AVR_ATmega1281__) || defined (__AVR_ATmega2561__)
3355 // UART
3356 #define RXD DIO0
3357 #define TXD DIO1
3358 
3359 // SPI
3360 #define SCK DIO10
3361 #define MISO DIO12
3362 #define MOSI DIO11
3363 #define SS DIO16
3364 
3365 // TWI (I2C)
3366 #define SCL DIO17
3367 #define SDA DIO18
3368 
3369 // timers and PWM
3370 #define OC0A DIO9
3371 #define OC0B DIO4
3372 #define OC1A DIO7
3373 #define OC1B DIO8
3374 #define OC2A DIO6
3375 #define OC3A DIO5
3376 #define OC3B DIO2
3377 #define OC3C DIO3
3378 
3379 
3380 // change for your board
3381 #define DEBUG_LED DIO46
3382 
3383 /*
3384 pins
3385 */
3386 #define DIO0_PIN PINE0
3387 #define DIO0_RPORT PINE
3388 #define DIO0_WPORT PORTE
3389 #define DIO0_DDR DDRE
3390 #define DIO0_PWM NULL
3391 
3392 #define DIO1_PIN PINE1
3393 #define DIO1_RPORT PINE
3394 #define DIO1_WPORT PORTE
3395 #define DIO1_DDR DDRE
3396 #define DIO1_PWM NULL
3397 
3398 #define DIO2_PIN PINE4
3399 #define DIO2_RPORT PINE
3400 #define DIO2_WPORT PORTE
3401 #define DIO2_DDR DDRE
3402 #define DIO2_PWM &OCR3BL
3403 
3404 #define DIO3_PIN PINE5
3405 #define DIO3_RPORT PINE
3406 #define DIO3_WPORT PORTE
3407 #define DIO3_DDR DDRE
3408 #define DIO3_PWM &OCR3CL
3409 
3410 #define DIO4_PIN PING5
3411 #define DIO4_RPORT PING
3412 #define DIO4_WPORT PORTG
3413 #define DIO4_DDR DDRG
3414 #define DIO4_PWM &OCR0B
3415 
3416 #define DIO5_PIN PINE3
3417 #define DIO5_RPORT PINE
3418 #define DIO5_WPORT PORTE
3419 #define DIO5_DDR DDRE
3420 #define DIO5_PWM &OCR3AL
3421 
3422 #define DIO6_PIN PINB4
3423 #define DIO6_RPORT PINB
3424 #define DIO6_WPORT PORTB
3425 #define DIO6_DDR DDRB
3426 #define DIO6_PWM &OCR2AL
3427 
3428 #define DIO7_PIN PINB5
3429 #define DIO7_RPORT PINB
3430 #define DIO7_WPORT PORTB
3431 #define DIO7_DDR DDRB
3432 #define DIO7_PWM &OCR1AL
3433 
3434 #define DIO8_PIN PINB6
3435 #define DIO8_RPORT PINB
3436 #define DIO8_WPORT PORTB
3437 #define DIO8_DDR DDRB
3438 #define DIO8_PWM &OCR1BL
3439 
3440 #define DIO9_PIN PINB7
3441 #define DIO9_RPORT PINB
3442 #define DIO9_WPORT PORTB
3443 #define DIO9_DDR DDRB
3444 #define DIO9_PWM &OCR0AL
3445 
3446 #define DIO10_PIN PINB1
3447 #define DIO10_RPORT PINB
3448 #define DIO10_WPORT PORTB
3449 #define DIO10_DDR DDRB
3450 #define DIO10_PWM NULL
3451 
3452 #define DIO11_PIN PINB2
3453 #define DIO11_RPORT PINB
3454 #define DIO11_WPORT PORTB
3455 #define DIO11_DDR DDRB
3456 #define DIO11_PWM NULL
3457 
3458 #define DIO12_PIN PINB3
3459 #define DIO12_RPORT PINB
3460 #define DIO12_WPORT PORTB
3461 #define DIO12_DDR DDRB
3462 #define DIO12_PWM NULL
3463 
3464 #define DIO13_PIN PINE2
3465 #define DIO13_RPORT PINE
3466 #define DIO13_WPORT PORTE
3467 #define DIO13_DDR DDRE
3468 #define DIO13_PWM NULL
3469 
3470 #define DIO14_PIN PINE6
3471 #define DIO14_RPORT PINE
3472 #define DIO14_WPORT PORTE
3473 #define DIO14_DDR DDRE
3474 #define DIO14_PWM NULL
3475 
3476 #define DIO15_PIN PINE7
3477 #define DIO15_RPORT PINE
3478 #define DIO15_WPORT PORTE
3479 #define DIO15_DDR DDRE
3480 #define DIO15_PWM NULL
3481 
3482 #define DIO16_PIN PINB0
3483 #define DIO16_RPORT PINB
3484 #define DIO16_WPORT PORTB
3485 #define DIO16_DDR DDRB
3486 #define DIO16_PWM NULL
3487 
3488 #define DIO17_PIN PIND0
3489 #define DIO17_RPORT PIND
3490 #define DIO17_WPORT PORTD
3491 #define DIO17_DDR DDRD
3492 #define DIO17_PWM NULL
3493 
3494 #define DIO18_PIN PIND1
3495 #define DIO18_RPORT PIND
3496 #define DIO18_WPORT PORTD
3497 #define DIO18_DDR DDRD
3498 #define DIO18_PWM NULL
3499 
3500 #define DIO19_PIN PIND2
3501 #define DIO19_RPORT PIND
3502 #define DIO19_WPORT PORTD
3503 #define DIO19_DDR DDRD
3504 #define DIO19_PWM NULL
3505 
3506 #define DIO20_PIN PIND3
3507 #define DIO20_RPORT PIND
3508 #define DIO20_WPORT PORTD
3509 #define DIO20_DDR DDRD
3510 #define DIO20_PWM NULL
3511 
3512 #define DIO21_PIN PIND4
3513 #define DIO21_RPORT PIND
3514 #define DIO21_WPORT PORTD
3515 #define DIO21_DDR DDRD
3516 #define DIO21_PWM NULL
3517 
3518 #define DIO22_PIN PIND5
3519 #define DIO22_RPORT PIND
3520 #define DIO22_WPORT PORTD
3521 #define DIO22_DDR DDRD
3522 #define DIO22_PWM NULL
3523 
3524 #define DIO23_PIN PIND6
3525 #define DIO23_RPORT PIND
3526 #define DIO23_WPORT PORTD
3527 #define DIO23_DDR DDRD
3528 #define DIO23_PWM NULL
3529 
3530 #define DIO24_PIN PIND7
3531 #define DIO24_RPORT PIND
3532 #define DIO24_WPORT PORTD
3533 #define DIO24_DDR DDRD
3534 #define DIO24_PWM NULL
3535 
3536 #define DIO25_PIN PING0
3537 #define DIO25_RPORT PING
3538 #define DIO25_WPORT PORTG
3539 #define DIO25_DDR DDRG
3540 #define DIO25_PWM NULL
3541 
3542 #define DIO26_PIN PING1
3543 #define DIO26_RPORT PING
3544 #define DIO26_WPORT PORTG
3545 #define DIO26_DDR DDRG
3546 #define DIO26_PWM NULL
3547 
3548 #define DIO27_PIN PING2
3549 #define DIO27_RPORT PING
3550 #define DIO27_WPORT PORTG
3551 #define DIO27_DDR DDRG
3552 #define DIO27_PWM NULL
3553 
3554 #define DIO28_PIN PING3
3555 #define DIO28_RPORT PING
3556 #define DIO28_WPORT PORTG
3557 #define DIO28_DDR DDRG
3558 #define DIO28_PWM NULL
3559 
3560 #define DIO29_PIN PING4
3561 #define DIO29_RPORT PING
3562 #define DIO29_WPORT PORTG
3563 #define DIO29_DDR DDRG
3564 #define DIO29_PWM NULL
3565 
3566 #define DIO30_PIN PINC0
3567 #define DIO30_RPORT PINC
3568 #define DIO30_WPORT PORTC
3569 #define DIO30_DDR DDRC
3570 #define DIO30_PWM NULL
3571 
3572 #define DIO31_PIN PINC1
3573 #define DIO31_RPORT PINC
3574 #define DIO31_WPORT PORTC
3575 #define DIO31_DDR DDRC
3576 #define DIO31_PWM NULL
3577 
3578 #define DIO32_PIN PINC2
3579 #define DIO32_RPORT PINC
3580 #define DIO32_WPORT PORTC
3581 #define DIO32_DDR DDRC
3582 #define DIO32_PWM NULL
3583 
3584 #define DIO33_PIN PINC3
3585 #define DIO33_RPORT PINC
3586 #define DIO33_WPORT PORTC
3587 #define DIO33_DDR DDRC
3588 #define DIO33_PWM NULL
3589 
3590 #define DIO34_PIN PINC4
3591 #define DIO34_RPORT PINC
3592 #define DIO34_WPORT PORTC
3593 #define DIO34_DDR DDRC
3594 #define DIO34_PWM NULL
3595 
3596 #define DIO35_PIN PINC5
3597 #define DIO35_RPORT PINC
3598 #define DIO35_WPORT PORTC
3599 #define DIO35_DDR DDRC
3600 #define DIO35_PWM NULL
3601 
3602 #define DIO36_PIN PINC6
3603 #define DIO36_RPORT PINC
3604 #define DIO36_WPORT PORTC
3605 #define DIO36_DDR DDRC
3606 #define DIO36_PWM NULL
3607 
3608 #define DIO37_PIN PINC7
3609 #define DIO37_RPORT PINC
3610 #define DIO37_WPORT PORTC
3611 #define DIO37_DDR DDRC
3612 #define DIO37_PWM NULL
3613 
3614 #define DIO38_PIN PINA0
3615 #define DIO38_RPORT PINA
3616 #define DIO38_WPORT PORTA
3617 #define DIO38_DDR DDRA
3618 #define DIO38_PWM NULL
3619 
3620 #define DIO39_PIN PINA1
3621 #define DIO39_RPORT PINA
3622 #define DIO39_WPORT PORTA
3623 #define DIO39_DDR DDRA
3624 #define DIO39_PWM NULL
3625 
3626 #define DIO40_PIN PINA2
3627 #define DIO40_RPORT PINA
3628 #define DIO40_WPORT PORTA
3629 #define DIO40_DDR DDRA
3630 #define DIO40_PWM NULL
3631 
3632 #define DIO41_PIN PINA3
3633 #define DIO41_RPORT PINA
3634 #define DIO41_WPORT PORTA
3635 #define DIO41_DDR DDRA
3636 #define DIO41_PWM NULL
3637 
3638 #define DIO42_PIN PINA4
3639 #define DIO42_RPORT PINA
3640 #define DIO42_WPORT PORTA
3641 #define DIO42_DDR DDRA
3642 #define DIO42_PWM NULL
3643 
3644 #define DIO43_PIN PINA5
3645 #define DIO43_RPORT PINA
3646 #define DIO43_WPORT PORTA
3647 #define DIO43_DDR DDRA
3648 #define DIO43_PWM NULL
3649 
3650 #define DIO44_PIN PINA6
3651 #define DIO44_RPORT PINA
3652 #define DIO44_WPORT PORTA
3653 #define DIO44_DDR DDRA
3654 #define DIO44_PWM NULL
3655 
3656 #define DIO45_PIN PINA7
3657 #define DIO45_RPORT PINA
3658 #define DIO45_WPORT PORTA
3659 #define DIO45_DDR DDRA
3660 #define DIO45_PWM NULL
3661 
3662 #define DIO46_PIN PINF0
3663 #define DIO46_RPORT PINF
3664 #define DIO46_WPORT PORTF
3665 #define DIO46_DDR DDRF
3666 #define DIO46_PWM NULL
3667 
3668 #define DIO47_PIN PINF1
3669 #define DIO47_RPORT PINF
3670 #define DIO47_WPORT PORTF
3671 #define DIO47_DDR DDRF
3672 #define DIO47_PWM NULL
3673 
3674 #define DIO48_PIN PINF2
3675 #define DIO48_RPORT PINF
3676 #define DIO48_WPORT PORTF
3677 #define DIO48_DDR DDRF
3678 #define DIO48_PWM NULL
3679 
3680 #define DIO49_PIN PINF3
3681 #define DIO49_RPORT PINF
3682 #define DIO49_WPORT PORTF
3683 #define DIO49_DDR DDRF
3684 #define DIO49_PWM NULL
3685 
3686 #define DIO50_PIN PINF4
3687 #define DIO50_RPORT PINF
3688 #define DIO50_WPORT PORTF
3689 #define DIO50_DDR DDRF
3690 #define DIO50_PWM NULL
3691 
3692 #define DIO51_PIN PINF5
3693 #define DIO51_RPORT PINF
3694 #define DIO51_WPORT PORTF
3695 #define DIO51_DDR DDRF
3696 #define DIO51_PWM NULL
3697 
3698 #define DIO52_PIN PINF6
3699 #define DIO52_RPORT PINF
3700 #define DIO52_WPORT PORTF
3701 #define DIO52_DDR DDRF
3702 #define DIO52_PWM NULL
3703 
3704 #define DIO53_PIN PINF7
3705 #define DIO53_RPORT PINF
3706 #define DIO53_WPORT PORTF
3707 #define DIO53_DDR DDRF
3708 #define DIO53_PWM NULL
3709 
3710 
3711 
3712 
3713 #undef PA0
3714 #define PA0_PIN PINA0
3715 #define PA0_RPORT PINA
3716 #define PA0_WPORT PORTA
3717 #define PA0_DDR DDRA
3718 #define PA0_PWM NULL
3719 #undef PA1
3720 #define PA1_PIN PINA1
3721 #define PA1_RPORT PINA
3722 #define PA1_WPORT PORTA
3723 #define PA1_DDR DDRA
3724 #define PA1_PWM NULL
3725 #undef PA2
3726 #define PA2_PIN PINA2
3727 #define PA2_RPORT PINA
3728 #define PA2_WPORT PORTA
3729 #define PA2_DDR DDRA
3730 #define PA2_PWM NULL
3731 #undef PA3
3732 #define PA3_PIN PINA3
3733 #define PA3_RPORT PINA
3734 #define PA3_WPORT PORTA
3735 #define PA3_DDR DDRA
3736 #define PA3_PWM NULL
3737 #undef PA4
3738 #define PA4_PIN PINA4
3739 #define PA4_RPORT PINA
3740 #define PA4_WPORT PORTA
3741 #define PA4_DDR DDRA
3742 #define PA4_PWM NULL
3743 #undef PA5
3744 #define PA5_PIN PINA5
3745 #define PA5_RPORT PINA
3746 #define PA5_WPORT PORTA
3747 #define PA5_DDR DDRA
3748 #define PA5_PWM NULL
3749 #undef PA6
3750 #define PA6_PIN PINA6
3751 #define PA6_RPORT PINA
3752 #define PA6_WPORT PORTA
3753 #define PA6_DDR DDRA
3754 #define PA6_PWM NULL
3755 #undef PA7
3756 #define PA7_PIN PINA7
3757 #define PA7_RPORT PINA
3758 #define PA7_WPORT PORTA
3759 #define PA7_DDR DDRA
3760 #define PA7_PWM NULL
3761 
3762 #undef PB0
3763 #define PB0_PIN PINB0
3764 #define PB0_RPORT PINB
3765 #define PB0_WPORT PORTB
3766 #define PB0_DDR DDRB
3767 #define PB0_PWM NULL
3768 #undef PB1
3769 #define PB1_PIN PINB1
3770 #define PB1_RPORT PINB
3771 #define PB1_WPORT PORTB
3772 #define PB1_DDR DDRB
3773 #define PB1_PWM NULL
3774 #undef PB2
3775 #define PB2_PIN PINB2
3776 #define PB2_RPORT PINB
3777 #define PB2_WPORT PORTB
3778 #define PB2_DDR DDRB
3779 #define PB2_PWM NULL
3780 #undef PB3
3781 #define PB3_PIN PINB3
3782 #define PB3_RPORT PINB
3783 #define PB3_WPORT PORTB
3784 #define PB3_DDR DDRB
3785 #define PB3_PWM NULL
3786 #undef PB4
3787 #define PB4_PIN PINB4
3788 #define PB4_RPORT PINB
3789 #define PB4_WPORT PORTB
3790 #define PB4_DDR DDRB
3791 #define PB4_PWM &OCR2A
3792 #undef PB5
3793 #define PB5_PIN PINB5
3794 #define PB5_RPORT PINB
3795 #define PB5_WPORT PORTB
3796 #define PB5_DDR DDRB
3797 #define PB5_PWM NULL
3798 #undef PB6
3799 #define PB6_PIN PINB6
3800 #define PB6_RPORT PINB
3801 #define PB6_WPORT PORTB
3802 #define PB6_DDR DDRB
3803 #define PB6_PWM NULL
3804 #undef PB7
3805 #define PB7_PIN PINB7
3806 #define PB7_RPORT PINB
3807 #define PB7_WPORT PORTB
3808 #define PB7_DDR DDRB
3809 #define PB7_PWM &OCR0A
3810 
3811 #undef PC0
3812 #define PC0_PIN PINC0
3813 #define PC0_RPORT PINC
3814 #define PC0_WPORT PORTC
3815 #define PC0_DDR DDRC
3816 #define PC0_PWM NULL
3817 #undef PC1
3818 #define PC1_PIN PINC1
3819 #define PC1_RPORT PINC
3820 #define PC1_WPORT PORTC
3821 #define PC1_DDR DDRC
3822 #define PC1_PWM NULL
3823 #undef PC2
3824 #define PC2_PIN PINC2
3825 #define PC2_RPORT PINC
3826 #define PC2_WPORT PORTC
3827 #define PC2_DDR DDRC
3828 #define PC2_PWM NULL
3829 #undef PC3
3830 #define PC3_PIN PINC3
3831 #define PC3_RPORT PINC
3832 #define PC3_WPORT PORTC
3833 #define PC3_DDR DDRC
3834 #define PC3_PWM NULL
3835 #undef PC4
3836 #define PC4_PIN PINC4
3837 #define PC4_RPORT PINC
3838 #define PC4_WPORT PORTC
3839 #define PC4_DDR DDRC
3840 #define PC4_PWM NULL
3841 #undef PC5
3842 #define PC5_PIN PINC5
3843 #define PC5_RPORT PINC
3844 #define PC5_WPORT PORTC
3845 #define PC5_DDR DDRC
3846 #define PC5_PWM NULL
3847 #undef PC6
3848 #define PC6_PIN PINC6
3849 #define PC6_RPORT PINC
3850 #define PC6_WPORT PORTC
3851 #define PC6_DDR DDRC
3852 #define PC6_PWM NULL
3853 #undef PC7
3854 #define PC7_PIN PINC7
3855 #define PC7_RPORT PINC
3856 #define PC7_WPORT PORTC
3857 #define PC7_DDR DDRC
3858 #define PC7_PWM NULL
3859 
3860 #undef PD0
3861 #define PD0_PIN PIND0
3862 #define PD0_RPORT PIND
3863 #define PD0_WPORT PORTD
3864 #define PD0_DDR DDRD
3865 #define PD0_PWM NULL
3866 #undef PD1
3867 #define PD1_PIN PIND1
3868 #define PD1_RPORT PIND
3869 #define PD1_WPORT PORTD
3870 #define PD1_DDR DDRD
3871 #define PD1_PWM NULL
3872 #undef PD2
3873 #define PD2_PIN PIND2
3874 #define PD2_RPORT PIND
3875 #define PD2_WPORT PORTD
3876 #define PD2_DDR DDRD
3877 #define PD2_PWM NULL
3878 #undef PD3
3879 #define PD3_PIN PIND3
3880 #define PD3_RPORT PIND
3881 #define PD3_WPORT PORTD
3882 #define PD3_DDR DDRD
3883 #define PD3_PWM NULL
3884 #undef PD4
3885 #define PD4_PIN PIND4
3886 #define PD4_RPORT PIND
3887 #define PD4_WPORT PORTD
3888 #define PD4_DDR DDRD
3889 #define PD4_PWM NULL
3890 #undef PD5
3891 #define PD5_PIN PIND5
3892 #define PD5_RPORT PIND
3893 #define PD5_WPORT PORTD
3894 #define PD5_DDR DDRD
3895 #define PD5_PWM NULL
3896 #undef PD6
3897 #define PD6_PIN PIND6
3898 #define PD6_RPORT PIND
3899 #define PD6_WPORT PORTD
3900 #define PD6_DDR DDRD
3901 #define PD6_PWM NULL
3902 #undef PD7
3903 #define PD7_PIN PIND7
3904 #define PD7_RPORT PIND
3905 #define PD7_WPORT PORTD
3906 #define PD7_DDR DDRD
3907 #define PD7_PWM NULL
3908 
3909 #undef PE0
3910 #define PE0_PIN PINE0
3911 #define PE0_RPORT PINE
3912 #define PE0_WPORT PORTE
3913 #define PE0_DDR DDRE
3914 #define PE0_PWM NULL
3915 #undef PE1
3916 #define PE1_PIN PINE1
3917 #define PE1_RPORT PINE
3918 #define PE1_WPORT PORTE
3919 #define PE1_DDR DDRE
3920 #define PE1_PWM NULL
3921 #undef PE2
3922 #define PE2_PIN PINE2
3923 #define PE2_RPORT PINE
3924 #define PE2_WPORT PORTE
3925 #define PE2_DDR DDRE
3926 #define PE2_PWM NULL
3927 #undef PE3
3928 #define PE3_PIN PINE3
3929 #define PE3_RPORT PINE
3930 #define PE3_WPORT PORTE
3931 #define PE3_DDR DDRE
3932 #define PE3_PWM &OCR3AL
3933 #undef PE4
3934 #define PE4_PIN PINE4
3935 #define PE4_RPORT PINE
3936 #define PE4_WPORT PORTE
3937 #define PE4_DDR DDRE
3938 #define PE4_PWM &OCR3BL
3939 #undef PE5
3940 #define PE5_PIN PINE5
3941 #define PE5_RPORT PINE
3942 #define PE5_WPORT PORTE
3943 #define PE5_DDR DDRE
3944 #define PE5_PWM &OCR3CL
3945 #undef PE6
3946 #define PE6_PIN PINE6
3947 #define PE6_RPORT PINE
3948 #define PE6_WPORT PORTE
3949 #define PE6_DDR DDRE
3950 #define PE6_PWM NULL
3951 #undef PE7
3952 #define PE7_PIN PINE7
3953 #define PE7_RPORT PINE
3954 #define PE7_WPORT PORTE
3955 #define PE7_DDR DDRE
3956 #define PE7_PWM NULL
3957 
3958 #undef PF0
3959 #define PF0_PIN PINF0
3960 #define PF0_RPORT PINF
3961 #define PF0_WPORT PORTF
3962 #define PF0_DDR DDRF
3963 #define PF0_PWM NULL
3964 #undef PF1
3965 #define PF1_PIN PINF1
3966 #define PF1_RPORT PINF
3967 #define PF1_WPORT PORTF
3968 #define PF1_DDR DDRF
3969 #define PF1_PWM NULL
3970 #undef PF2
3971 #define PF2_PIN PINF2
3972 #define PF2_RPORT PINF
3973 #define PF2_WPORT PORTF
3974 #define PF2_DDR DDRF
3975 #define PF2_PWM NULL
3976 #undef PF3
3977 #define PF3_PIN PINF3
3978 #define PF3_RPORT PINF
3979 #define PF3_WPORT PORTF
3980 #define PF3_DDR DDRF
3981 #define PF3_PWM NULL
3982 #undef PF4
3983 #define PF4_PIN PINF4
3984 #define PF4_RPORT PINF
3985 #define PF4_WPORT PORTF
3986 #define PF4_DDR DDRF
3987 #define PF4_PWM NULL
3988 #undef PF5
3989 #define PF5_PIN PINF5
3990 #define PF5_RPORT PINF
3991 #define PF5_WPORT PORTF
3992 #define PF5_DDR DDRF
3993 #define PF5_PWM NULL
3994 #undef PF6
3995 #define PF6_PIN PINF6
3996 #define PF6_RPORT PINF
3997 #define PF6_WPORT PORTF
3998 #define PF6_DDR DDRF
3999 #define PF6_PWM NULL
4000 #undef PF7
4001 #define PF7_PIN PINF7
4002 #define PF7_RPORT PINF
4003 #define PF7_WPORT PORTF
4004 #define PF7_DDR DDRF
4005 #define PF7_PWM NULL
4006 
4007 #undef PG0
4008 #define PG0_PIN PING0
4009 #define PG0_RPORT PING
4010 #define PG0_WPORT PORTG
4011 #define PG0_DDR DDRG
4012 #define PG0_PWM NULL
4013 #undef PG1
4014 #define PG1_PIN PING1
4015 #define PG1_RPORT PING
4016 #define PG1_WPORT PORTG
4017 #define PG1_DDR DDRG
4018 #define PG1_PWM NULL
4019 #undef PG2
4020 #define PG2_PIN PING2
4021 #define PG2_RPORT PING
4022 #define PG2_WPORT PORTG
4023 #define PG2_DDR DDRG
4024 #define PG2_PWM NULL
4025 #undef PG3
4026 #define PG3_PIN PING3
4027 #define PG3_RPORT PING
4028 #define PG3_WPORT PORTG
4029 #define PG3_DDR DDRG
4030 #define PG3_PWM NULL
4031 #undef PG4
4032 #define PG4_PIN PING4
4033 #define PG4_RPORT PING
4034 #define PG4_WPORT PORTG
4035 #define PG4_DDR DDRG
4036 #define PG4_PWM NULL
4037 #undef PG5
4038 #define PG5_PIN PING5
4039 #define PG5_RPORT PING
4040 #define PG5_WPORT PORTG
4041 #define PG5_DDR DDRG
4042 #define PG5_PWM &OCR0B
4043 
4044 
4045 #endif
4046 
4047 #ifndef DIO0_PIN
4048 #error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request
4049 #endif
4050 
4051 #endif /* _FASTIO_ARDUINO_H */