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 WDP0_REG WDTCR
119 #define WDP1_REG WDTCR
120 #define WDP2_REG WDTCR
121 #define WDE_REG WDTCR
122 #define WDTOE_REG WDTCR
125 #define ICR1H0_REG ICR1H
126 #define ICR1H1_REG ICR1H
127 #define ICR1H2_REG ICR1H
128 #define ICR1H3_REG ICR1H
129 #define ICR1H4_REG ICR1H
130 #define ICR1H5_REG ICR1H
131 #define ICR1H6_REG ICR1H
132 #define ICR1H7_REG ICR1H
135 #define MUX0_REG ADMUX
136 #define MUX1_REG ADMUX
137 #define MUX2_REG ADMUX
138 #define MUX3_REG ADMUX
139 #define MUX4_REG ADMUX
140 #define ADLAR_REG ADMUX
141 #define REFS0_REG ADMUX
142 #define REFS1_REG ADMUX
145 #define CS00_REG TCCR0
146 #define CS01_REG TCCR0
147 #define CS02_REG TCCR0
148 #define WGM01_REG TCCR0
149 #define COM00_REG TCCR0
150 #define COM01_REG TCCR0
151 #define PWM0_REG TCCR0
152 #define FOC0_REG TCCR0
165 #define DDB0_REG DDRB
166 #define DDB1_REG DDRB
167 #define DDB2_REG DDRB
168 #define DDB3_REG DDRB
169 #define DDB4_REG DDRB
170 #define DDB5_REG DDRB
171 #define DDB6_REG DDRB
172 #define DDB7_REG DDRB
175 #define IVCE_REG GICR
176 #define IVSEL_REG GICR
177 #define INT2_REG GICR
178 #define INT0_REG GICR
179 #define INT1_REG GICR
182 #define SPI2X_REG SPSR
183 #define WCOL_REG SPSR
184 #define SPIF_REG SPSR
187 #define TWD0_REG TWDR
188 #define TWD1_REG TWDR
189 #define TWD2_REG TWDR
190 #define TWD3_REG TWDR
191 #define TWD4_REG TWDR
192 #define TWD5_REG TWDR
193 #define TWD6_REG TWDR
194 #define TWD7_REG TWDR
197 #define EEDR0_REG EEDR
198 #define EEDR1_REG EEDR
199 #define EEDR2_REG EEDR
200 #define EEDR3_REG EEDR
201 #define EEDR4_REG EEDR
202 #define EEDR5_REG EEDR
203 #define EEDR6_REG EEDR
204 #define EEDR7_REG EEDR
207 #define DDC0_REG DDRC
208 #define DDC1_REG DDRC
209 #define DDC2_REG DDRC
210 #define DDC3_REG DDRC
211 #define DDC4_REG DDRC
212 #define DDC5_REG DDRC
213 #define DDC6_REG DDRC
214 #define DDC7_REG DDRC
217 #define DDA0_REG DDRA
218 #define DDA1_REG DDRA
219 #define DDA2_REG DDRA
220 #define DDA3_REG DDRA
221 #define DDA4_REG DDRA
222 #define DDA5_REG DDRA
223 #define DDA6_REG DDRA
224 #define DDA7_REG DDRA
227 #define WGM10_REG TCCR1A
228 #define WGM11_REG TCCR1A
229 #define FOC1B_REG TCCR1A
230 #define FOC1A_REG TCCR1A
231 #define COM1B0_REG TCCR1A
232 #define COM1B1_REG TCCR1A
233 #define COM1A0_REG TCCR1A
234 #define COM1A1_REG TCCR1A
237 #define DDD0_REG DDRD
238 #define DDD1_REG DDRD
239 #define DDD2_REG DDRD
240 #define DDD3_REG DDRD
241 #define DDD4_REG DDRD
242 #define DDD5_REG DDRD
243 #define DDD6_REG DDRD
244 #define DDD7_REG DDRD
247 #define CS10_REG TCCR1B
248 #define CS11_REG TCCR1B
249 #define CS12_REG TCCR1B
250 #define CTC1_REG TCCR1B
251 #define ICES1_REG TCCR1B
252 #define ICNC1_REG TCCR1B
255 #define INTF2_REG GIFR
256 #define INTF0_REG GIFR
257 #define INTF1_REG GIFR
260 #define TOIE0_REG TIMSK
261 #define OCIE0_REG TIMSK
262 #define TOIE1_REG TIMSK
263 #define OCIE1B_REG TIMSK
264 #define OCIE1A_REG TIMSK
265 #define TICIE1_REG TIMSK
266 #define TOIE2_REG TIMSK
267 #define OCIE2_REG TIMSK
270 #define MPCM_REG UCSRA
271 #define U2X_REG UCSRA
272 #define UPE_REG UCSRA
273 #define DOR_REG UCSRA
275 #define UDRE_REG UCSRA
276 #define TXC_REG UCSRA
277 #define RXC_REG UCSRA
280 #define SPDR0_REG SPDR
281 #define SPDR1_REG SPDR
282 #define SPDR2_REG SPDR
283 #define SPDR3_REG SPDR
284 #define SPDR4_REG SPDR
285 #define SPDR5_REG SPDR
286 #define SPDR6_REG SPDR
287 #define SPDR7_REG SPDR
290 #define ACME_REG SFIOR
291 #define PSR10_REG SFIOR
292 #define PSR2_REG SFIOR
293 #define PUD_REG SFIOR
296 #define ACIS0_REG ACSR
297 #define ACIS1_REG ACSR
298 #define ACIC_REG ACSR
299 #define ACIE_REG ACSR
302 #define ACBG_REG ACSR
312 #define OCR1BL0_REG OCR1BL
313 #define OCR1BL1_REG OCR1BL
314 #define OCR1BL2_REG OCR1BL
315 #define OCR1BL3_REG OCR1BL
316 #define OCR1BL4_REG OCR1BL
317 #define OCR1BL5_REG OCR1BL
318 #define OCR1BL6_REG OCR1BL
319 #define OCR1BL7_REG OCR1BL
322 #define TXB8_REG UCSRB
323 #define RXB8_REG UCSRB
324 #define UCSZ2_REG UCSRB
325 #define TXEN_REG UCSRB
326 #define RXEN_REG UCSRB
327 #define UDRIE_REG UCSRB
328 #define TXCIE_REG UCSRB
329 #define RXCIE_REG UCSRB
332 #define UCPOL_REG UCSRC
333 #define UCSZ0_REG UCSRC
334 #define UCSZ1_REG UCSRC
335 #define USBS_REG UCSRC
336 #define UPM0_REG UCSRC
337 #define UPM1_REG UCSRC
338 #define UMSEL_REG UCSRC
339 #define URSEL_REG UCSRC
352 #define OCR1BH0_REG OCR1BH
353 #define OCR1BH1_REG OCR1BH
354 #define OCR1BH2_REG OCR1BH
355 #define OCR1BH3_REG OCR1BH
356 #define OCR1BH4_REG OCR1BH
357 #define OCR1BH5_REG OCR1BH
358 #define OCR1BH6_REG OCR1BH
359 #define OCR1BH7_REG OCR1BH
372 #define PIND0_REG PIND
373 #define PIND1_REG PIND
374 #define PIND2_REG PIND
375 #define PIND3_REG PIND
376 #define PIND4_REG PIND
377 #define PIND5_REG PIND
378 #define PIND6_REG PIND
379 #define PIND7_REG PIND
382 #define SPMEN_REG SPMCR
383 #define PGERS_REG SPMCR
384 #define PGWRT_REG SPMCR
385 #define BLBSET_REG SPMCR
386 #define ASRE_REG SPMCR
387 #define ASB_REG SPMCR
390 #define UBRR8_REG UBRRH
391 #define UBRR9_REG UBRRH
392 #define UBRR10_REG UBRRH
393 #define UBRR11_REG UBRRH
396 #define TWBR0_REG TWBR
397 #define TWBR1_REG TWBR
398 #define TWBR2_REG TWBR
399 #define TWBR3_REG TWBR
400 #define TWBR4_REG TWBR
401 #define TWBR5_REG TWBR
402 #define TWBR6_REG TWBR
403 #define TWBR7_REG TWBR
406 #define ADCL0_REG ADCL
407 #define ADCL1_REG ADCL
408 #define ADCL2_REG ADCL
409 #define ADCL3_REG ADCL
410 #define ADCL4_REG ADCL
411 #define ADCL5_REG ADCL
412 #define ADCL6_REG ADCL
413 #define ADCL7_REG ADCL
416 #define UBRR0_REG UBRRL
417 #define UBRR1_REG UBRRL
418 #define UBRR2_REG UBRRL
419 #define UBRR3_REG UBRRL
420 #define UBRR4_REG UBRRL
421 #define UBRR5_REG UBRRL
422 #define UBRR6_REG UBRRL
423 #define UBRR7_REG UBRRL
426 #define EERE_REG EECR
427 #define EEWE_REG EECR
428 #define EEMWE_REG EECR
429 #define EERIE_REG EECR
432 #define CAL0_REG OSCCAL
433 #define CAL1_REG OSCCAL
434 #define CAL2_REG OSCCAL
435 #define CAL3_REG OSCCAL
436 #define CAL4_REG OSCCAL
437 #define CAL5_REG OSCCAL
438 #define CAL6_REG OSCCAL
439 #define CAL7_REG OSCCAL
442 #define TCNT1L0_REG TCNT1L
443 #define TCNT1L1_REG TCNT1L
444 #define TCNT1L2_REG TCNT1L
445 #define TCNT1L3_REG TCNT1L
446 #define TCNT1L4_REG TCNT1L
447 #define TCNT1L5_REG TCNT1L
448 #define TCNT1L6_REG TCNT1L
449 #define TCNT1L7_REG TCNT1L
452 #define PORTB0_REG PORTB
453 #define PORTB1_REG PORTB
454 #define PORTB2_REG PORTB
455 #define PORTB3_REG PORTB
456 #define PORTB4_REG PORTB
457 #define PORTB5_REG PORTB
458 #define PORTB6_REG PORTB
459 #define PORTB7_REG PORTB
462 #define PORTD0_REG PORTD
463 #define PORTD1_REG PORTD
464 #define PORTD2_REG PORTD
465 #define PORTD3_REG PORTD
466 #define PORTD4_REG PORTD
467 #define PORTD5_REG PORTD
468 #define PORTD6_REG PORTD
469 #define PORTD7_REG PORTD
472 #define TCNT1H0_REG TCNT1H
473 #define TCNT1H1_REG TCNT1H
474 #define TCNT1H2_REG TCNT1H
475 #define TCNT1H3_REG TCNT1H
476 #define TCNT1H4_REG TCNT1H
477 #define TCNT1H5_REG TCNT1H
478 #define TCNT1H6_REG TCNT1H
479 #define TCNT1H7_REG TCNT1H
482 #define PORTC0_REG PORTC
483 #define PORTC1_REG PORTC
484 #define PORTC2_REG PORTC
485 #define PORTC3_REG PORTC
486 #define PORTC4_REG PORTC
487 #define PORTC5_REG PORTC
488 #define PORTC6_REG PORTC
489 #define PORTC7_REG PORTC
492 #define ADCH0_REG ADCH
493 #define ADCH1_REG ADCH
494 #define ADCH2_REG ADCH
495 #define ADCH3_REG ADCH
496 #define ADCH4_REG ADCH
497 #define ADCH5_REG ADCH
498 #define ADCH6_REG ADCH
499 #define ADCH7_REG ADCH
502 #define PORTA0_REG PORTA
503 #define PORTA1_REG PORTA
504 #define PORTA2_REG PORTA
505 #define PORTA3_REG PORTA
506 #define PORTA4_REG PORTA
507 #define PORTA5_REG PORTA
508 #define PORTA6_REG PORTA
509 #define PORTA7_REG PORTA
512 #define TWIE_REG TWCR
513 #define TWEN_REG TWCR
514 #define TWWC_REG TWCR
515 #define TWSTO_REG TWCR
516 #define TWSTA_REG TWCR
517 #define TWEA_REG TWCR
518 #define TWINT_REG TWCR
521 #define TCNT0_0_REG TCNT0
522 #define TCNT0_1_REG TCNT0
523 #define TCNT0_2_REG TCNT0
524 #define TCNT0_3_REG TCNT0
525 #define TCNT0_4_REG TCNT0
526 #define TCNT0_5_REG TCNT0
527 #define TCNT0_6_REG TCNT0
528 #define TCNT0_7_REG TCNT0
531 #define PORF_REG MCUCSR
532 #define EXTRF_REG MCUCSR
533 #define BORF_REG MCUCSR
534 #define WDRF_REG MCUCSR
535 #define JTRF_REG MCUCSR
536 #define ISC2_REG MCUCSR
537 #define JDT_REG MCUCSR
540 #define TWGCE_REG TWAR
541 #define TWA0_REG TWAR
542 #define TWA1_REG TWAR
543 #define TWA2_REG TWAR
544 #define TWA3_REG TWAR
545 #define TWA4_REG TWAR
546 #define TWA5_REG TWAR
547 #define TWA6_REG TWAR
550 #define ADPS0_REG ADCSR
551 #define ADPS1_REG ADCSR
552 #define ADPS2_REG ADCSR
553 #define ADIE_REG ADCSR
554 #define ADIF_REG ADCSR
555 #define ADATE_REG ADCSR
556 #define ADSC_REG ADCSR
557 #define ADEN_REG ADCSR
560 #define CS20_REG TCCR2
561 #define CS21_REG TCCR2
562 #define CS22_REG TCCR2
563 #define CTC2_REG TCCR2
564 #define COM20_REG TCCR2
565 #define COM21_REG TCCR2
566 #define PWM2_REG TCCR2
567 #define FOC2_REG TCCR2
570 #define TOV0_REG TIFR
571 #define OCF0_REG TIFR
572 #define TOV1_REG TIFR
573 #define OCF1B_REG TIFR
574 #define OCF1A_REG TIFR
575 #define ICF1_REG TIFR
576 #define TOV2_REG TIFR
577 #define OCF2_REG TIFR
580 #define EEAR8_REG EEARH
581 #define EEAR9_REG EEARH
584 #define TCNT2_0_REG TCNT2
585 #define TCNT2_1_REG TCNT2
586 #define TCNT2_2_REG TCNT2
587 #define TCNT2_3_REG TCNT2
588 #define TCNT2_4_REG TCNT2
589 #define TCNT2_5_REG TCNT2
590 #define TCNT2_6_REG TCNT2
591 #define TCNT2_7_REG TCNT2
594 #define EEAR00_REG EEARL
595 #define EEAR1_REG EEARL
596 #define EEAR2_REG EEARL
597 #define EEAR3_REG EEARL
598 #define EEAR4_REG EEARL
599 #define EEAR5_REG EEARL
600 #define EEAR6_REG EEARL
601 #define EEAR7_REG EEARL
604 #define TWS3_REG TWSR
605 #define TWS4_REG TWSR
606 #define TWS5_REG TWSR
607 #define TWS6_REG TWSR
608 #define TWS7_REG TWSR
611 #define PINC0_REG PINC
612 #define PINC1_REG PINC
613 #define PINC2_REG PINC
614 #define PINC3_REG PINC
615 #define PINC4_REG PINC
616 #define PINC5_REG PINC
617 #define PINC6_REG PINC
618 #define PINC7_REG PINC
621 #define PINB0_REG PINB
622 #define PINB1_REG PINB
623 #define PINB2_REG PINB
624 #define PINB3_REG PINB
625 #define PINB4_REG PINB
626 #define PINB5_REG PINB
627 #define PINB6_REG PINB
628 #define PINB7_REG PINB
631 #define PINA0_REG PINA
632 #define PINA1_REG PINA
633 #define PINA2_REG PINA
634 #define PINA3_REG PINA
635 #define PINA4_REG PINA
636 #define PINA5_REG PINA
637 #define PINA6_REG PINA
638 #define PINA7_REG PINA
641 #define ISC00_REG MCUCR
642 #define ISC01_REG MCUCR
643 #define ISC10_REG MCUCR
644 #define ISC11_REG MCUCR
645 #define SM0_REG MCUCR
646 #define SM1_REG MCUCR
647 #define SM2_REG MCUCR
651 #define OCR1AH0_REG OCR1AH
652 #define OCR1AH1_REG OCR1AH
653 #define OCR1AH2_REG OCR1AH
654 #define OCR1AH3_REG OCR1AH
655 #define OCR1AH4_REG OCR1AH
656 #define OCR1AH5_REG OCR1AH
657 #define OCR1AH6_REG OCR1AH
658 #define OCR1AH7_REG OCR1AH
661 #define OCR1AL0_REG OCR1AL
662 #define OCR1AL1_REG OCR1AL
663 #define OCR1AL2_REG OCR1AL
664 #define OCR1AL3_REG OCR1AL
665 #define OCR1AL4_REG OCR1AL
666 #define OCR1AL5_REG OCR1AL
667 #define OCR1AL6_REG OCR1AL
668 #define OCR1AL7_REG OCR1AL
671 #define SPR0_REG SPCR
672 #define SPR1_REG SPCR
673 #define CPHA_REG SPCR
674 #define CPOL_REG SPCR
675 #define MSTR_REG SPCR
676 #define DORD_REG SPCR
678 #define SPIE_REG SPCR
681 #define TCR2UB_REG ASSR
682 #define OCR2UB_REG ASSR
683 #define TCN2UB_REG ASSR
687 #define OCR0_0_REG OCR0
688 #define OCR0_1_REG OCR0
689 #define OCR0_2_REG OCR0
690 #define OCR0_3_REG OCR0
691 #define OCR0_4_REG OCR0
692 #define OCR0_5_REG OCR0
693 #define OCR0_6_REG OCR0
694 #define OCR0_7_REG OCR0
697 #define OCR2_0_REG OCR2
698 #define OCR2_1_REG OCR2
699 #define OCR2_2_REG OCR2
700 #define OCR2_3_REG OCR2
701 #define OCR2_4_REG OCR2
702 #define OCR2_5_REG OCR2
703 #define OCR2_6_REG OCR2
704 #define OCR2_7_REG OCR2
707 #define ICR1L0_REG ICR1L
708 #define ICR1L1_REG ICR1L
709 #define ICR1L2_REG ICR1L
710 #define ICR1L3_REG ICR1L
711 #define ICR1L4_REG ICR1L
712 #define ICR1L5_REG ICR1L
713 #define ICR1L6_REG ICR1L
714 #define ICR1L7_REG ICR1L
717 #define ADC0_PORT PORTA
720 #define ADC1_PORT PORTA
723 #define ADC2_PORT PORTA
726 #define ADC3_PORT PORTA
729 #define ADC4_PORT PORTA
732 #define ADc5_PORT PORTA
735 #define ADC6_PORT PORTA
738 #define ADC7_PORT PORTA
741 #define XCK_PORT PORTB
743 #define T0_PORT PORTB
746 #define T1_PORT PORTB
749 #define AIN0_PORT PORTB
751 #define INT2_PORT PORTB
754 #define AIN1_PORT PORTB
756 #define OC0_PORT PORTB
759 #define SS_PORT PORTB
762 #define MOSI_PORT PORTB
765 #define MISO_PORT PORTB
769 #define SCL_PORT PORTC
772 #define SDA_PORT PORTC
775 #define TMS_PORT PORTC
778 #define TCK_PORT PORTC
781 #define TDO_PORT PORTC
784 #define TDI_PORT PORTC
787 #define TOSC1_PORT PORTC
790 #define TOSC2_PORT PORTC
793 #define RXD_PORT PORTD
796 #define TXD_PORT PORTD
799 #define INT0_PORT PORTD
802 #define INT1_PORT PORTD
805 #define OC1B_PORT PORTD
808 #define OC1A_PORT PORTD
811 #define ICP_PORT PORTD
814 #define OC2_PORT PORTD