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_2 2
50 #define TIMER1_PRESCALER_DIV_4 3
51 #define TIMER1_PRESCALER_DIV_8 4
52 #define TIMER1_PRESCALER_DIV_16 5
53 #define TIMER1_PRESCALER_DIV_32 6
54 #define TIMER1_PRESCALER_DIV_64 7
55 #define TIMER1_PRESCALER_DIV_128 8
56 #define TIMER1_PRESCALER_DIV_256 9
57 #define TIMER1_PRESCALER_DIV_512 10
58 #define TIMER1_PRESCALER_DIV_1024 11
59 #define TIMER1_PRESCALER_DIV_2048 12
60 #define TIMER1_PRESCALER_DIV_4096 13
61 #define TIMER1_PRESCALER_DIV_8192 14
62 #define TIMER1_PRESCALER_DIV_16384 15
64 #define TIMER1_PRESCALER_REG_0 0
65 #define TIMER1_PRESCALER_REG_1 1
66 #define TIMER1_PRESCALER_REG_2 2
67 #define TIMER1_PRESCALER_REG_3 4
68 #define TIMER1_PRESCALER_REG_4 8
69 #define TIMER1_PRESCALER_REG_5 16
70 #define TIMER1_PRESCALER_REG_6 32
71 #define TIMER1_PRESCALER_REG_7 64
72 #define TIMER1_PRESCALER_REG_8 128
73 #define TIMER1_PRESCALER_REG_9 256
74 #define TIMER1_PRESCALER_REG_10 512
75 #define TIMER1_PRESCALER_REG_11 1024
76 #define TIMER1_PRESCALER_REG_12 2048
77 #define TIMER1_PRESCALER_REG_13 4096
78 #define TIMER1_PRESCALER_REG_14 8192
79 #define TIMER1_PRESCALER_REG_15 16384
82 /* available timers */
83 #define TIMER0_AVAILABLE
84 #define TIMER0A_AVAILABLE
85 #define TIMER0B_AVAILABLE
86 #define TIMER1_AVAILABLE
87 #define TIMER1A_AVAILABLE
88 #define TIMER1B_AVAILABLE
90 /* overflow interrupt number */
91 #define SIG_OVERFLOW0_NUM 0
92 #define SIG_OVERFLOW1_NUM 1
93 #define SIG_OVERFLOW_TOTAL_NUM 2
95 /* output compare interrupt number */
96 #define SIG_OUTPUT_COMPARE0A_NUM 0
97 #define SIG_OUTPUT_COMPARE0B_NUM 1
98 #define SIG_OUTPUT_COMPARE1_NUM 2
99 #define SIG_OUTPUT_COMPARE1A_NUM 3
100 #define SIG_OUTPUT_COMPARE1B_NUM 4
101 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 5
109 #define PWM_TOTAL_NUM 5
111 /* input capture interrupt number */
112 #define SIG_INPUT_CAPTURE0_NUM 0
113 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
117 #define CLKPS0_REG CLKPR
118 #define CLKPS1_REG CLKPR
119 #define CLKPS2_REG CLKPR
120 #define CLKPS3_REG CLKPR
121 #define CLKPCE_REG CLKPR
124 #define WDP0_REG WDTCR
125 #define WDP1_REG WDTCR
126 #define WDP2_REG WDTCR
127 #define WDE_REG WDTCR
128 #define WDCE_REG WDTCR
129 #define WDP3_REG WDTCR
130 #define WDIE_REG WDTCR
131 #define WDIF_REG WDTCR
134 #define PCIE0_REG GIMSK
135 #define PCIE1_REG GIMSK
136 #define INT0_REG GIMSK
137 #define INT1_REG GIMSK
140 #define ADC0D_REG DIDR0
141 #define ADC1D_REG DIDR0
142 #define ADC2D_REG DIDR0
143 #define AREFD_REG DIDR0
144 #define ADC3D_REG DIDR0
145 #define ADC4D_REG DIDR0
146 #define ADC5D_REG DIDR0
147 #define ADC6D_REG DIDR0
150 #define MUX0_REG ADMUX
151 #define MUX1_REG ADMUX
152 #define MUX2_REG ADMUX
153 #define MUX3_REG ADMUX
154 #define MUX4_REG ADMUX
155 #define ADLAR_REG ADMUX
156 #define REFS0_REG ADMUX
157 #define REFS1_REG ADMUX
160 /* #define TCNT0_0_REG TCNT0H */ /* dup in TCNT0L */
161 /* #define TCNT0_1_REG TCNT0H */ /* dup in TCNT0L */
162 /* #define TCNT0_2_REG TCNT0H */ /* dup in TCNT0L */
163 /* #define TCNT0_3_REG TCNT0H */ /* dup in TCNT0L */
164 /* #define TCNT0_4_REG TCNT0H */ /* dup in TCNT0L */
165 /* #define TCNT0_5_REG TCNT0H */ /* dup in TCNT0L */
166 /* #define TCNT0_6_REG TCNT0H */ /* dup in TCNT0L */
167 /* #define TCNT0_7_REG TCNT0H */ /* dup in TCNT0L */
170 /* #define TCNT0_0_REG TCNT0L */ /* dup in TCNT0H */
171 /* #define TCNT0_1_REG TCNT0L */ /* dup in TCNT0H */
172 /* #define TCNT0_2_REG TCNT0L */ /* dup in TCNT0H */
173 /* #define TCNT0_3_REG TCNT0L */ /* dup in TCNT0H */
174 /* #define TCNT0_4_REG TCNT0L */ /* dup in TCNT0H */
175 /* #define TCNT0_5_REG TCNT0L */ /* dup in TCNT0H */
176 /* #define TCNT0_6_REG TCNT0L */ /* dup in TCNT0H */
177 /* #define TCNT0_7_REG TCNT0L */ /* dup in TCNT0H */
180 #define DDB0_REG DDRB
181 #define DDB1_REG DDRB
182 #define DDB2_REG DDRB
183 #define DDB3_REG DDRB
184 #define DDB4_REG DDRB
185 #define DDB5_REG DDRB
186 #define DDB6_REG DDRB
187 #define DDB7_REG DDRB
190 #define EEDR0_REG EEDR
191 #define EEDR1_REG EEDR
192 #define EEDR2_REG EEDR
193 #define EEDR3_REG EEDR
194 #define EEDR4_REG EEDR
195 #define EEDR5_REG EEDR
196 #define EEDR6_REG EEDR
197 #define EEDR7_REG EEDR
200 #define WGM10_REG TCCR1D
201 #define WGM11_REG TCCR1D
202 #define FPF1_REG TCCR1D
203 #define FPAC1_REG TCCR1D
204 #define FPES1_REG TCCR1D
205 #define FPNC1_REG TCCR1D
206 #define FPEN1_REG TCCR1D
207 #define FPIE1_REG TCCR1D
210 #define ISC00_REG MCUCR
211 #define ISC01_REG MCUCR
212 #define SM0_REG MCUCR
213 #define SM1_REG MCUCR
215 #define PUD_REG MCUCR
218 #define PWM1B_REG TCCR1A
219 #define PWM1A_REG TCCR1A
220 #define FOC1B_REG TCCR1A
221 #define FOC1A_REG TCCR1A
222 #define COM1B0_REG TCCR1A
223 #define COM1B1_REG TCCR1A
224 #define COM1A0_REG TCCR1A
225 #define COM1A1_REG TCCR1A
228 #define PWM1D_REG TCCR1C
229 #define FOC1D_REG TCCR1C
230 #define COM1D0_REG TCCR1C
231 #define COM1D1_REG TCCR1C
232 #define COM1B0S_REG TCCR1C
233 #define COM1B1S_REG TCCR1C
234 #define COM1A0S_REG TCCR1C
235 #define COM1A1S_REG TCCR1C
238 #define CS10_REG TCCR1B
239 #define CS11_REG TCCR1B
240 #define CS12_REG TCCR1B
241 #define CS13_REG TCCR1B
242 #define DTPS10_REG TCCR1B
243 #define DTPS11_REG TCCR1B
244 #define PSR1_REG TCCR1B
247 #define PCIF_REG GIFR
248 #define INTF0_REG GIFR
249 #define INTF1_REG GIFR
252 #define TICIE0_REG TIMSK
253 #define TOIE0_REG TIMSK
254 #define OCIE0B_REG TIMSK
255 #define OCIE0A_REG TIMSK
256 #define TOIE1_REG TIMSK
257 #define OCIE1B_REG TIMSK
258 #define OCIE1A_REG TIMSK
259 #define OCIE1D_REG TIMSK
262 #define DDA0_REG DDRA
263 #define DDA1_REG DDRA
264 #define DDA2_REG DDRA
265 #define DDA3_REG DDRA
266 #define DDA4_REG DDRA
267 #define DDA5_REG DDRA
268 #define DDA6_REG DDRA
269 #define DDA7_REG DDRA
272 #define ADPS0_REG ADCSRA
273 #define ADPS1_REG ADCSRA
274 #define ADPS2_REG ADCSRA
275 #define ADIE_REG ADCSRA
276 #define ADIF_REG ADCSRA
277 #define ADATE_REG ADCSRA
278 #define ADSC_REG ADCSRA
279 #define ADEN_REG ADCSRA
282 #define ACM0_REG ACSRB
283 #define ACM1_REG ACSRB
284 #define ACM2_REG ACSRB
285 #define HLEV_REG ACSRB
286 #define HSEL_REG ACSRB
289 #define ADTS0_REG ADCSRB
290 #define ADTS1_REG ADCSRB
291 #define ADTS2_REG ADCSRB
292 #define MUX5_REG ADCSRB
293 #define REFS2_REG ADCSRB
294 #define IPR_REG ADCSRB
295 #define GSEL_REG ADCSRB
296 #define BIN_REG ADCSRB
299 #define TC18_REG TC1H
300 #define TC19_REG TC1H
303 #define OC1OE0_REG TCCR1E
304 #define OC1OE1_REG TCCR1E
305 #define OC1OE2_REG TCCR1E
306 #define OC1OE3_REG TCCR1E
307 #define OC1OE4_REG TCCR1E
308 #define OC1OE5_REG TCCR1E
311 /* #define OCR0_0_REG OCR0A */ /* dup in OCR0B */
312 /* #define OCR0_1_REG OCR0A */ /* dup in OCR0B */
313 /* #define OCR0_2_REG OCR0A */ /* dup in OCR0B */
314 /* #define OCR0_3_REG OCR0A */ /* dup in OCR0B */
315 /* #define OCR0_4_REG OCR0A */ /* dup in OCR0B */
316 /* #define OCR0_5_REG OCR0A */ /* dup in OCR0B */
317 /* #define OCR0_6_REG OCR0A */ /* dup in OCR0B */
318 /* #define OCR0_7_REG OCR0A */ /* dup in OCR0B */
321 /* #define OCR0_0_REG OCR0B */ /* dup in OCR0A */
322 /* #define OCR0_1_REG OCR0B */ /* dup in OCR0A */
323 /* #define OCR0_2_REG OCR0B */ /* dup in OCR0A */
324 /* #define OCR0_3_REG OCR0B */ /* dup in OCR0A */
325 /* #define OCR0_4_REG OCR0B */ /* dup in OCR0A */
326 /* #define OCR0_5_REG OCR0B */ /* dup in OCR0A */
327 /* #define OCR0_6_REG OCR0B */ /* dup in OCR0A */
328 /* #define OCR0_7_REG OCR0B */ /* dup in OCR0A */
345 #define PRADC_REG PRR
346 #define PRUSI_REG PRR
347 #define PRTIM0_REG PRR
348 #define PRTIM1_REG PRR
351 #define GPIOR10_REG GPIOR1
352 #define GPIOR11_REG GPIOR1
353 #define GPIOR12_REG GPIOR1
354 #define GPIOR13_REG GPIOR1
355 #define GPIOR14_REG GPIOR1
356 #define GPIOR15_REG GPIOR1
357 #define GPIOR16_REG GPIOR1
358 #define GPIOR17_REG GPIOR1
361 #define GPIOR00_REG GPIOR0
362 #define GPIOR01_REG GPIOR0
363 #define GPIOR02_REG GPIOR0
364 #define GPIOR03_REG GPIOR0
365 #define GPIOR04_REG GPIOR0
366 #define GPIOR05_REG GPIOR0
367 #define GPIOR06_REG GPIOR0
368 #define GPIOR07_REG GPIOR0
371 #define USITC_REG USICR
372 #define USICLK_REG USICR
373 #define USICS0_REG USICR
374 #define USICS1_REG USICR
375 #define USIWM0_REG USICR
376 #define USIWM1_REG USICR
377 #define USIOIE_REG USICR
378 #define USISIE_REG USICR
381 #define PORF_REG MCUSR
382 #define EXTRF_REG MCUSR
383 #define BORF_REG MCUSR
384 #define WDRF_REG MCUSR
387 #define EERE_REG EECR
388 #define EEPE_REG EECR
389 #define EEMPE_REG EECR
390 #define EERIE_REG EECR
391 #define EEPM0_REG EECR
392 #define EEPM1_REG EECR
395 #define SPMEN_REG SPMCSR
396 #define PGERS_REG SPMCSR
397 #define PGWRT_REG SPMCSR
398 #define RFLB_REG SPMCSR
399 #define CTPB_REG SPMCSR
402 #define CAL0_REG OSCCAL
403 #define CAL1_REG OSCCAL
404 #define CAL2_REG OSCCAL
405 #define CAL3_REG OSCCAL
406 #define CAL4_REG OSCCAL
407 #define CAL5_REG OSCCAL
408 #define CAL6_REG OSCCAL
409 #define CAL7_REG OSCCAL
412 #define ADCL0_REG ADCL
413 #define ADCL1_REG ADCL
414 #define ADCL2_REG ADCL
415 #define ADCL3_REG ADCL
416 #define ADCL4_REG ADCL
417 #define ADCL5_REG ADCL
418 #define ADCL6_REG ADCL
419 #define ADCL7_REG ADCL
422 #define USICNT0_REG USISR
423 #define USICNT1_REG USISR
424 #define USICNT2_REG USISR
425 #define USICNT3_REG USISR
426 #define USIDC_REG USISR
427 #define USIPF_REG USISR
428 #define USIOIF_REG USISR
429 #define USISIF_REG USISR
432 #define PORTB0_REG PORTB
433 #define PORTB1_REG PORTB
434 #define PORTB2_REG PORTB
435 #define PORTB3_REG PORTB
436 #define PORTB4_REG PORTB
437 #define PORTB5_REG PORTB
438 #define PORTB6_REG PORTB
439 #define PORTB7_REG PORTB
442 #define ADCH0_REG ADCH
443 #define ADCH1_REG ADCH
444 #define ADCH2_REG ADCH
445 #define ADCH3_REG ADCH
446 #define ADCH4_REG ADCH
447 #define ADCH5_REG ADCH
448 #define ADCH6_REG ADCH
449 #define ADCH7_REG ADCH
452 #define PORTA0_REG PORTA
453 #define PORTA1_REG PORTA
454 #define PORTA2_REG PORTA
455 #define PORTA3_REG PORTA
456 #define PORTA4_REG PORTA
457 #define PORTA5_REG PORTA
458 #define PORTA6_REG PORTA
459 #define PORTA7_REG PORTA
462 #define ACIS0_REG ACSRA
463 #define ACIS1_REG ACSRA
464 #define ACME_REG ACSRA
465 #define ACIE_REG ACSRA
466 #define ACI_REG ACSRA
467 #define ACO_REG ACSRA
468 #define ACBG_REG ACSRA
469 #define ACD_REG ACSRA
472 #define TC1H_0_REG TCNT1
473 #define TC1H_1_REG TCNT1
474 #define TC1H_2_REG TCNT1
475 #define TC1H_3_REG TCNT1
476 #define TC1H_4_REG TCNT1
477 #define TC1H_5_REG TCNT1
478 #define TC1H_6_REG TCNT1
479 #define TC1H_7_REG TCNT1
482 #define EEAR0_REG EEARL
483 #define EEAR1_REG EEARL
484 #define EEAR2_REG EEARL
485 #define EEAR3_REG EEARL
486 #define EEAR4_REG EEARL
487 #define EEAR5_REG EEARL
488 #define EEAR6_REG EEARL
489 #define EEAR7_REG EEARL
502 #define CS00_REG TCCR0B
503 #define CS01_REG TCCR0B
504 #define CS02_REG TCCR0B
505 #define PSR0_REG TCCR0B
506 #define TSM_REG TCCR0B
509 #define ICF0_REG TIFR
510 #define TOV0_REG TIFR
511 #define OCF0B_REG TIFR
512 #define OCF0A_REG TIFR
513 #define TOV1_REG TIFR
514 #define OCF1B_REG TIFR
515 #define OCF1A_REG TIFR
516 #define OCF1D_REG TIFR
519 #define WGM00_REG TCCR0A
520 #define ACIC0_REG TCCR0A
521 #define ICES0_REG TCCR0A
522 #define ICNC0_REG TCCR0A
523 #define ICEN0_REG TCCR0A
524 #define TCW0_REG TCCR0A
527 #define EEAR8_REG EEARH
530 #define PLOCK_REG PLLCSR
531 #define PLLE_REG PLLCSR
532 #define PCKE_REG PLLCSR
533 #define LSM_REG PLLCSR
536 #define GPIOR20_REG GPIOR2
537 #define GPIOR21_REG GPIOR2
538 #define GPIOR22_REG GPIOR2
539 #define GPIOR23_REG GPIOR2
540 #define GPIOR24_REG GPIOR2
541 #define GPIOR25_REG GPIOR2
542 #define GPIOR26_REG GPIOR2
543 #define GPIOR27_REG GPIOR2
546 #define PCINT0_REG PCMSK0
547 #define PCINT1_REG PCMSK0
548 #define PCINT2_REG PCMSK0
549 #define PCINT3_REG PCMSK0
550 #define PCINT4_REG PCMSK0
551 #define PCINT5_REG PCMSK0
552 #define PCINT6_REG PCMSK0
553 #define PCINT7_REG PCMSK0
556 #define PCINT8_REG PCMSK1
557 #define PCINT9_REG PCMSK1
558 #define PCINT10_REG PCMSK1
559 #define PCINT11_REG PCMSK1
560 #define PCINT12_REG PCMSK1
561 #define PCINT13_REG PCMSK1
562 #define PCINT14_REG PCMSK1
563 #define PCINT15_REG PCMSK1
566 #define DWDR0_REG DWDR
567 #define DWDR1_REG DWDR
568 #define DWDR2_REG DWDR
569 #define DWDR3_REG DWDR
570 #define DWDR4_REG DWDR
571 #define DWDR5_REG DWDR
572 #define DWDR6_REG DWDR
573 #define DWDR7_REG DWDR
576 #define OCR1D0_REG OCR1D
577 #define OCR1D1_REG OCR1D
578 #define OCR1D2_REG OCR1D
579 #define OCR1D3_REG OCR1D
580 #define OCR1D4_REG OCR1D
581 #define OCR1D5_REG OCR1D
582 #define OCR1D6_REG OCR1D
583 /* #define OCR1C7_REG OCR1D */ /* dup in OCR1C */
586 #define OCR1B0_REG OCR1B
587 #define OCR1B1_REG OCR1B
588 #define OCR1B2_REG OCR1B
589 #define OCR1B3_REG OCR1B
590 #define OCR1B4_REG OCR1B
591 #define OCR1B5_REG OCR1B
592 #define OCR1B6_REG OCR1B
593 #define OCR1B7_REG OCR1B
596 #define OCR1C0_REG OCR1C
597 #define OCR1C1_REG OCR1C
598 #define OCR1C2_REG OCR1C
599 #define OCR1C3_REG OCR1C
600 #define OCR1C4_REG OCR1C
601 #define OCR1C5_REG OCR1C
602 #define OCR1C6_REG OCR1C
603 /* #define OCR1C7_REG OCR1C */ /* dup in OCR1D */
606 #define OCR1A0_REG OCR1A
607 #define OCR1A1_REG OCR1A
608 #define OCR1A2_REG OCR1A
609 #define OCR1A3_REG OCR1A
610 #define OCR1A4_REG OCR1A
611 #define OCR1A5_REG OCR1A
612 #define OCR1A6_REG OCR1A
613 #define OCR1A7_REG OCR1A
616 #define USIPOS_REG USIPP
619 #define PINB0_REG PINB
620 #define PINB1_REG PINB
621 #define PINB2_REG PINB
622 #define PINB3_REG PINB
623 #define PINB4_REG PINB
624 #define PINB5_REG PINB
625 #define PINB6_REG PINB
626 #define PINB7_REG PINB
629 #define USIBR0_REG USIBR
630 #define USIBR1_REG USIBR
631 #define USIBR2_REG USIBR
632 #define USIBR3_REG USIBR
633 #define USIBR4_REG USIBR
634 #define USIBR5_REG USIBR
635 #define USIBR6_REG USIBR
636 #define USIBR7_REG USIBR
639 #define DT1L0_REG DT1
640 #define DT1L1_REG DT1
641 #define DT1L2_REG DT1
642 #define DT1L3_REG DT1
643 #define DT1H0_REG DT1
644 #define DT1H1_REG DT1
645 #define DT1H2_REG DT1
646 #define DT1H3_REG DT1
649 #define PINA0_REG PINA
650 #define PINA1_REG PINA
651 #define PINA2_REG PINA
652 #define PINA3_REG PINA
653 #define PINA4_REG PINA
654 #define PINA5_REG PINA
655 #define PINA6_REG PINA
656 #define PINA7_REG PINA
659 #define USIDR0_REG USIDR
660 #define USIDR1_REG USIDR
661 #define USIDR2_REG USIDR
662 #define USIDR3_REG USIDR
663 #define USIDR4_REG USIDR
664 #define USIDR5_REG USIDR
665 #define USIDR6_REG USIDR
666 #define USIDR7_REG USIDR
669 #define ADC7D_REG DIDR1
670 #define ADC8D_REG DIDR1
671 #define ADC9D_REG DIDR1
672 #define ADC10D_REG DIDR1