2 * Copyright Droids Corporation, Microb Technology, Eirbot (2009)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 /* WARNING : this file is automatically generated by scripts.
23 * You should not edit it. If you find something wrong in it,
24 * write to zer0@droids-corp.org */
27 /* prescalers timer 0 */
28 #define TIMER0_PRESCALER_DIV_0 0
29 #define TIMER0_PRESCALER_DIV_1 1
30 #define TIMER0_PRESCALER_DIV_8 2
31 #define TIMER0_PRESCALER_DIV_64 3
32 #define TIMER0_PRESCALER_DIV_256 4
33 #define TIMER0_PRESCALER_DIV_1024 5
34 #define TIMER0_PRESCALER_DIV_FALL 6
35 #define TIMER0_PRESCALER_DIV_RISE 7
37 #define TIMER0_PRESCALER_REG_0 0
38 #define TIMER0_PRESCALER_REG_1 1
39 #define TIMER0_PRESCALER_REG_2 8
40 #define TIMER0_PRESCALER_REG_3 64
41 #define TIMER0_PRESCALER_REG_4 256
42 #define TIMER0_PRESCALER_REG_5 1024
43 #define TIMER0_PRESCALER_REG_6 -1
44 #define TIMER0_PRESCALER_REG_7 -2
46 /* prescalers timer 1 */
47 #define TIMER1_PRESCALER_DIV_0 0
48 #define TIMER1_PRESCALER_DIV_1 1
49 #define TIMER1_PRESCALER_DIV_8 2
50 #define TIMER1_PRESCALER_DIV_64 3
51 #define TIMER1_PRESCALER_DIV_256 4
52 #define TIMER1_PRESCALER_DIV_1024 5
53 #define TIMER1_PRESCALER_DIV_FALL 6
54 #define TIMER1_PRESCALER_DIV_RISE 7
56 #define TIMER1_PRESCALER_REG_0 0
57 #define TIMER1_PRESCALER_REG_1 1
58 #define TIMER1_PRESCALER_REG_2 8
59 #define TIMER1_PRESCALER_REG_3 64
60 #define TIMER1_PRESCALER_REG_4 256
61 #define TIMER1_PRESCALER_REG_5 1024
62 #define TIMER1_PRESCALER_REG_6 -1
63 #define TIMER1_PRESCALER_REG_7 -2
65 /* prescalers timer 2 */
66 #define TIMER2_PRESCALER_DIV_0 0
67 #define TIMER2_PRESCALER_DIV_1 1
68 #define TIMER2_PRESCALER_DIV_8 2
69 #define TIMER2_PRESCALER_DIV_32 3
70 #define TIMER2_PRESCALER_DIV_64 4
71 #define TIMER2_PRESCALER_DIV_128 5
72 #define TIMER2_PRESCALER_DIV_256 6
73 #define TIMER2_PRESCALER_DIV_1024 7
75 #define TIMER2_PRESCALER_REG_0 0
76 #define TIMER2_PRESCALER_REG_1 1
77 #define TIMER2_PRESCALER_REG_2 8
78 #define TIMER2_PRESCALER_REG_3 32
79 #define TIMER2_PRESCALER_REG_4 64
80 #define TIMER2_PRESCALER_REG_5 128
81 #define TIMER2_PRESCALER_REG_6 256
82 #define TIMER2_PRESCALER_REG_7 1024
85 /* available timers */
86 #define TIMER0_AVAILABLE
87 #define TIMER1_AVAILABLE
88 #define TIMER1A_AVAILABLE
89 #define TIMER1B_AVAILABLE
90 #define TIMER2_AVAILABLE
92 /* overflow interrupt number */
93 #define SIG_OVERFLOW0_NUM 0
94 #define SIG_OVERFLOW1_NUM 1
95 #define SIG_OVERFLOW2_NUM 2
96 #define SIG_OVERFLOW_TOTAL_NUM 3
98 /* output compare interrupt number */
99 #define SIG_OUTPUT_COMPARE0_NUM 0
100 #define SIG_OUTPUT_COMPARE1A_NUM 1
101 #define SIG_OUTPUT_COMPARE1B_NUM 2
102 #define SIG_OUTPUT_COMPARE2_NUM 3
103 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 4
110 #define PWM_TOTAL_NUM 4
112 /* input capture interrupt number */
113 #define SIG_INPUT_CAPTURE1_NUM 0
114 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
118 #define SPDR0_REG SPDR
119 #define SPDR1_REG SPDR
120 #define SPDR2_REG SPDR
121 #define SPDR3_REG SPDR
122 #define SPDR4_REG SPDR
123 #define SPDR5_REG SPDR
124 #define SPDR6_REG SPDR
125 #define SPDR7_REG SPDR
128 #define WDP0_REG WDTCR
129 #define WDP1_REG WDTCR
130 #define WDP2_REG WDTCR
131 #define WDE_REG WDTCR
132 #define WDTOE_REG WDTCR
135 #define INT2_REG GIMSK
136 #define INT0_REG GIMSK
137 #define INT1_REG GIMSK
140 #define ICR1H0_REG ICR1H
141 #define ICR1H1_REG ICR1H
142 #define ICR1H2_REG ICR1H
143 #define ICR1H3_REG ICR1H
144 #define ICR1H4_REG ICR1H
145 #define ICR1H5_REG ICR1H
146 #define ICR1H6_REG ICR1H
147 #define ICR1H7_REG ICR1H
150 #define TXB81_REG UCSR1B
151 #define RXB81_REG UCSR1B
152 #define CHR91_REG UCSR1B
153 #define TXEN1_REG UCSR1B
154 #define RXEN1_REG UCSR1B
155 #define UDR1IE1_REG UCSR1B
156 #define TXCIE1_REG UCSR1B
157 #define RXCIE1_REG UCSR1B
160 #define MPCM1_REG UCSR1A
161 #define U2X1_REG UCSR1A
162 #define OR1_REG UCSR1A
163 #define FE1_REG UCSR1A
164 #define UDRE1_REG UCSR1A
165 #define TXC1_REG UCSR1A
166 #define RXC1_REG UCSR1A
169 #define CS00_REG TCCR0
170 #define CS01_REG TCCR0
171 #define CS02_REG TCCR0
172 #define WGM01_REG TCCR0
173 #define COM00_REG TCCR0
174 #define COM01_REG TCCR0
175 #define WGM00_REG TCCR0
176 #define FOC0_REG TCCR0
189 #define DDB0_REG DDRB
190 #define DDB1_REG DDRB
191 #define DDB2_REG DDRB
192 #define DDB3_REG DDRB
193 #define DDB4_REG DDRB
194 #define DDB5_REG DDRB
195 #define DDB6_REG DDRB
196 #define DDB7_REG DDRB
199 #define UBRR10_REG UBRR1
200 #define UBRR11_REG UBRR1
201 #define UBRR12_REG UBRR1
202 #define UBRR13_REG UBRR1
203 #define UBRR14_REG UBRR1
204 #define UBRR15_REG UBRR1
205 #define UBRR16_REG UBRR1
206 #define UBRR17_REG UBRR1
209 #define SPI2X_REG SPSR
210 #define WCOL_REG SPSR
211 #define SPIF_REG SPSR
214 #define EEDR0_REG EEDR
215 #define EEDR1_REG EEDR
216 #define EEDR2_REG EEDR
217 #define EEDR3_REG EEDR
218 #define EEDR4_REG EEDR
219 #define EEDR5_REG EEDR
220 #define EEDR6_REG EEDR
221 #define EEDR7_REG EEDR
224 #define DDC0_REG DDRC
225 #define DDC1_REG DDRC
226 #define DDC2_REG DDRC
227 #define DDC3_REG DDRC
228 #define DDC4_REG DDRC
229 #define DDC5_REG DDRC
230 #define DDC6_REG DDRC
231 #define DDC7_REG DDRC
234 #define DDA0_REG DDRA
235 #define DDA1_REG DDRA
236 #define DDA2_REG DDRA
237 #define DDA3_REG DDRA
238 #define DDA4_REG DDRA
239 #define DDA5_REG DDRA
240 #define DDA6_REG DDRA
241 #define DDA7_REG DDRA
244 #define WGM10_REG TCCR1A
245 #define WGM11_REG TCCR1A
246 #define FOC1B_REG TCCR1A
247 #define FOC1A_REG TCCR1A
248 #define COM1B0_REG TCCR1A
249 #define COM1B1_REG TCCR1A
250 #define COM1A0_REG TCCR1A
251 #define COM1A1_REG TCCR1A
254 #define DDD0_REG DDRD
255 #define DDD1_REG DDRD
256 #define DDD2_REG DDRD
257 #define DDD3_REG DDRD
258 #define DDD4_REG DDRD
259 #define DDD5_REG DDRD
260 #define DDD6_REG DDRD
261 #define DDD7_REG DDRD
264 #define CS10_REG TCCR1B
265 #define CS11_REG TCCR1B
266 #define CS12_REG TCCR1B
267 #define CTC1_REG TCCR1B
268 #define ICES1_REG TCCR1B
269 #define ICNC1_REG TCCR1B
272 #define INTF2_REG GIFR
273 #define INTF0_REG GIFR
274 #define INTF1_REG GIFR
277 #define OCIE0_REG TIMSK
278 #define TOIE0_REG TIMSK
279 #define OCIE2_REG TIMSK
280 #define TOIE2_REG TIMSK
281 #define TICIE1_REG TIMSK
282 #define OCIE1B_REG TIMSK
283 #define OCIE1A_REG TIMSK
284 #define TOIE1_REG TIMSK
287 #define ICR1L0_REG ICR1L
288 #define ICR1L1_REG ICR1L
289 #define ICR1L2_REG ICR1L
290 #define ICR1L3_REG ICR1L
291 #define ICR1L4_REG ICR1L
292 #define ICR1L5_REG ICR1L
293 #define ICR1L6_REG ICR1L
294 #define ICR1L7_REG ICR1L
297 #define PSR10_REG SFIOR
298 #define PSR2_REG SFIOR
301 #define UDR00_REG UDR0
302 #define UDR01_REG UDR0
303 #define UDR02_REG UDR0
304 #define UDR03_REG UDR0
305 #define UDR04_REG UDR0
306 #define UDR05_REG UDR0
307 #define UDR06_REG UDR0
308 #define UDR07_REG UDR0
321 #define OCR1BL0_REG OCR1BL
322 #define OCR1BL1_REG OCR1BL
323 #define OCR1BL2_REG OCR1BL
324 #define OCR1BL3_REG OCR1BL
325 #define OCR1BL4_REG OCR1BL
326 #define OCR1BL5_REG OCR1BL
327 #define OCR1BL6_REG OCR1BL
328 #define OCR1BL7_REG OCR1BL
331 #define UBRRHI00_REG UBRRHI
332 #define UBRRHI01_REG UBRRHI
333 #define UBRRHI02_REG UBRRHI
334 #define UBRRHI03_REG UBRRHI
335 #define UBRRHI10_REG UBRRHI
336 #define UBRRHI11_REG UBRRHI
337 #define UBRRHI12_REG UBRRHI
338 #define UBRRHI13_REG UBRRHI
341 #define ISC2_REG EMCUCR
342 #define SRW11_REG EMCUCR
343 #define SRW00_REG EMCUCR
344 #define SRW01_REG EMCUCR
345 #define SRL0_REG EMCUCR
346 #define SRL1_REG EMCUCR
347 #define SRL2_REG EMCUCR
348 #define SM0_REG EMCUCR
361 #define OCR1BH0_REG OCR1BH
362 #define OCR1BH1_REG OCR1BH
363 #define OCR1BH2_REG OCR1BH
364 #define OCR1BH3_REG OCR1BH
365 #define OCR1BH4_REG OCR1BH
366 #define OCR1BH5_REG OCR1BH
367 #define OCR1BH6_REG OCR1BH
368 #define OCR1BH7_REG OCR1BH
371 #define PIND0_REG PIND
372 #define PIND1_REG PIND
373 #define PIND2_REG PIND
374 #define PIND3_REG PIND
375 #define PIND4_REG PIND
376 #define PIND5_REG PIND
377 #define PIND6_REG PIND
378 #define PIND7_REG PIND
381 #define SPMEN_REG SPMCR
382 #define PGERS_REG SPMCR
383 #define PGWRT_REG SPMCR
384 #define BLBSET_REG SPMCR
387 #define DDE0_REG DDRE
388 #define DDE1_REG DDRE
389 #define DDE2_REG DDRE
392 #define PORF_REG MCUSR
393 #define EXTRF_REG MCUSR
394 #define BORF_REG MCUSR
395 #define WDRF_REG MCUSR
398 #define ACIS0_REG ACSR
399 #define ACIS1_REG ACSR
400 #define ACIC_REG ACSR
401 #define ACIE_REG ACSR
404 #define AINBG_REG ACSR
408 #define EERE_REG EECR
409 #define EEWE_REG EECR
410 #define EEMWE_REG EECR
411 #define EERIE_REG EECR
414 #define UBRR00_REG UBRR0
415 #define UBRR01_REG UBRR0
416 #define UBRR02_REG UBRR0
417 #define UBRR03_REG UBRR0
418 #define UBRR04_REG UBRR0
419 #define UBRR05_REG UBRR0
420 #define UBRR06_REG UBRR0
421 #define UBRR07_REG UBRR0
424 #define PORTE0_REG PORTE
425 #define PORTE1_REG PORTE
426 #define PORTE2_REG PORTE
429 #define TCNT1L0_REG TCNT1L
430 #define TCNT1L1_REG TCNT1L
431 #define TCNT1L2_REG TCNT1L
432 #define TCNT1L3_REG TCNT1L
433 #define TCNT1L4_REG TCNT1L
434 #define TCNT1L5_REG TCNT1L
435 #define TCNT1L6_REG TCNT1L
436 #define TCNT1L7_REG TCNT1L
439 #define PORTB0_REG PORTB
440 #define PORTB1_REG PORTB
441 #define PORTB2_REG PORTB
442 #define PORTB3_REG PORTB
443 #define PORTB4_REG PORTB
444 #define PORTB5_REG PORTB
445 #define PORTB6_REG PORTB
446 #define PORTB7_REG PORTB
449 #define PORTD0_REG PORTD
450 #define PORTD1_REG PORTD
451 #define PORTD2_REG PORTD
452 #define PORTD3_REG PORTD
453 #define PORTD4_REG PORTD
454 #define PORTD5_REG PORTD
455 #define PORTD6_REG PORTD
456 #define PORTD7_REG PORTD
459 #define TXB80_REG UCSR0B
460 #define RXB80_REG UCSR0B
461 #define CHR90_REG UCSR0B
462 #define TXEN0_REG UCSR0B
463 #define RXEN0_REG UCSR0B
464 #define UDR0IE0_REG UCSR0B
465 #define TXCIE0_REG UCSR0B
466 #define RXCIE0_REG UCSR0B
469 #define TCNT1H0_REG TCNT1H
470 #define TCNT1H1_REG TCNT1H
471 #define TCNT1H2_REG TCNT1H
472 #define TCNT1H3_REG TCNT1H
473 #define TCNT1H4_REG TCNT1H
474 #define TCNT1H5_REG TCNT1H
475 #define TCNT1H6_REG TCNT1H
476 #define TCNT1H7_REG TCNT1H
479 #define PORTC0_REG PORTC
480 #define PORTC1_REG PORTC
481 #define PORTC2_REG PORTC
482 #define PORTC3_REG PORTC
483 #define PORTC4_REG PORTC
484 #define PORTC5_REG PORTC
485 #define PORTC6_REG PORTC
486 #define PORTC7_REG PORTC
489 #define PORTA0_REG PORTA
490 #define PORTA1_REG PORTA
491 #define PORTA2_REG PORTA
492 #define PORTA3_REG PORTA
493 #define PORTA4_REG PORTA
494 #define PORTA5_REG PORTA
495 #define PORTA6_REG PORTA
496 #define PORTA7_REG PORTA
499 #define TCNT2_0_REG TCNT2
500 #define TCNT2_1_REG TCNT2
501 #define TCNT2_2_REG TCNT2
502 #define TCNT2_3_REG TCNT2
503 #define TCNT2_4_REG TCNT2
504 #define TCNT2_5_REG TCNT2
505 #define TCNT2_6_REG TCNT2
506 #define TCNT2_7_REG TCNT2
509 #define TCNT0_0_REG TCNT0
510 #define TCNT0_1_REG TCNT0
511 #define TCNT0_2_REG TCNT0
512 #define TCNT0_3_REG TCNT0
513 #define TCNT0_4_REG TCNT0
514 #define TCNT0_5_REG TCNT0
515 #define TCNT0_6_REG TCNT0
516 #define TCNT0_7_REG TCNT0
519 #define MPCM0_REG UCSR0A
520 #define U2X0_REG UCSR0A
521 #define OR0_REG UCSR0A
522 #define FE0_REG UCSR0A
523 #define UDRE0_REG UCSR0A
524 #define TXC0_REG UCSR0A
525 #define RXC0_REG UCSR0A
528 #define CS20_REG TCCR2
529 #define CS21_REG TCCR2
530 #define CS22_REG TCCR2
531 #define CTC2_REG TCCR2
532 #define COM20_REG TCCR2
533 #define COM21_REG TCCR2
534 #define PWM2_REG TCCR2
535 #define FOC2_REG TCCR2
538 #define UDR10_REG UDR1
539 #define UDR11_REG UDR1
540 #define UDR12_REG UDR1
541 #define UDR13_REG UDR1
542 #define UDR14_REG UDR1
543 #define UDR15_REG UDR1
544 #define UDR16_REG UDR1
545 #define UDR17_REG UDR1
548 #define OCF0_REG TIFR
549 #define TOV0_REG TIFR
550 #define OCF2_REG TIFR
551 #define TOV2_REG TIFR
552 #define ICF1_REG TIFR
553 #define OCF1B_REG TIFR
554 #define OCF1A_REG TIFR
555 #define TOV1_REG TIFR
558 #define EEAR8_REG EEARH
561 #define EEAR0_REG EEARL
562 #define EEAR1_REG EEARL
563 #define EEAR2_REG EEARL
564 #define EEAR3_REG EEARL
565 #define EEAR4_REG EEARL
566 #define EEAR5_REG EEARL
567 #define EEAR6_REG EEARL
568 #define EEAR7_REG EEARL
571 #define PINC0_REG PINC
572 #define PINC1_REG PINC
573 #define PINC2_REG PINC
574 #define PINC3_REG PINC
575 #define PINC4_REG PINC
576 #define PINC5_REG PINC
577 #define PINC6_REG PINC
578 #define PINC7_REG PINC
581 #define PINB0_REG PINB
582 #define PINB1_REG PINB
583 #define PINB2_REG PINB
584 #define PINB3_REG PINB
585 #define PINB4_REG PINB
586 #define PINB5_REG PINB
587 #define PINB6_REG PINB
588 #define PINB7_REG PINB
591 #define PINA0_REG PINA
592 #define PINA1_REG PINA
593 #define PINA2_REG PINA
594 #define PINA3_REG PINA
595 #define PINA4_REG PINA
596 #define PINA5_REG PINA
597 #define PINA6_REG PINA
598 #define PINA7_REG PINA
601 #define PINE0_REG PINE
602 #define PINE1_REG PINE
603 #define PINE2_REG PINE
606 #define ISC00_REG MCUCR
607 #define ISC01_REG MCUCR
608 #define ISC10_REG MCUCR
609 #define ISC11_REG MCUCR
610 #define SM1_REG MCUCR
612 #define SRW10_REG MCUCR
613 #define SRE_REG MCUCR
616 #define OCR1AH0_REG OCR1AH
617 #define OCR1AH1_REG OCR1AH
618 #define OCR1AH2_REG OCR1AH
619 #define OCR1AH3_REG OCR1AH
620 #define OCR1AH4_REG OCR1AH
621 #define OCR1AH5_REG OCR1AH
622 #define OCR1AH6_REG OCR1AH
623 #define OCR1AH7_REG OCR1AH
626 #define OCR1AL0_REG OCR1AL
627 #define OCR1AL1_REG OCR1AL
628 #define OCR1AL2_REG OCR1AL
629 #define OCR1AL3_REG OCR1AL
630 #define OCR1AL4_REG OCR1AL
631 #define OCR1AL5_REG OCR1AL
632 #define OCR1AL6_REG OCR1AL
633 #define OCR1AL7_REG OCR1AL
636 #define SPR0_REG SPCR
637 #define SPR1_REG SPCR
638 #define CPHA_REG SPCR
639 #define CPOL_REG SPCR
640 #define MSTR_REG SPCR
641 #define DORD_REG SPCR
643 #define SPIE_REG SPCR
646 #define OCR0_0_REG OCR0
647 #define OCR0_1_REG OCR0
648 #define OCR0_2_REG OCR0
649 #define OCR0_3_REG OCR0
650 #define OCR0_4_REG OCR0
651 #define OCR0_5_REG OCR0
652 #define OCR0_6_REG OCR0
653 #define OCR0_7_REG OCR0
656 #define OCR2_0_REG OCR2
657 #define OCR2_1_REG OCR2
658 #define OCR2_2_REG OCR2
659 #define OCR2_3_REG OCR2
660 #define OCR2_4_REG OCR2
661 #define OCR2_5_REG OCR2
662 #define OCR2_6_REG OCR2
663 #define OCR2_7_REG OCR2
666 #define TCR2UB_REG ASSR
667 #define OCR2UB_REG ASSR
668 #define TCN2UB_REG ASSR
672 #define AD0_PORT PORTA
675 #define AD1_PORT PORTA
678 #define AD2_PORT PORTA
681 #define AD3_PORT PORTA
684 #define AD4_PORT PORTA
687 #define AD5_PORT PORTA
690 #define AD6_PORT PORTA
693 #define AD7_PORT PORTA
696 #define OC0/T0_PORT PORTB
699 #define OC2/T1_PORT PORTB
702 #define RXD1_PORT PORTB
704 #define AIN0_PORT PORTB
707 #define TXD1_PORT PORTB
709 #define AIN1_PORT PORTB
712 #define SS_PORT PORTB
715 #define MOSI_PORT PORTB
718 #define MISO_PORT PORTB
721 #define SCK_PORT PORTB
724 #define A8_PORT PORTC
727 #define A9_PORT PORTC
730 #define A10_PORT PORTC
733 #define A11_PORT PORTC
736 #define A12_PORT PORTC
739 #define A13_PORT PORTC
742 #define A14_PORT PORTC
745 #define A15_PORT PORTC
748 #define RXD_PORT PORTD
751 #define TXD_PORT PORTD
754 #define INT0_PORT PORTD
757 #define INT1_PORT PORTD
761 #define OC1A_PORT PORTD
763 #define TOSC2_PORT PORTD
766 #define WR_PORT PORTD
769 #define RD_PORT PORTD
772 #define ICP/INT2_PORT PORTE
773 #define ICP/INT2_BIT 0
775 #define ALE_PORT PORTE
778 #define OC1B_PORT PORTE