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
142 #define CS00_REG TCCR0
143 #define CS01_REG TCCR0
144 #define CS02_REG TCCR0
147 #define CS20_REG TCCR2
148 #define CS21_REG TCCR2
149 #define CS22_REG TCCR2
150 #define CTC2_REG TCCR2
151 #define COM20_REG TCCR2
152 #define COM21_REG TCCR2
153 #define PWM2_REG TCCR2
156 #define DDB0_REG DDRB
157 #define DDB1_REG DDRB
158 #define DDB2_REG DDRB
159 #define DDB3_REG DDRB
160 #define DDB4_REG DDRB
161 #define DDB5_REG DDRB
162 #define DDB6_REG DDRB
163 #define DDB7_REG DDRB
173 #define EEDR0_REG EEDR
174 #define EEDR1_REG EEDR
175 #define EEDR2_REG EEDR
176 #define EEDR3_REG EEDR
177 #define EEDR4_REG EEDR
178 #define EEDR5_REG EEDR
179 #define EEDR6_REG EEDR
180 #define EEDR7_REG EEDR
183 #define DDC0_REG DDRC
184 #define DDC1_REG DDRC
185 #define DDC2_REG DDRC
186 #define DDC3_REG DDRC
187 #define DDC4_REG DDRC
188 #define DDC5_REG DDRC
189 #define DDC6_REG DDRC
190 #define DDC7_REG DDRC
193 #define DDA0_REG DDRA
194 #define DDA1_REG DDRA
195 #define DDA2_REG DDRA
196 #define DDA3_REG DDRA
197 #define DDA4_REG DDRA
198 #define DDA5_REG DDRA
199 #define DDA6_REG DDRA
200 #define DDA7_REG DDRA
203 #define PWM10_REG TCCR1A
204 #define PWM11_REG TCCR1A
205 #define COM1B0_REG TCCR1A
206 #define COM1B1_REG TCCR1A
207 #define COM1A0_REG TCCR1A
208 #define COM1A1_REG TCCR1A
211 #define DDD0_REG DDRD
212 #define DDD1_REG DDRD
213 #define DDD2_REG DDRD
214 #define DDD3_REG DDRD
215 #define DDD4_REG DDRD
216 #define DDD5_REG DDRD
217 #define DDD6_REG DDRD
218 #define DDD7_REG DDRD
221 #define CS10_REG TCCR1B
222 #define CS11_REG TCCR1B
223 #define CS12_REG TCCR1B
224 #define CTC1_REG TCCR1B
225 #define ICES1_REG TCCR1B
226 #define ICNC1_REG TCCR1B
229 #define INTF0_REG GIFR
230 #define INTF1_REG GIFR
233 #define TOIE0_REG TIMSK
234 #define TOIE1_REG TIMSK
235 #define OCIE1B_REG TIMSK
236 #define OCIE1A_REG TIMSK
237 #define TICIE1_REG TIMSK
238 #define TOIE2_REG TIMSK
239 #define OCIE2_REG TIMSK
247 #define UDRIE_REG UCR
248 #define TXCIE_REG UCR
249 #define RXCIE_REG UCR
252 #define SPDR0_REG SPDR
253 #define SPDR1_REG SPDR
254 #define SPDR2_REG SPDR
255 #define SPDR3_REG SPDR
256 #define SPDR4_REG SPDR
257 #define SPDR5_REG SPDR
258 #define SPDR6_REG SPDR
259 #define SPDR7_REG SPDR
262 #define WCOL_REG SPSR
263 #define SPIF_REG SPSR
266 #define ACIS0_REG ACSR
267 #define ACIS1_REG ACSR
268 #define ACIC_REG ACSR
269 #define ACIE_REG ACSR
279 #define OCR1BL0_REG OCR1BL
280 #define OCR1BL1_REG OCR1BL
281 #define OCR1BL2_REG OCR1BL
282 #define OCR1BL3_REG OCR1BL
283 #define OCR1BL4_REG OCR1BL
284 #define OCR1BL5_REG OCR1BL
285 #define OCR1BL6_REG OCR1BL
286 #define OCR1BL7_REG OCR1BL
289 #define ICR1L0_REG ICR1L
290 #define ICR1L1_REG ICR1L
291 #define ICR1L2_REG ICR1L
292 #define ICR1L3_REG ICR1L
293 #define ICR1L4_REG ICR1L
294 #define ICR1L5_REG ICR1L
295 #define ICR1L6_REG ICR1L
296 #define ICR1L7_REG ICR1L
299 #define OCR1BH0_REG OCR1BH
300 #define OCR1BH1_REG OCR1BH
301 #define OCR1BH2_REG OCR1BH
302 #define OCR1BH3_REG OCR1BH
303 #define OCR1BH4_REG OCR1BH
304 #define OCR1BH5_REG OCR1BH
305 #define OCR1BH6_REG OCR1BH
306 #define OCR1BH7_REG OCR1BH
309 #define PIND0_REG PIND
310 #define PIND1_REG PIND
311 #define PIND2_REG PIND
312 #define PIND3_REG PIND
313 #define PIND4_REG PIND
314 #define PIND5_REG PIND
315 #define PIND6_REG PIND
316 #define PIND7_REG PIND
329 #define ADC0_REG ADCL
330 #define ADC1_REG ADCL
331 #define ADC2_REG ADCL
332 #define ADC3_REG ADCL
333 #define ADC4_REG ADCL
334 #define ADC5_REG ADCL
335 #define ADC6_REG ADCL
336 #define ADC7_REG ADCL
339 #define PORF_REG MCUSR
340 #define EXTRF_REG MCUSR
343 #define EERE_REG EECR
344 #define EEWE_REG EECR
345 #define EEMWE_REG EECR
346 #define EERIE_REG EECR
349 #define TCNT1L0_REG TCNT1L
350 #define TCNT1L1_REG TCNT1L
351 #define TCNT1L2_REG TCNT1L
352 #define TCNT1L3_REG TCNT1L
353 #define TCNT1L4_REG TCNT1L
354 #define TCNT1L5_REG TCNT1L
355 #define TCNT1L6_REG TCNT1L
356 #define TCNT1L7_REG TCNT1L
359 #define PORTB0_REG PORTB
360 #define PORTB1_REG PORTB
361 #define PORTB2_REG PORTB
362 #define PORTB3_REG PORTB
363 #define PORTB4_REG PORTB
364 #define PORTB5_REG PORTB
365 #define PORTB6_REG PORTB
366 #define PORTB7_REG PORTB
369 #define PORTD0_REG PORTD
370 #define PORTD1_REG PORTD
371 #define PORTD2_REG PORTD
372 #define PORTD3_REG PORTD
373 #define PORTD4_REG PORTD
374 #define PORTD5_REG PORTD
375 #define PORTD6_REG PORTD
376 #define PORTD7_REG PORTD
379 #define TCNT1H0_REG TCNT1H
380 #define TCNT1H1_REG TCNT1H
381 #define TCNT1H2_REG TCNT1H
382 #define TCNT1H3_REG TCNT1H
383 #define TCNT1H4_REG TCNT1H
384 #define TCNT1H5_REG TCNT1H
385 #define TCNT1H6_REG TCNT1H
386 #define TCNT1H7_REG TCNT1H
389 #define PORTC0_REG PORTC
390 #define PORTC1_REG PORTC
391 #define PORTC2_REG PORTC
392 #define PORTC3_REG PORTC
393 #define PORTC4_REG PORTC
394 #define PORTC5_REG PORTC
395 #define PORTC6_REG PORTC
396 #define PORTC7_REG PORTC
399 #define ADC8_REG ADCH
400 #define ADC9_REG ADCH
403 #define PORTA0_REG PORTA
404 #define PORTA1_REG PORTA
405 #define PORTA2_REG PORTA
406 #define PORTA3_REG PORTA
407 #define PORTA4_REG PORTA
408 #define PORTA5_REG PORTA
409 #define PORTA6_REG PORTA
410 #define PORTA7_REG PORTA
413 #define TCNT2_0_REG TCNT2
414 #define TCNT2_1_REG TCNT2
415 #define TCNT2_2_REG TCNT2
416 #define TCNT2_3_REG TCNT2
417 #define TCNT2_4_REG TCNT2
418 #define TCNT2_5_REG TCNT2
419 #define TCNT2_6_REG TCNT2
420 #define TCNT2_7_REG TCNT2
423 #define TCNT00_REG TCNT0
424 #define TCNT01_REG TCNT0
425 #define TCNT02_REG TCNT0
426 #define TCNT03_REG TCNT0
427 #define TCNT04_REG TCNT0
428 #define TCNT05_REG TCNT0
429 #define TCNT06_REG TCNT0
430 #define TCNT07_REG TCNT0
443 #define UBRR0_REG UBRR
444 #define UBRR1_REG UBRR
445 #define UBRR2_REG UBRR
446 #define UBRR3_REG UBRR
447 #define UBRR4_REG UBRR
448 #define UBRR5_REG UBRR
449 #define UBRR6_REG UBRR
450 #define UBRR7_REG UBRR
453 #define ADPS0_REG ADCSR
454 #define ADPS1_REG ADCSR
455 #define ADPS2_REG ADCSR
456 #define ADIE_REG ADCSR
457 #define ADIF_REG ADCSR
458 #define ADFR_REG ADCSR
459 #define ADSC_REG ADCSR
460 #define ADEN_REG ADCSR
473 #define TOV0_REG TIFR
474 #define TOV1_REG TIFR
475 #define OCF1B_REG TIFR
476 #define OCF1A_REG TIFR
477 #define ICF1_REG TIFR
478 #define TOV2_REG TIFR
479 #define OCF2_REG TIFR
482 #define EEAR8_REG EEARH
485 #define EEAR0_REG EEARL
486 #define EEAR1_REG EEARL
487 #define EEAR2_REG EEARL
488 #define EEAR3_REG EEARL
489 #define EEAR4_REG EEARL
490 #define EEAR5_REG EEARL
491 #define EEAR6_REG EEARL
492 #define EEAR7_REG EEARL
495 #define PINC0_REG PINC
496 #define PINC1_REG PINC
497 #define PINC2_REG PINC
498 #define PINC3_REG PINC
499 #define PINC4_REG PINC
500 #define PINC5_REG PINC
501 #define PINC6_REG PINC
502 #define PINC7_REG PINC
505 #define PINB0_REG PINB
506 #define PINB1_REG PINB
507 #define PINB2_REG PINB
508 #define PINB3_REG PINB
509 #define PINB4_REG PINB
510 #define PINB5_REG PINB
511 #define PINB6_REG PINB
512 #define PINB7_REG PINB
515 #define PINA0_REG PINA
516 #define PINA1_REG PINA
517 #define PINA2_REG PINA
518 #define PINA3_REG PINA
519 #define PINA4_REG PINA
520 #define PINA5_REG PINA
521 #define PINA6_REG PINA
522 #define PINA7_REG PINA
525 #define ISC00_REG MCUCR
526 #define ISC01_REG MCUCR
527 #define ISC10_REG MCUCR
528 #define ISC11_REG MCUCR
529 #define SM0_REG MCUCR
530 #define SM1_REG MCUCR
534 #define OCR1AH0_REG OCR1AH
535 #define OCR1AH1_REG OCR1AH
536 #define OCR1AH2_REG OCR1AH
537 #define OCR1AH3_REG OCR1AH
538 #define OCR1AH4_REG OCR1AH
539 #define OCR1AH5_REG OCR1AH
540 #define OCR1AH6_REG OCR1AH
541 #define OCR1AH7_REG OCR1AH
544 #define OCR1AL0_REG OCR1AL
545 #define OCR1AL1_REG OCR1AL
546 #define OCR1AL2_REG OCR1AL
547 #define OCR1AL3_REG OCR1AL
548 #define OCR1AL4_REG OCR1AL
549 #define OCR1AL5_REG OCR1AL
550 #define OCR1AL6_REG OCR1AL
551 #define OCR1AL7_REG OCR1AL
554 #define SPR0_REG SPCR
555 #define SPR1_REG SPCR
556 #define CPHA_REG SPCR
557 #define CPOL_REG SPCR
558 #define MSTR_REG SPCR
559 #define DORD_REG SPCR
561 #define SPIE_REG SPCR
564 #define OCR2_0_REG OCR2
565 #define OCR2_1_REG OCR2
566 #define OCR2_2_REG OCR2
567 #define OCR2_3_REG OCR2
568 #define OCR2_4_REG OCR2
569 #define OCR2_5_REG OCR2
570 #define OCR2_6_REG OCR2
571 #define OCR2_7_REG OCR2
574 #define TCR2UB_REG ASSR
575 #define OCR2UB_REG ASSR
576 #define TCN2UB_REG ASSR
580 #define ADC0_PORT PORTA
583 #define ADC1_PORT PORTA
586 #define ADC2_PORT PORTA
589 #define ADC3_PORT PORTA
592 #define ADC4_PORT PORTA
595 #define ADc5_PORT PORTA
598 #define ADC6_PORT PORTA
601 #define ADC7_PORT PORTA
604 #define T0_PORT PORTB
607 #define T1_PORT PORTB
610 #define AIN0_PORT PORTB
613 #define AIN1_PORT PORTB
616 #define SS_PORT PORTB
619 #define MOSI_PORT PORTB
622 #define MISO_PORT PORTB
632 #define TOSC1_PORT PORTC
635 #define TOSC2_PORT PORTC
638 #define RXD_PORT PORTD
641 #define TXD_PORT PORTD
644 #define INT0_PORT PORTD
647 #define INT1_PORT PORTD
650 #define OC1B_PORT PORTD
653 #define OC1A_PORT PORTD
656 #define ICP_PORT PORTD
659 #define OC2_PORT PORTD