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