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_COMPARE1A_NUM 0
100 #define SIG_OUTPUT_COMPARE1B_NUM 1
101 #define SIG_OUTPUT_COMPARE2_NUM 2
102 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 3
108 #define PWM_TOTAL_NUM 3
110 /* input capture interrupt number */
111 #define SIG_INPUT_CAPTURE1_NUM 0
112 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
116 #define WDP0_REG WDTCR
117 #define WDP1_REG WDTCR
118 #define WDP2_REG WDTCR
119 #define WDE_REG WDTCR
120 #define WDTOE_REG WDTCR
123 #define INT0_REG GIMSK
124 #define INT1_REG GIMSK
127 #define ICR1H0_REG ICR1H
128 #define ICR1H1_REG ICR1H
129 #define ICR1H2_REG ICR1H
130 #define ICR1H3_REG ICR1H
131 #define ICR1H4_REG ICR1H
132 #define ICR1H5_REG ICR1H
133 #define ICR1H6_REG ICR1H
134 #define ICR1H7_REG ICR1H
137 #define MUX0_REG ADMUX
138 #define MUX1_REG ADMUX
139 #define MUX2_REG ADMUX
140 #define MUX3_REG ADMUX
141 #define MUX4_REG ADMUX
142 #define ADLAR_REG ADMUX
143 #define REFS0_REG ADMUX
144 #define REFS1_REG ADMUX
147 #define CS00_REG TCCR0
148 #define CS01_REG TCCR0
149 #define CS02_REG TCCR0
162 #define DDB0_REG DDRB
163 #define DDB1_REG DDRB
164 #define DDB2_REG DDRB
165 #define DDB3_REG DDRB
166 #define DDB4_REG DDRB
167 #define DDB5_REG DDRB
168 #define DDB6_REG DDRB
169 #define DDB7_REG DDRB
172 #define SPI2X_REG SPSR
173 #define WCOL_REG SPSR
174 #define SPIF_REG SPSR
177 #define TWD0_REG TWDR
178 #define TWD1_REG TWDR
179 #define TWD2_REG TWDR
180 #define TWD3_REG TWDR
181 #define TWD4_REG TWDR
182 #define TWD5_REG TWDR
183 #define TWD6_REG TWDR
184 #define TWD7_REG TWDR
187 #define EEDR0_REG EEDR
188 #define EEDR1_REG EEDR
189 #define EEDR2_REG EEDR
190 #define EEDR3_REG EEDR
191 #define EEDR4_REG EEDR
192 #define EEDR5_REG EEDR
193 #define EEDR6_REG EEDR
194 #define EEDR7_REG EEDR
197 #define DDC0_REG DDRC
198 #define DDC1_REG DDRC
199 #define DDC2_REG DDRC
200 #define DDC3_REG DDRC
201 #define DDC4_REG DDRC
202 #define DDC5_REG DDRC
203 #define DDC6_REG DDRC
204 #define DDC7_REG DDRC
207 #define DDA0_REG DDRA
208 #define DDA1_REG DDRA
209 #define DDA2_REG DDRA
210 #define DDA3_REG DDRA
211 #define DDA4_REG DDRA
212 #define DDA5_REG DDRA
213 #define DDA6_REG DDRA
214 #define DDA7_REG DDRA
217 #define PWM10_REG TCCR1A
218 #define PWM11_REG TCCR1A
219 #define FOC1B_REG TCCR1A
220 #define FOC1A_REG TCCR1A
221 #define COM1B0_REG TCCR1A
222 #define COM1B1_REG TCCR1A
223 #define COM1A0_REG TCCR1A
224 #define COM1A1_REG TCCR1A
227 #define DDD0_REG DDRD
228 #define DDD1_REG DDRD
229 #define DDD2_REG DDRD
230 #define DDD3_REG DDRD
231 #define DDD4_REG DDRD
232 #define DDD5_REG DDRD
233 #define DDD6_REG DDRD
234 #define DDD7_REG DDRD
237 #define CS10_REG TCCR1B
238 #define CS11_REG TCCR1B
239 #define CS12_REG TCCR1B
240 #define CTC1_REG TCCR1B
241 #define ICES1_REG TCCR1B
242 #define ICNC1_REG TCCR1B
245 #define INTF0_REG GIFR
246 #define INTF1_REG GIFR
249 #define TOIE0_REG TIMSK
250 #define TOIE1_REG TIMSK
251 #define OCIE1B_REG TIMSK
252 #define OCIE1A_REG TIMSK
253 #define TICIE1_REG TIMSK
254 #define TOIE2_REG TIMSK
255 #define OCIE2_REG TIMSK
258 #define MPCM_REG UCSRA
259 #define U2X_REG UCSRA
262 #define UDRE_REG UCSRA
263 #define TXC_REG UCSRA
264 #define RXC_REG UCSRA
267 #define SPDR0_REG SPDR
268 #define SPDR1_REG SPDR
269 #define SPDR2_REG SPDR
270 #define SPDR3_REG SPDR
271 #define SPDR4_REG SPDR
272 #define SPDR5_REG SPDR
273 #define SPDR6_REG SPDR
274 #define SPDR7_REG SPDR
277 #define TXB8_REG UCSRB
278 #define RXB8_REG UCSRB
279 #define CHR9_REG UCSRB
280 #define TXEN_REG UCSRB
281 #define RXEN_REG UCSRB
282 #define UDRIE_REG UCSRB
283 #define TXCIE_REG UCSRB
284 #define RXCIE_REG UCSRB
287 #define PSR10_REG SFIOR
288 #define PSR2_REG SFIOR
289 #define PUD_REG SFIOR
290 #define ACME_REG SFIOR
293 #define ACIS0_REG ACSR
294 #define ACIS1_REG ACSR
295 #define ACIC_REG ACSR
296 #define ACIE_REG ACSR
299 #define ACBG_REG ACSR
308 #define OCR1BL0_REG OCR1BL
309 #define OCR1BL1_REG OCR1BL
310 #define OCR1BL2_REG OCR1BL
311 #define OCR1BL3_REG OCR1BL
312 #define OCR1BL4_REG OCR1BL
313 #define OCR1BL5_REG OCR1BL
314 #define OCR1BL6_REG OCR1BL
315 #define OCR1BL7_REG OCR1BL
318 #define UBRRHI0_REG UBRRHI
319 #define UBRRHI1_REG UBRRHI
320 #define UBRRHI2_REG UBRRHI
321 #define UBRRHI3_REG UBRRHI
334 #define OCR1BH0_REG OCR1BH
335 #define OCR1BH1_REG OCR1BH
336 #define OCR1BH2_REG OCR1BH
337 #define OCR1BH3_REG OCR1BH
338 #define OCR1BH4_REG OCR1BH
339 #define OCR1BH5_REG OCR1BH
340 #define OCR1BH6_REG OCR1BH
341 #define OCR1BH7_REG OCR1BH
344 #define PIND0_REG PIND
345 #define PIND1_REG PIND
346 #define PIND2_REG PIND
347 #define PIND3_REG PIND
348 #define PIND4_REG PIND
349 #define PIND5_REG PIND
350 #define PIND6_REG PIND
351 #define PIND7_REG PIND
354 #define SPMEN_REG SPMCR
355 #define PGERS_REG SPMCR
356 #define PGWRT_REG SPMCR
357 #define BLBSET_REG SPMCR
358 #define ASRE_REG SPMCR
359 #define ASB_REG SPMCR
362 #define TWBR0_REG TWBR
363 #define TWBR1_REG TWBR
364 #define TWBR2_REG TWBR
365 #define TWBR3_REG TWBR
366 #define TWBR4_REG TWBR
367 #define TWBR5_REG TWBR
368 #define TWBR6_REG TWBR
369 #define TWBR7_REG TWBR
372 #define ADCL0_REG ADCL
373 #define ADCL1_REG ADCL
374 #define ADCL2_REG ADCL
375 #define ADCL3_REG ADCL
376 #define ADCL4_REG ADCL
377 #define ADCL5_REG ADCL
378 #define ADCL6_REG ADCL
379 #define ADCL7_REG ADCL
382 #define PORF_REG MCUSR
383 #define EXTRF_REG MCUSR
384 #define BORF_REG MCUSR
385 #define WDRF_REG MCUSR
388 #define EERE_REG EECR
389 #define EEWE_REG EECR
390 #define EEMWE_REG EECR
391 #define EERIE_REG EECR
394 #define CAL0_REG OSCCAL
395 #define CAL1_REG OSCCAL
396 #define CAL2_REG OSCCAL
397 #define CAL3_REG OSCCAL
398 #define CAL4_REG OSCCAL
399 #define CAL5_REG OSCCAL
400 #define CAL6_REG OSCCAL
401 #define CAL7_REG OSCCAL
404 #define TCNT1L0_REG TCNT1L
405 #define TCNT1L1_REG TCNT1L
406 #define TCNT1L2_REG TCNT1L
407 #define TCNT1L3_REG TCNT1L
408 #define TCNT1L4_REG TCNT1L
409 #define TCNT1L5_REG TCNT1L
410 #define TCNT1L6_REG TCNT1L
411 #define TCNT1L7_REG TCNT1L
414 #define PORTB0_REG PORTB
415 #define PORTB1_REG PORTB
416 #define PORTB2_REG PORTB
417 #define PORTB3_REG PORTB
418 #define PORTB4_REG PORTB
419 #define PORTB5_REG PORTB
420 #define PORTB6_REG PORTB
421 #define PORTB7_REG PORTB
424 #define PORTD0_REG PORTD
425 #define PORTD1_REG PORTD
426 #define PORTD2_REG PORTD
427 #define PORTD3_REG PORTD
428 #define PORTD4_REG PORTD
429 #define PORTD5_REG PORTD
430 #define PORTD6_REG PORTD
431 #define PORTD7_REG PORTD
434 #define TCNT1H0_REG TCNT1H
435 #define TCNT1H1_REG TCNT1H
436 #define TCNT1H2_REG TCNT1H
437 #define TCNT1H3_REG TCNT1H
438 #define TCNT1H4_REG TCNT1H
439 #define TCNT1H5_REG TCNT1H
440 #define TCNT1H6_REG TCNT1H
441 #define TCNT1H7_REG TCNT1H
444 #define PORTC0_REG PORTC
445 #define PORTC1_REG PORTC
446 #define PORTC2_REG PORTC
447 #define PORTC3_REG PORTC
448 #define PORTC4_REG PORTC
449 #define PORTC5_REG PORTC
450 #define PORTC6_REG PORTC
451 #define PORTC7_REG PORTC
454 #define ADCH0_REG ADCH
455 #define ADCH1_REG ADCH
456 #define ADCH2_REG ADCH
457 #define ADCH3_REG ADCH
458 #define ADCH4_REG ADCH
459 #define ADCH5_REG ADCH
460 #define ADCH6_REG ADCH
461 #define ADCH7_REG ADCH
464 #define PORTA0_REG PORTA
465 #define PORTA1_REG PORTA
466 #define PORTA2_REG PORTA
467 #define PORTA3_REG PORTA
468 #define PORTA4_REG PORTA
469 #define PORTA5_REG PORTA
470 #define PORTA6_REG PORTA
471 #define PORTA7_REG PORTA
474 #define TWIE_REG TWCR
475 #define TWEN_REG TWCR
476 #define TWWC_REG TWCR
477 #define TWSTO_REG TWCR
478 #define TWSTA_REG TWCR
479 #define TWEA_REG TWCR
480 #define TWINT_REG TWCR
483 #define TCNT00_REG TCNT0
484 #define TCNT01_REG TCNT0
485 #define TCNT02_REG TCNT0
486 #define TCNT03_REG TCNT0
487 #define TCNT04_REG TCNT0
488 #define TCNT05_REG TCNT0
489 #define TCNT06_REG TCNT0
490 #define TCNT07_REG TCNT0
503 #define TWGCE_REG TWAR
504 #define TWA0_REG TWAR
505 #define TWA1_REG TWAR
506 #define TWA2_REG TWAR
507 #define TWA3_REG TWAR
508 #define TWA4_REG TWAR
509 #define TWA5_REG TWAR
510 #define TWA6_REG TWAR
513 #define UBRR0_REG UBRR
514 #define UBRR1_REG UBRR
515 #define UBRR2_REG UBRR
516 #define UBRR3_REG UBRR
517 #define UBRR4_REG UBRR
518 #define UBRR5_REG UBRR
519 #define UBRR6_REG UBRR
520 #define UBRR7_REG UBRR
523 #define ADPS0_REG ADCSR
524 #define ADPS1_REG ADCSR
525 #define ADPS2_REG ADCSR
526 #define ADIE_REG ADCSR
527 #define ADIF_REG ADCSR
528 #define ADFR_REG ADCSR
529 #define ADSC_REG ADCSR
530 #define ADEN_REG ADCSR
533 #define CS20_REG TCCR2
534 #define CS21_REG TCCR2
535 #define CS22_REG TCCR2
536 #define WGM21_REG TCCR2
537 #define COM20_REG TCCR2
538 #define COM21_REG TCCR2
539 #define WGM20_REG TCCR2
540 #define FOC2_REG TCCR2
543 #define TOV0_REG TIFR
544 #define TOV1_REG TIFR
545 #define OCF1B_REG TIFR
546 #define OCF1A_REG TIFR
547 #define ICF1_REG TIFR
548 #define TOV2_REG TIFR
549 #define OCF2_REG TIFR
552 #define EEAR8_REG EEARH
555 #define TCNT2_0_REG TCNT2
556 #define TCNT2_1_REG TCNT2
557 #define TCNT2_2_REG TCNT2
558 #define TCNT2_3_REG TCNT2
559 #define TCNT2_4_REG TCNT2
560 #define TCNT2_5_REG TCNT2
561 #define TCNT2_6_REG TCNT2
562 #define TCNT2_7_REG TCNT2
565 #define EEAR0_REG EEARL
566 #define EEAR1_REG EEARL
567 #define EEAR2_REG EEARL
568 #define EEAR3_REG EEARL
569 #define EEAR4_REG EEARL
570 #define EEAR5_REG EEARL
571 #define EEAR6_REG EEARL
572 #define EEAR7_REG EEARL
575 #define TWS3_REG TWSR
576 #define TWS4_REG TWSR
577 #define TWS5_REG TWSR
578 #define TWS6_REG TWSR
579 #define TWS7_REG TWSR
582 #define PINC0_REG PINC
583 #define PINC1_REG PINC
584 #define PINC2_REG PINC
585 #define PINC3_REG PINC
586 #define PINC4_REG PINC
587 #define PINC5_REG PINC
588 #define PINC6_REG PINC
589 #define PINC7_REG PINC
592 #define PINB0_REG PINB
593 #define PINB1_REG PINB
594 #define PINB2_REG PINB
595 #define PINB3_REG PINB
596 #define PINB4_REG PINB
597 #define PINB5_REG PINB
598 #define PINB6_REG PINB
599 #define PINB7_REG PINB
602 #define PINA0_REG PINA
603 #define PINA1_REG PINA
604 #define PINA2_REG PINA
605 #define PINA3_REG PINA
606 #define PINA4_REG PINA
607 #define PINA5_REG PINA
608 #define PINA6_REG PINA
609 #define PINA7_REG PINA
612 #define ISC00_REG MCUCR
613 #define ISC01_REG MCUCR
614 #define ISC10_REG MCUCR
615 #define ISC11_REG MCUCR
616 #define SM0_REG MCUCR
617 #define SM1_REG MCUCR
621 #define OCR1AH0_REG OCR1AH
622 #define OCR1AH1_REG OCR1AH
623 #define OCR1AH2_REG OCR1AH
624 #define OCR1AH3_REG OCR1AH
625 #define OCR1AH4_REG OCR1AH
626 #define OCR1AH5_REG OCR1AH
627 #define OCR1AH6_REG OCR1AH
628 #define OCR1AH7_REG OCR1AH
631 #define OCR1AL0_REG OCR1AL
632 #define OCR1AL1_REG OCR1AL
633 #define OCR1AL2_REG OCR1AL
634 #define OCR1AL3_REG OCR1AL
635 #define OCR1AL4_REG OCR1AL
636 #define OCR1AL5_REG OCR1AL
637 #define OCR1AL6_REG OCR1AL
638 #define OCR1AL7_REG OCR1AL
641 #define SPR0_REG SPCR
642 #define SPR1_REG SPCR
643 #define CPHA_REG SPCR
644 #define CPOL_REG SPCR
645 #define MSTR_REG SPCR
646 #define DORD_REG SPCR
648 #define SPIE_REG SPCR
651 #define TCR2UB_REG ASSR
652 #define OCR2UB_REG ASSR
653 #define TCN2UB_REG ASSR
657 #define OCR2_0_REG OCR2
658 #define OCR2_1_REG OCR2
659 #define OCR2_2_REG OCR2
660 #define OCR2_3_REG OCR2
661 #define OCR2_4_REG OCR2
662 #define OCR2_5_REG OCR2
663 #define OCR2_6_REG OCR2
664 #define OCR2_7_REG OCR2
667 #define ICR1L0_REG ICR1L
668 #define ICR1L1_REG ICR1L
669 #define ICR1L2_REG ICR1L
670 #define ICR1L3_REG ICR1L
671 #define ICR1L4_REG ICR1L
672 #define ICR1L5_REG ICR1L
673 #define ICR1L6_REG ICR1L
674 #define ICR1L7_REG ICR1L
677 #define ADC0_PORT PORTA
680 #define ADC1_PORT PORTA
683 #define ADC2_PORT PORTA
686 #define ADC3_PORT PORTA
689 #define ADC4_PORT PORTA
692 #define ADc5_PORT PORTA
695 #define ADC6_PORT PORTA
698 #define ADC7_PORT PORTA
701 #define T0_PORT PORTB
704 #define T1_PORT PORTB
707 #define AIN0_PORT PORTB
710 #define AIN1_PORT PORTB
713 #define SS_PORT PORTB
716 #define MOSI_PORT PORTB
719 #define MISO_PORT PORTB
723 #define SCL_PORT PORTC
726 #define SDA_PORT PORTC
733 #define TOSC1_PORT PORTC
736 #define TOSC2_PORT PORTC
739 #define RXD_PORT PORTD
742 #define TXD_PORT PORTD
745 #define INT0_PORT PORTD
748 #define INT1_PORT PORTD
751 #define OC1B_PORT PORTD
754 #define OC1A_PORT PORTD
757 #define ICP_PORT PORTD
760 #define OC2_PORT PORTD