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_COMPARE1A_NUM 2
99 #define SIG_OUTPUT_COMPARE1B_NUM 3
100 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 4
107 #define PWM_TOTAL_NUM 4
109 /* input capture interrupt number */
110 #define SIG_INPUT_CAPTURE_TOTAL_NUM 0
114 #define CLKPS0_REG CLKPR
115 #define CLKPS1_REG CLKPR
116 #define CLKPS2_REG CLKPR
117 #define CLKPS3_REG CLKPR
118 #define CLKPCE_REG CLKPR
121 #define WDP0_REG WDTCR
122 #define WDP1_REG WDTCR
123 #define WDP2_REG WDTCR
124 #define WDE_REG WDTCR
125 #define WDCE_REG WDTCR
126 #define WDP3_REG WDTCR
127 #define WDIE_REG WDTCR
128 #define WDIF_REG WDTCR
131 #define PCIE_REG GIMSK
132 #define INT0_REG GIMSK
135 #define AIN0D_REG DIDR0
136 #define AIN1D_REG DIDR0
137 #define ADC1D_REG DIDR0
138 #define ADC3D_REG DIDR0
139 #define ADC2D_REG DIDR0
140 #define ADC0D_REG DIDR0
143 #define MUX0_REG ADMUX
144 #define MUX1_REG ADMUX
145 #define MUX2_REG ADMUX
146 #define MUX3_REG ADMUX
147 #define REFS2_REG ADMUX
148 #define ADLAR_REG ADMUX
149 #define REFS0_REG ADMUX
150 #define REFS1_REG ADMUX
153 #define CS10_REG TCCR1
154 #define CS11_REG TCCR1
155 #define CS12_REG TCCR1
156 #define CS13_REG TCCR1
157 #define COM1A0_REG TCCR1
158 #define COM1A1_REG TCCR1
159 #define PWM1A_REG TCCR1
160 #define CTC1_REG TCCR1
173 #define DDB0_REG DDRB
174 #define DDB1_REG DDRB
175 #define DDB2_REG DDRB
176 #define DDB3_REG DDRB
177 #define DDB4_REG DDRB
178 #define DDB5_REG DDRB
181 #define EEDR0_REG EEDR
182 #define EEDR1_REG EEDR
183 #define EEDR2_REG EEDR
184 #define EEDR3_REG EEDR
185 #define EEDR4_REG EEDR
186 #define EEDR5_REG EEDR
187 #define EEDR6_REG EEDR
188 #define EEDR7_REG EEDR
191 #define ISC00_REG MCUCR
192 #define ISC01_REG MCUCR
193 #define BODSE_REG MCUCR
194 #define SM0_REG MCUCR
195 #define SM1_REG MCUCR
197 #define PUD_REG MCUCR
198 #define BODS_REG MCUCR
201 #define PSR0_REG GTCCR
202 #define TSM_REG GTCCR
203 #define PSR1_REG GTCCR
204 #define FOC1A_REG GTCCR
205 #define FOC1B_REG GTCCR
206 #define COM1B0_REG GTCCR
207 #define COM1B1_REG GTCCR
208 #define PWM1B_REG GTCCR
211 #define DTPS0_REG DTPS
212 #define DTPS1_REG DTPS
215 #define PCIF_REG GIFR
216 #define INTF0_REG GIFR
219 #define TOIE0_REG TIMSK
220 #define OCIE0B_REG TIMSK
221 #define OCIE0A_REG TIMSK
222 #define TOIE1_REG TIMSK
223 #define OCIE1B_REG TIMSK
224 #define OCIE1A_REG TIMSK
227 #define ADPS0_REG ADCSRA
228 #define ADPS1_REG ADCSRA
229 #define ADPS2_REG ADCSRA
230 #define ADIE_REG ADCSRA
231 #define ADIF_REG ADCSRA
232 #define ADATE_REG ADCSRA
233 #define ADSC_REG ADCSRA
234 #define ADEN_REG ADCSRA
237 /* #define DTVL0_REG DT1B */ /* dup in DT1A */
238 /* #define DTVL1_REG DT1B */ /* dup in DT1A */
239 /* #define DTVL2_REG DT1B */ /* dup in DT1A */
240 /* #define DTVL3_REG DT1B */ /* dup in DT1A */
241 /* #define DTVH0_REG DT1B */ /* dup in DT1A */
242 /* #define DTVH1_REG DT1B */ /* dup in DT1A */
243 /* #define DTVH2_REG DT1B */ /* dup in DT1A */
244 /* #define DTVH3_REG DT1B */ /* dup in DT1A */
247 /* #define OCR0_0_REG OCR0A */ /* dup in OCR0B */
248 /* #define OCR0_1_REG OCR0A */ /* dup in OCR0B */
249 /* #define OCR0_2_REG OCR0A */ /* dup in OCR0B */
250 /* #define OCR0_3_REG OCR0A */ /* dup in OCR0B */
251 /* #define OCR0_4_REG OCR0A */ /* dup in OCR0B */
252 /* #define OCR0_5_REG OCR0A */ /* dup in OCR0B */
253 /* #define OCR0_6_REG OCR0A */ /* dup in OCR0B */
254 /* #define OCR0_7_REG OCR0A */ /* dup in OCR0B */
257 /* #define OCR0_0_REG OCR0B */ /* dup in OCR0A */
258 /* #define OCR0_1_REG OCR0B */ /* dup in OCR0A */
259 /* #define OCR0_2_REG OCR0B */ /* dup in OCR0A */
260 /* #define OCR0_3_REG OCR0B */ /* dup in OCR0A */
261 /* #define OCR0_4_REG OCR0B */ /* dup in OCR0A */
262 /* #define OCR0_5_REG OCR0B */ /* dup in OCR0A */
263 /* #define OCR0_6_REG OCR0B */ /* dup in OCR0A */
264 /* #define OCR0_7_REG OCR0B */ /* dup in OCR0A */
281 #define PRADC_REG PRR
282 #define PRUSI_REG PRR
283 #define PRTIM0_REG PRR
284 #define PRTIM1_REG PRR
287 #define GPIOR10_REG GPIOR1
288 #define GPIOR11_REG GPIOR1
289 #define GPIOR12_REG GPIOR1
290 #define GPIOR13_REG GPIOR1
291 #define GPIOR14_REG GPIOR1
292 #define GPIOR15_REG GPIOR1
293 #define GPIOR16_REG GPIOR1
294 #define GPIOR17_REG GPIOR1
297 #define GPIOR00_REG GPIOR0
298 #define GPIOR01_REG GPIOR0
299 #define GPIOR02_REG GPIOR0
300 #define GPIOR03_REG GPIOR0
301 #define GPIOR04_REG GPIOR0
302 #define GPIOR05_REG GPIOR0
303 #define GPIOR06_REG GPIOR0
304 #define GPIOR07_REG GPIOR0
307 #define GPIOR20_REG GPIOR2
308 #define GPIOR21_REG GPIOR2
309 #define GPIOR22_REG GPIOR2
310 #define GPIOR23_REG GPIOR2
311 #define GPIOR24_REG GPIOR2
312 #define GPIOR25_REG GPIOR2
313 #define GPIOR26_REG GPIOR2
314 #define GPIOR27_REG GPIOR2
317 #define PORF_REG MCUSR
318 #define EXTRF_REG MCUSR
319 #define BORF_REG MCUSR
320 #define WDRF_REG MCUSR
323 #define EERE_REG EECR
324 #define EEPE_REG EECR
325 #define EEMPE_REG EECR
326 #define EERIE_REG EECR
327 #define EEPM0_REG EECR
328 #define EEPM1_REG EECR
331 #define PCINT0_REG PCMSK
332 #define PCINT1_REG PCMSK
333 #define PCINT2_REG PCMSK
334 #define PCINT3_REG PCMSK
335 #define PCINT4_REG PCMSK
336 #define PCINT5_REG PCMSK
339 #define SPMEN_REG SPMCSR
340 #define PGERS_REG SPMCSR
341 #define PGWRT_REG SPMCSR
342 #define RFLB_REG SPMCSR
343 #define CTPB_REG SPMCSR
346 #define CAL0_REG OSCCAL
347 #define CAL1_REG OSCCAL
348 #define CAL2_REG OSCCAL
349 #define CAL3_REG OSCCAL
350 #define CAL4_REG OSCCAL
351 #define CAL5_REG OSCCAL
352 #define CAL6_REG OSCCAL
353 #define CAL7_REG OSCCAL
356 #define ADCL0_REG ADCL
357 #define ADCL1_REG ADCL
358 #define ADCL2_REG ADCL
359 #define ADCL3_REG ADCL
360 #define ADCL4_REG ADCL
361 #define ADCL5_REG ADCL
362 #define ADCL6_REG ADCL
363 #define ADCL7_REG ADCL
366 #define USICNT0_REG USISR
367 #define USICNT1_REG USISR
368 #define USICNT2_REG USISR
369 #define USICNT3_REG USISR
370 #define USIDC_REG USISR
371 #define USIPF_REG USISR
372 #define USIOIF_REG USISR
373 #define USISIF_REG USISR
376 #define PORTB0_REG PORTB
377 #define PORTB1_REG PORTB
378 #define PORTB2_REG PORTB
379 #define PORTB3_REG PORTB
380 #define PORTB4_REG PORTB
381 #define PORTB5_REG PORTB
384 #define ADCH0_REG ADCH
385 #define ADCH1_REG ADCH
386 #define ADCH2_REG ADCH
387 #define ADCH3_REG ADCH
388 #define ADCH4_REG ADCH
389 #define ADCH5_REG ADCH
390 #define ADCH6_REG ADCH
391 #define ADCH7_REG ADCH
394 #define TCNT0_0_REG TCNT0
395 #define TCNT0_1_REG TCNT0
396 #define TCNT0_2_REG TCNT0
397 #define TCNT0_3_REG TCNT0
398 #define TCNT0_4_REG TCNT0
399 #define TCNT0_5_REG TCNT0
400 #define TCNT0_6_REG TCNT0
401 #define TCNT0_7_REG TCNT0
404 #define TCNT1_0_REG TCNT1
405 #define TCNT1_1_REG TCNT1
406 #define TCNT1_2_REG TCNT1
407 #define TCNT1_3_REG TCNT1
408 #define TCNT1_4_REG TCNT1
409 #define TCNT1_5_REG TCNT1
410 #define TCNT1_6_REG TCNT1
411 #define TCNT1_7_REG TCNT1
414 #define CS00_REG TCCR0B
415 #define CS01_REG TCCR0B
416 #define CS02_REG TCCR0B
417 #define WGM02_REG TCCR0B
418 #define FOC0B_REG TCCR0B
419 #define FOC0A_REG TCCR0B
422 #define TOV0_REG TIFR
423 #define OCF0B_REG TIFR
424 #define OCF0A_REG TIFR
425 #define TOV1_REG TIFR
426 #define OCF1B_REG TIFR
427 #define OCF1A_REG TIFR
430 #define WGM00_REG TCCR0A
431 #define WGM01_REG TCCR0A
432 #define COM0B0_REG TCCR0A
433 #define COM0B1_REG TCCR0A
434 #define COM0A0_REG TCCR0A
435 #define COM0A1_REG TCCR0A
438 #define EEAR8_REG EEARH
441 #define PLOCK_REG PLLCSR
442 #define PLLE_REG PLLCSR
443 #define PCKE_REG PLLCSR
444 #define LSM_REG PLLCSR
447 #define USITC_REG USICR
448 #define USICLK_REG USICR
449 #define USICS0_REG USICR
450 #define USICS1_REG USICR
451 #define USIWM0_REG USICR
452 #define USIWM1_REG USICR
453 #define USIOIE_REG USICR
454 #define USISIE_REG USICR
457 #define EEAR0_REG EEARL
458 #define EEAR1_REG EEARL
459 #define EEAR2_REG EEARL
460 #define EEAR3_REG EEARL
461 #define EEAR4_REG EEARL
462 #define EEAR5_REG EEARL
463 #define EEAR6_REG EEARL
464 #define EEAR7_REG EEARL
467 #define DWDR0_REG DWDR
468 #define DWDR1_REG DWDR
469 #define DWDR2_REG DWDR
470 #define DWDR3_REG DWDR
471 #define DWDR4_REG DWDR
472 #define DWDR5_REG DWDR
473 #define DWDR6_REG DWDR
474 #define DWDR7_REG DWDR
477 #define ACME_REG ADCSRB
478 #define ADTS0_REG ADCSRB
479 #define ADTS1_REG ADCSRB
480 #define ADTS2_REG ADCSRB
481 #define IPR_REG ADCSRB
482 #define BIN_REG ADCSRB
485 #define OCR1B0_REG OCR1B
486 #define OCR1B1_REG OCR1B
487 #define OCR1B2_REG OCR1B
488 #define OCR1B3_REG OCR1B
489 #define OCR1B4_REG OCR1B
490 #define OCR1B5_REG OCR1B
491 #define OCR1B6_REG OCR1B
492 #define OCR1B7_REG OCR1B
495 #define OCR1C0_REG OCR1C
496 #define OCR1C1_REG OCR1C
497 #define OCR1C2_REG OCR1C
498 #define OCR1C3_REG OCR1C
499 #define OCR1C4_REG OCR1C
500 #define OCR1C5_REG OCR1C
501 #define OCR1C6_REG OCR1C
502 #define OCR1C7_REG OCR1C
505 /* #define DTVL0_REG DT1A */ /* dup in DT1B */
506 /* #define DTVL1_REG DT1A */ /* dup in DT1B */
507 /* #define DTVL2_REG DT1A */ /* dup in DT1B */
508 /* #define DTVL3_REG DT1A */ /* dup in DT1B */
509 /* #define DTVH0_REG DT1A */ /* dup in DT1B */
510 /* #define DTVH1_REG DT1A */ /* dup in DT1B */
511 /* #define DTVH2_REG DT1A */ /* dup in DT1B */
512 /* #define DTVH3_REG DT1A */ /* dup in DT1B */
515 #define OCR1A0_REG OCR1A
516 #define OCR1A1_REG OCR1A
517 #define OCR1A2_REG OCR1A
518 #define OCR1A3_REG OCR1A
519 #define OCR1A4_REG OCR1A
520 #define OCR1A5_REG OCR1A
521 #define OCR1A6_REG OCR1A
522 #define OCR1A7_REG OCR1A
525 #define ACIS0_REG ACSR
526 #define ACIS1_REG ACSR
527 #define ACIE_REG ACSR
530 #define ACBG_REG ACSR
534 #define PINB0_REG PINB
535 #define PINB1_REG PINB
536 #define PINB2_REG PINB
537 #define PINB3_REG PINB
538 #define PINB4_REG PINB
539 #define PINB5_REG PINB
542 #define USIBR0_REG USIBR
543 #define USIBR1_REG USIBR
544 #define USIBR2_REG USIBR
545 #define USIBR3_REG USIBR
546 #define USIBR4_REG USIBR
547 #define USIBR5_REG USIBR
548 #define USIBR6_REG USIBR
549 #define USIBR7_REG USIBR
552 #define USIDR0_REG USIDR
553 #define USIDR1_REG USIDR
554 #define USIDR2_REG USIDR
555 #define USIDR3_REG USIDR
556 #define USIDR4_REG USIDR
557 #define USIDR5_REG USIDR
558 #define USIDR6_REG USIDR
559 #define USIDR7_REG USIDR
562 #define MOSI_PORT PORTB
564 #define DI_PORT PORTB
566 #define SDA_PORT PORTB
568 #define AIN0_PORT PORTB
570 #define OC0A_PORT PORTB
572 #define OC1A_PORT PORTB
574 #define AREF_PORT PORTB
576 #define PCINT0_PORT PORTB
579 #define MISO_PORT PORTB
581 #define DO_PORT PORTB
583 #define AIN1_PORT PORTB
585 #define OC0B_PORT PORTB
587 #define OC1A_PORT PORTB
589 #define PCINT1_PORT PORTB
592 #define SCK_PORT PORTB
594 #define USCK_PORT PORTB
596 #define SCL_PORT PORTB
598 #define ADC1_PORT PORTB
600 #define T0_PORT PORTB
602 #define INT0_PORT PORTB
604 #define PCINT2_PORT PORTB
607 #define ADC3_PORT PORTB
609 #define OC1B_PORT PORTB
611 #define XTAL1_PORT PORTB
613 #define PCINT4_PORT PORTB
616 #define ADC2_PORT PORTB
618 #define OC1B_PORT PORTB
620 #define XTAL2_PORT PORTB
622 #define PCINT3_PORT PORTB
625 #define RESET_PORT PORTB
627 #define ADC0_PORT PORTB
629 #define PCINT5_PORT PORTB
631 #define dW_PORT PORTB