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
66 /* available timers */
67 #define TIMER0_AVAILABLE
68 #define TIMER1_AVAILABLE
69 #define TIMER1A_AVAILABLE
70 #define TIMER1B_AVAILABLE
72 /* overflow interrupt number */
73 #define SIG_OVERFLOW0_NUM 0
74 #define SIG_OVERFLOW1_NUM 1
75 #define SIG_OVERFLOW_TOTAL_NUM 2
77 /* output compare interrupt number */
78 #define SIG_OUTPUT_COMPARE0_NUM 0
79 #define SIG_OUTPUT_COMPARE1A_NUM 1
80 #define SIG_OUTPUT_COMPARE1B_NUM 2
81 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 3
87 #define PWM_TOTAL_NUM 3
89 /* input capture interrupt number */
90 #define SIG_INPUT_CAPTURE1_NUM 0
91 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
95 #define UCPOL_REG UCSRC
96 #define UCSZ0_REG UCSRC
97 #define UCSZ1_REG UCSRC
98 #define USBS_REG UCSRC
99 #define UPM0_REG UCSRC
100 #define UPM1_REG UCSRC
101 #define UMSEL_REG UCSRC
102 /* #define URSEL_REG UCSRC */ /* dup in UBRRH */
105 #define WDP0_REG WDTCR
106 #define WDP1_REG WDTCR
107 #define WDP2_REG WDTCR
108 #define WDE_REG WDTCR
109 #define WDCE_REG WDTCR
112 #define ICR1H0_REG ICR1H
113 #define ICR1H1_REG ICR1H
114 #define ICR1H2_REG ICR1H
115 #define ICR1H3_REG ICR1H
116 #define ICR1H4_REG ICR1H
117 #define ICR1H5_REG ICR1H
118 #define ICR1H6_REG ICR1H
119 #define ICR1H7_REG ICR1H
122 #define CS00_REG TCCR0
123 #define CS01_REG TCCR0
124 #define CS02_REG TCCR0
125 #define WGM01_REG TCCR0
126 #define COM00_REG TCCR0
127 #define COM01_REG TCCR0
128 #define WGM00_REG TCCR0
129 #define FOC0_REG TCCR0
142 #define DDB0_REG DDRB
143 #define DDB1_REG DDRB
144 #define DDB2_REG DDRB
145 #define DDB3_REG DDRB
146 #define DDB4_REG DDRB
147 #define DDB5_REG DDRB
148 #define DDB6_REG DDRB
149 #define DDB7_REG DDRB
152 #define IVCE_REG GICR
153 #define IVSEL_REG GICR
154 #define INT2_REG GICR
155 #define INT0_REG GICR
156 #define INT1_REG GICR
159 #define SPI2X_REG SPSR
160 #define WCOL_REG SPSR
161 #define SPIF_REG SPSR
164 #define EEDR0_REG EEDR
165 #define EEDR1_REG EEDR
166 #define EEDR2_REG EEDR
167 #define EEDR3_REG EEDR
168 #define EEDR4_REG EEDR
169 #define EEDR5_REG EEDR
170 #define EEDR6_REG EEDR
171 #define EEDR7_REG EEDR
174 #define DDC0_REG DDRC
175 #define DDC1_REG DDRC
176 #define DDC2_REG DDRC
177 #define DDC3_REG DDRC
178 #define DDC4_REG DDRC
179 #define DDC5_REG DDRC
180 #define DDC6_REG DDRC
181 #define DDC7_REG DDRC
184 #define DDA0_REG DDRA
185 #define DDA1_REG DDRA
186 #define DDA2_REG DDRA
187 #define DDA3_REG DDRA
188 #define DDA4_REG DDRA
189 #define DDA5_REG DDRA
190 #define DDA6_REG DDRA
191 #define DDA7_REG DDRA
194 #define WGM10_REG TCCR1A
195 #define WGM11_REG TCCR1A
196 #define FOC1B_REG TCCR1A
197 #define FOC1A_REG TCCR1A
198 #define COM1B0_REG TCCR1A
199 #define COM1B1_REG TCCR1A
200 #define COM1A0_REG TCCR1A
201 #define COM1A1_REG TCCR1A
204 #define DDD0_REG DDRD
205 #define DDD1_REG DDRD
206 #define DDD2_REG DDRD
207 #define DDD3_REG DDRD
208 #define DDD4_REG DDRD
209 #define DDD5_REG DDRD
210 #define DDD6_REG DDRD
211 #define DDD7_REG DDRD
214 #define CS10_REG TCCR1B
215 #define CS11_REG TCCR1B
216 #define CS12_REG TCCR1B
217 #define WGM12_REG TCCR1B
218 #define WGM13_REG TCCR1B
219 #define ICES1_REG TCCR1B
220 #define ICNC1_REG TCCR1B
223 #define INTF2_REG GIFR
224 #define INTF0_REG GIFR
225 #define INTF1_REG GIFR
228 #define OCIE0_REG TIMSK
229 #define TOIE0_REG TIMSK
230 #define TICIE1_REG TIMSK
231 #define OCIE1B_REG TIMSK
232 #define OCIE1A_REG TIMSK
233 #define TOIE1_REG TIMSK
236 #define MPCM_REG UCSRA
237 #define U2X_REG UCSRA
238 #define UPE_REG UCSRA
239 #define DOR_REG UCSRA
241 #define UDRE_REG UCSRA
242 #define TXC_REG UCSRA
243 #define RXC_REG UCSRA
246 #define SPDR0_REG SPDR
247 #define SPDR1_REG SPDR
248 #define SPDR2_REG SPDR
249 #define SPDR3_REG SPDR
250 #define SPDR4_REG SPDR
251 #define SPDR5_REG SPDR
252 #define SPDR6_REG SPDR
253 #define SPDR7_REG SPDR
256 #define PSR10_REG SFIOR
257 #define PUD_REG SFIOR
258 #define XMM0_REG SFIOR
259 #define XMM1_REG SFIOR
260 #define XMM2_REG SFIOR
261 #define XMBK_REG SFIOR
264 #define ACIS0_REG ACSR
265 #define ACIS1_REG ACSR
266 #define ACIC_REG ACSR
267 #define ACIE_REG ACSR
270 #define ACBG_REG ACSR
284 #define OCR1BL0_REG OCR1BL
285 #define OCR1BL1_REG OCR1BL
286 #define OCR1BL2_REG OCR1BL
287 #define OCR1BL3_REG OCR1BL
288 #define OCR1BL4_REG OCR1BL
289 #define OCR1BL5_REG OCR1BL
290 #define OCR1BL6_REG OCR1BL
291 #define OCR1BL7_REG OCR1BL
294 #define TXB8_REG UCSRB
295 #define RXB8_REG UCSRB
296 #define UCSZ2_REG UCSRB
297 #define TXEN_REG UCSRB
298 #define RXEN_REG UCSRB
299 #define UDRIE_REG UCSRB
300 #define TXCIE_REG UCSRB
301 #define RXCIE_REG UCSRB
304 #define ISC2_REG EMCUCR
305 #define SRW11_REG EMCUCR
306 #define SRW00_REG EMCUCR
307 #define SRW01_REG EMCUCR
308 #define SRL0_REG EMCUCR
309 #define SRL1_REG EMCUCR
310 #define SRL2_REG EMCUCR
311 #define SM0_REG EMCUCR
324 #define OCR1BH0_REG OCR1BH
325 #define OCR1BH1_REG OCR1BH
326 #define OCR1BH2_REG OCR1BH
327 #define OCR1BH3_REG OCR1BH
328 #define OCR1BH4_REG OCR1BH
329 #define OCR1BH5_REG OCR1BH
330 #define OCR1BH6_REG OCR1BH
331 #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 RWWSRE_REG SPMCR
359 #define RWWSB_REG SPMCR
360 #define SPMIE_REG SPMCR
363 #define UBRR8_REG UBRRH
364 #define UBRR9_REG UBRRH
365 #define UBRR10_REG UBRRH
366 #define UBRR11_REG UBRRH
367 /* #define URSEL_REG UBRRH */ /* dup in UCSRC */
370 #define DDE0_REG DDRE
371 #define DDE1_REG DDRE
372 #define DDE2_REG DDRE
375 #define UBRR0_REG UBRRL
376 #define UBRR1_REG UBRRL
377 #define UBRR2_REG UBRRL
378 #define UBRR3_REG UBRRL
379 #define UBRR4_REG UBRRL
380 #define UBRR5_REG UBRRL
381 #define UBRR6_REG UBRRL
382 #define UBRR7_REG UBRRL
385 #define EERE_REG EECR
386 #define EEWE_REG EECR
387 #define EEMWE_REG EECR
388 #define EERIE_REG EECR
391 #define CAL0_REG OSCCAL
392 #define CAL1_REG OSCCAL
393 #define CAL2_REG OSCCAL
394 #define CAL3_REG OSCCAL
395 #define CAL4_REG OSCCAL
396 #define CAL5_REG OSCCAL
397 #define CAL6_REG OSCCAL
398 #define CAL7_REG OSCCAL
401 #define TCNT1L0_REG TCNT1L
402 #define TCNT1L1_REG TCNT1L
403 #define TCNT1L2_REG TCNT1L
404 #define TCNT1L3_REG TCNT1L
405 #define TCNT1L4_REG TCNT1L
406 #define TCNT1L5_REG TCNT1L
407 #define TCNT1L6_REG TCNT1L
408 #define TCNT1L7_REG TCNT1L
411 #define PORTB0_REG PORTB
412 #define PORTB1_REG PORTB
413 #define PORTB2_REG PORTB
414 #define PORTB3_REG PORTB
415 #define PORTB4_REG PORTB
416 #define PORTB5_REG PORTB
417 #define PORTB6_REG PORTB
418 #define PORTB7_REG PORTB
421 #define PORTD0_REG PORTD
422 #define PORTD1_REG PORTD
423 #define PORTD2_REG PORTD
424 #define PORTD3_REG PORTD
425 #define PORTD4_REG PORTD
426 #define PORTD5_REG PORTD
427 #define PORTD6_REG PORTD
428 #define PORTD7_REG PORTD
431 #define PORTE0_REG PORTE
432 #define PORTE1_REG PORTE
433 #define PORTE2_REG PORTE
436 #define TCNT1H0_REG TCNT1H
437 #define TCNT1H1_REG TCNT1H
438 #define TCNT1H2_REG TCNT1H
439 #define TCNT1H3_REG TCNT1H
440 #define TCNT1H4_REG TCNT1H
441 #define TCNT1H5_REG TCNT1H
442 #define TCNT1H6_REG TCNT1H
443 #define TCNT1H7_REG TCNT1H
446 #define PORTC0_REG PORTC
447 #define PORTC1_REG PORTC
448 #define PORTC2_REG PORTC
449 #define PORTC3_REG PORTC
450 #define PORTC4_REG PORTC
451 #define PORTC5_REG PORTC
452 #define PORTC6_REG PORTC
453 #define PORTC7_REG PORTC
456 #define PORTA0_REG PORTA
457 #define PORTA1_REG PORTA
458 #define PORTA2_REG PORTA
459 #define PORTA3_REG PORTA
460 #define PORTA4_REG PORTA
461 #define PORTA5_REG PORTA
462 #define PORTA6_REG PORTA
463 #define PORTA7_REG PORTA
466 #define TCNT0_0_REG TCNT0
467 #define TCNT0_1_REG TCNT0
468 #define TCNT0_2_REG TCNT0
469 #define TCNT0_3_REG TCNT0
470 #define TCNT0_4_REG TCNT0
471 #define TCNT0_5_REG TCNT0
472 #define TCNT0_6_REG TCNT0
473 #define TCNT0_7_REG TCNT0
476 #define PORF_REG MCUCSR
477 #define EXTRF_REG MCUCSR
478 #define BORF_REG MCUCSR
479 #define WDRF_REG MCUCSR
480 #define SM2_REG MCUCSR
483 #define OCF0_REG TIFR
484 #define TOV0_REG TIFR
485 #define ICF1_REG TIFR
486 #define OCF1B_REG TIFR
487 #define OCF1A_REG TIFR
488 #define TOV1_REG TIFR
491 #define EEAR8_REG EEARH
494 #define EEAR0_REG EEARL
495 #define EEAR1_REG EEARL
496 #define EEAR2_REG EEARL
497 #define EEAR3_REG EEARL
498 #define EEAR4_REG EEARL
499 #define EEAR5_REG EEARL
500 #define EEAR6_REG EEARL
501 #define EEAR7_REG EEARL
504 #define PINC0_REG PINC
505 #define PINC1_REG PINC
506 #define PINC2_REG PINC
507 #define PINC3_REG PINC
508 #define PINC4_REG PINC
509 #define PINC5_REG PINC
510 #define PINC6_REG PINC
511 #define PINC7_REG PINC
514 #define PINB0_REG PINB
515 #define PINB1_REG PINB
516 #define PINB2_REG PINB
517 #define PINB3_REG PINB
518 #define PINB4_REG PINB
519 #define PINB5_REG PINB
520 #define PINB6_REG PINB
521 #define PINB7_REG PINB
524 #define PINA0_REG PINA
525 #define PINA1_REG PINA
526 #define PINA2_REG PINA
527 #define PINA3_REG PINA
528 #define PINA4_REG PINA
529 #define PINA5_REG PINA
530 #define PINA6_REG PINA
531 #define PINA7_REG PINA
534 #define PINE0_REG PINE
535 #define PINE1_REG PINE
536 #define PINE2_REG PINE
539 #define ISC00_REG MCUCR
540 #define ISC01_REG MCUCR
541 #define ISC10_REG MCUCR
542 #define ISC11_REG MCUCR
543 #define SM1_REG MCUCR
545 #define SRW10_REG MCUCR
546 #define SRE_REG MCUCR
549 #define OCR1AH0_REG OCR1AH
550 #define OCR1AH1_REG OCR1AH
551 #define OCR1AH2_REG OCR1AH
552 #define OCR1AH3_REG OCR1AH
553 #define OCR1AH4_REG OCR1AH
554 #define OCR1AH5_REG OCR1AH
555 #define OCR1AH6_REG OCR1AH
556 #define OCR1AH7_REG OCR1AH
559 #define OCR1AL0_REG OCR1AL
560 #define OCR1AL1_REG OCR1AL
561 #define OCR1AL2_REG OCR1AL
562 #define OCR1AL3_REG OCR1AL
563 #define OCR1AL4_REG OCR1AL
564 #define OCR1AL5_REG OCR1AL
565 #define OCR1AL6_REG OCR1AL
566 #define OCR1AL7_REG OCR1AL
569 #define OCR0_0_REG OCR0
570 #define OCR0_1_REG OCR0
571 #define OCR0_2_REG OCR0
572 #define OCR0_3_REG OCR0
573 #define OCR0_4_REG OCR0
574 #define OCR0_5_REG OCR0
575 #define OCR0_6_REG OCR0
576 #define OCR0_7_REG OCR0
579 #define SPR0_REG SPCR
580 #define SPR1_REG SPCR
581 #define CPHA_REG SPCR
582 #define CPOL_REG SPCR
583 #define MSTR_REG SPCR
584 #define DORD_REG SPCR
586 #define SPIE_REG SPCR
589 #define ICR1L0_REG ICR1L
590 #define ICR1L1_REG ICR1L
591 #define ICR1L2_REG ICR1L
592 #define ICR1L3_REG ICR1L
593 #define ICR1L4_REG ICR1L
594 #define ICR1L5_REG ICR1L
595 #define ICR1L6_REG ICR1L
596 #define ICR1L7_REG ICR1L
599 #define AD0_PORT PORTA
602 #define AD1_PORT PORTA
605 #define AD2_PORT PORTA
608 #define AD3_PORT PORTA
611 #define AD4_PORT PORTA
614 #define AD5_PORT PORTA
617 #define AD6_PORT PORTA
620 #define AD7_PORT PORTA
623 #define OC0_PORT PORTB
625 #define T0_PORT PORTB
628 #define T1_PORT PORTB
631 #define AIN0_PORT PORTB
634 #define AIN1_PORT PORTB
637 #define SS_PORT PORTB
640 #define MOSI_PORT PORTB
643 #define MISO_PORT PORTB
646 #define SCK_PORT PORTB
649 #define A8_PORT PORTC
652 #define A9_PORT PORTC
655 #define A10_PORT PORTC
658 #define A11_PORT PORTC
661 #define A12_PORT PORTC
664 #define A13_PORT PORTC
667 #define A14_PORT PORTC
670 #define A15_PORT PORTC
673 #define RXD_PORT PORTD
676 #define TXD_PORT PORTD
679 #define INT0_PORT PORTD
682 #define INT1_PORT PORTD
685 #define XCK_PORT PORTD
688 #define OC1A_PORT PORTD
691 #define WR_PORT PORTD
694 #define RD_PORT PORTD
697 #define ICP_PORT PORTE
699 #define INT2_PORT PORTE
702 #define ALE_PORT PORTE
705 #define OC1B_PORT PORTE