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 TIMER0A_AVAILABLE
69 #define TIMER0B_AVAILABLE
70 #define TIMER1_AVAILABLE
71 #define TIMER1A_AVAILABLE
72 #define TIMER1B_AVAILABLE
74 /* overflow interrupt number */
75 #define SIG_OVERFLOW0_NUM 0
76 #define SIG_OVERFLOW1_NUM 1
77 #define SIG_OVERFLOW_TOTAL_NUM 2
79 /* output compare interrupt number */
80 #define SIG_OUTPUT_COMPARE0A_NUM 0
81 #define SIG_OUTPUT_COMPARE0B_NUM 1
82 #define SIG_OUTPUT_COMPARE1A_NUM 2
83 #define SIG_OUTPUT_COMPARE1B_NUM 3
84 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 4
91 #define PWM_TOTAL_NUM 4
93 /* input capture interrupt number */
94 #define SIG_INPUT_CAPTURE1_NUM 0
95 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
99 #define AIN0D_REG DIDR
100 #define AIN1D_REG DIDR
103 #define CLKPS0_REG CLKPR
104 #define CLKPS1_REG CLKPR
105 #define CLKPS2_REG CLKPR
106 #define CLKPS3_REG CLKPR
107 #define CLKPCE_REG CLKPR
110 #define WDP0_REG WDTCR
111 #define WDP1_REG WDTCR
112 #define WDP2_REG WDTCR
113 #define WDE_REG WDTCR
114 #define WDCE_REG WDTCR
115 #define WDP3_REG WDTCR
116 #define WDIE_REG WDTCR
117 #define WDIF_REG WDTCR
120 #define PCIE_REG GIMSK
121 #define INT0_REG GIMSK
122 #define INT1_REG GIMSK
135 #define DDB0_REG DDRB
136 #define DDB1_REG DDRB
137 #define DDB2_REG DDRB
138 #define DDB3_REG DDRB
139 #define DDB4_REG DDRB
140 #define DDB5_REG DDRB
141 #define DDB6_REG DDRB
142 #define DDB7_REG DDRB
145 #define USICNT0_REG USISR
146 #define USICNT1_REG USISR
147 #define USICNT2_REG USISR
148 #define USICNT3_REG USISR
149 #define USIDC_REG USISR
150 #define USIPF_REG USISR
151 #define USIOIF_REG USISR
152 #define USISIF_REG USISR
155 #define EEDR0_REG EEDR
156 #define EEDR1_REG EEDR
157 #define EEDR2_REG EEDR
158 #define EEDR3_REG EEDR
159 #define EEDR4_REG EEDR
160 #define EEDR5_REG EEDR
161 #define EEDR6_REG EEDR
162 #define EEDR7_REG EEDR
165 #define DDA0_REG DDRA
166 #define DDA1_REG DDRA
167 #define DDA2_REG DDRA
170 #define WGM10_REG TCCR1A
171 #define WGM11_REG TCCR1A
172 #define COM1B0_REG TCCR1A
173 #define COM1B1_REG TCCR1A
174 #define COM1A0_REG TCCR1A
175 #define COM1A1_REG TCCR1A
178 #define PSR10_REG GTCCR
181 #define CS10_REG TCCR1B
182 #define CS11_REG TCCR1B
183 #define CS12_REG TCCR1B
184 #define WGM12_REG TCCR1B
185 #define WGM13_REG TCCR1B
186 #define ICES1_REG TCCR1B
187 #define ICNC1_REG TCCR1B
190 #define OCIE0A_REG TIMSK
191 #define TOIE0_REG TIMSK
192 #define OCIE0B_REG TIMSK
193 #define ICIE1_REG TIMSK
194 #define OCIE1B_REG TIMSK
195 #define OCIE1A_REG TIMSK
196 #define TOIE1_REG TIMSK
199 #define MPCM_REG UCSRA
200 #define U2X_REG UCSRA
201 #define UPE_REG UCSRA
202 #define DOR_REG UCSRA
204 #define UDRE_REG UCSRA
205 #define TXC_REG UCSRA
206 #define RXC_REG UCSRA
209 /* #define OCR0_0_REG OCR0A */ /* dup in OCR0B */
210 /* #define OCR0_1_REG OCR0A */ /* dup in OCR0B */
211 /* #define OCR0_2_REG OCR0A */ /* dup in OCR0B */
212 /* #define OCR0_3_REG OCR0A */ /* dup in OCR0B */
213 /* #define OCR0_4_REG OCR0A */ /* dup in OCR0B */
214 /* #define OCR0_5_REG OCR0A */ /* dup in OCR0B */
215 /* #define OCR0_6_REG OCR0A */ /* dup in OCR0B */
216 /* #define OCR0_7_REG OCR0A */ /* dup in OCR0B */
219 #define DDD0_REG DDRD
220 #define DDD1_REG DDRD
221 #define DDD2_REG DDRD
222 #define DDD3_REG DDRD
223 #define DDD4_REG DDRD
224 #define DDD5_REG DDRD
225 #define DDD6_REG DDRD
228 /* #define OCR0_0_REG OCR0B */ /* dup in OCR0A */
229 /* #define OCR0_1_REG OCR0B */ /* dup in OCR0A */
230 /* #define OCR0_2_REG OCR0B */ /* dup in OCR0A */
231 /* #define OCR0_3_REG OCR0B */ /* dup in OCR0A */
232 /* #define OCR0_4_REG OCR0B */ /* dup in OCR0A */
233 /* #define OCR0_5_REG OCR0B */ /* dup in OCR0A */
234 /* #define OCR0_6_REG OCR0B */ /* dup in OCR0A */
235 /* #define OCR0_7_REG OCR0B */ /* dup in OCR0A */
238 #define ICR1H0_REG ICR1H
239 #define ICR1H1_REG ICR1H
240 #define ICR1H2_REG ICR1H
241 #define ICR1H3_REG ICR1H
242 #define ICR1H4_REG ICR1H
243 #define ICR1H5_REG ICR1H
244 #define ICR1H6_REG ICR1H
245 #define ICR1H7_REG ICR1H
248 /* #define OCR1AL0_REG OCR1BL */ /* dup in OCR1AL */
249 /* #define OCR1AL1_REG OCR1BL */ /* dup in OCR1AL */
250 /* #define OCR1AL2_REG OCR1BL */ /* dup in OCR1AL */
251 /* #define OCR1AL3_REG OCR1BL */ /* dup in OCR1AL */
252 /* #define OCR1AL4_REG OCR1BL */ /* dup in OCR1AL */
253 /* #define OCR1AL5_REG OCR1BL */ /* dup in OCR1AL */
254 /* #define OCR1AL6_REG OCR1BL */ /* dup in OCR1AL */
255 /* #define OCR1AL7_REG OCR1BL */ /* dup in OCR1AL */
258 #define TXB8_REG UCSRB
259 #define RXB8_REG UCSRB
260 #define UCSZ2_REG UCSRB
261 #define TXEN_REG UCSRB
262 #define RXEN_REG UCSRB
263 #define UDRIE_REG UCSRB
264 #define TXCIE_REG UCSRB
265 #define RXCIE_REG UCSRB
268 #define UCPOL_REG UCSRC
269 #define UCSZ0_REG UCSRC
270 #define UCSZ1_REG UCSRC
271 #define USBS_REG UCSRC
272 #define UPM0_REG UCSRC
273 #define UPM1_REG UCSRC
274 #define UMSEL_REG UCSRC
287 /* #define OCR1AH0_REG OCR1BH */ /* dup in OCR1AH */
288 /* #define OCR1AH1_REG OCR1BH */ /* dup in OCR1AH */
289 /* #define OCR1AH2_REG OCR1BH */ /* dup in OCR1AH */
290 /* #define OCR1AH3_REG OCR1BH */ /* dup in OCR1AH */
291 /* #define OCR1AH4_REG OCR1BH */ /* dup in OCR1AH */
292 /* #define OCR1AH5_REG OCR1BH */ /* dup in OCR1AH */
293 /* #define OCR1AH6_REG OCR1BH */ /* dup in OCR1AH */
294 /* #define OCR1AH7_REG OCR1BH */ /* dup in OCR1AH */
297 #define PIND0_REG PIND
298 #define PIND1_REG PIND
299 #define PIND2_REG PIND
300 #define PIND3_REG PIND
301 #define PIND4_REG PIND
302 #define PIND5_REG PIND
303 #define PIND6_REG PIND
306 #define GPIOR10_REG GPIOR1
307 #define GPIOR11_REG GPIOR1
308 #define GPIOR12_REG GPIOR1
309 #define GPIOR13_REG GPIOR1
310 #define GPIOR14_REG GPIOR1
311 #define GPIOR15_REG GPIOR1
312 #define GPIOR16_REG GPIOR1
313 #define GPIOR17_REG GPIOR1
316 #define ICR1L0_REG ICR1L
317 #define ICR1L1_REG ICR1L
318 #define ICR1L2_REG ICR1L
319 #define ICR1L3_REG ICR1L
320 #define ICR1L4_REG ICR1L
321 #define ICR1L5_REG ICR1L
322 #define ICR1L6_REG ICR1L
323 #define ICR1L7_REG ICR1L
326 #define UBRR8_REG UBRRH
327 #define UBRR9_REG UBRRH
328 #define UBRR10_REG UBRRH
329 #define UBRR11_REG UBRRH
332 #define GPIOR20_REG GPIOR2
333 #define GPIOR21_REG GPIOR2
334 #define GPIOR22_REG GPIOR2
335 #define GPIOR23_REG GPIOR2
336 #define GPIOR24_REG GPIOR2
337 #define GPIOR25_REG GPIOR2
338 #define GPIOR26_REG GPIOR2
339 #define GPIOR27_REG GPIOR2
342 #define UBRR0_REG UBRRL
343 #define UBRR1_REG UBRRL
344 #define UBRR2_REG UBRRL
345 #define UBRR3_REG UBRRL
346 #define UBRR4_REG UBRRL
347 #define UBRR5_REG UBRRL
348 #define UBRR6_REG UBRRL
349 #define UBRR7_REG UBRRL
352 #define PORF_REG MCUSR
353 #define EXTRF_REG MCUSR
354 #define BORF_REG MCUSR
355 #define WDRF_REG MCUSR
358 #define EERE_REG EECR
359 #define EEPE_REG EECR
360 #define EEMPE_REG EECR
361 #define EERIE_REG EECR
362 #define EEPM0_REG EECR
363 #define EEPM1_REG EECR
366 #define PCINT0_REG PCMSK
367 #define PCINT1_REG PCMSK
368 #define PCINT2_REG PCMSK
369 #define PCINT3_REG PCMSK
370 #define PCINT4_REG PCMSK
371 #define PCINT5_REG PCMSK
372 #define PCINT6_REG PCMSK
373 #define PCINT7_REG PCMSK
376 #define SPMEN_REG SPMCSR
377 #define PGERS_REG SPMCSR
378 #define PGWRT_REG SPMCSR
379 #define RFLB_REG SPMCSR
380 #define CTPB_REG SPMCSR
383 #define CAL0_REG OSCCAL
384 #define CAL1_REG OSCCAL
385 #define CAL2_REG OSCCAL
386 #define CAL3_REG OSCCAL
387 #define CAL4_REG OSCCAL
388 #define CAL5_REG OSCCAL
389 #define CAL6_REG OSCCAL
392 #define TCNT1L0_REG TCNT1L
393 #define TCNT1L1_REG TCNT1L
394 #define TCNT1L2_REG TCNT1L
395 #define TCNT1L3_REG TCNT1L
396 #define TCNT1L4_REG TCNT1L
397 #define TCNT1L5_REG TCNT1L
398 #define TCNT1L6_REG TCNT1L
399 #define TCNT1L7_REG TCNT1L
402 #define PORTB0_REG PORTB
403 #define PORTB1_REG PORTB
404 #define PORTB2_REG PORTB
405 #define PORTB3_REG PORTB
406 #define PORTB4_REG PORTB
407 #define PORTB5_REG PORTB
408 #define PORTB6_REG PORTB
409 #define PORTB7_REG PORTB
412 #define PORTD0_REG PORTD
413 #define PORTD1_REG PORTD
414 #define PORTD2_REG PORTD
415 #define PORTD3_REG PORTD
416 #define PORTD4_REG PORTD
417 #define PORTD5_REG PORTD
418 #define PORTD6_REG PORTD
421 #define EEAR0_REG EEAR
422 #define EEAR1_REG EEAR
423 #define EEAR2_REG EEAR
424 #define EEAR3_REG EEAR
425 #define EEAR4_REG EEAR
426 #define EEAR5_REG EEAR
427 #define EEAR6_REG EEAR
430 #define TCNT1H0_REG TCNT1H
431 #define TCNT1H1_REG TCNT1H
432 #define TCNT1H2_REG TCNT1H
433 #define TCNT1H3_REG TCNT1H
434 #define TCNT1H4_REG TCNT1H
435 #define TCNT1H5_REG TCNT1H
436 #define TCNT1H6_REG TCNT1H
437 #define TCNT1H7_REG TCNT1H
440 #define PORTA0_REG PORTA
441 #define PORTA1_REG PORTA
442 #define PORTA2_REG PORTA
445 #define TCNT0_0_REG TCNT0
446 #define TCNT0_1_REG TCNT0
447 #define TCNT0_2_REG TCNT0
448 #define TCNT0_3_REG TCNT0
449 #define TCNT0_4_REG TCNT0
450 #define TCNT0_5_REG TCNT0
451 #define TCNT0_6_REG TCNT0
452 #define TCNT0_7_REG TCNT0
455 #define GPIOR00_REG GPIOR0
456 #define GPIOR01_REG GPIOR0
457 #define GPIOR02_REG GPIOR0
458 #define GPIOR03_REG GPIOR0
459 #define GPIOR04_REG GPIOR0
460 #define GPIOR05_REG GPIOR0
461 #define GPIOR06_REG GPIOR0
462 #define GPIOR07_REG GPIOR0
465 #define CS00_REG TCCR0B
466 #define CS01_REG TCCR0B
467 #define CS02_REG TCCR0B
468 #define WGM02_REG TCCR0B
469 #define FOC0B_REG TCCR0B
470 #define FOC0A_REG TCCR0B
473 #define OCF0A_REG TIFR
474 #define TOV0_REG TIFR
475 #define OCF0B_REG TIFR
476 #define ICF1_REG TIFR
477 #define OCF1B_REG TIFR
478 #define OCF1A_REG TIFR
479 #define TOV1_REG TIFR
482 #define FOC1B_REG TCCR1C
483 #define FOC1A_REG TCCR1C
486 #define WGM00_REG TCCR0A
487 #define WGM01_REG TCCR0A
488 #define COM0B0_REG TCCR0A
489 #define COM0B1_REG TCCR0A
490 #define COM0A0_REG TCCR0A
491 #define COM0A1_REG TCCR0A
504 #define USITC_REG USICR
505 #define USICLK_REG USICR
506 #define USICS0_REG USICR
507 #define USICS1_REG USICR
508 #define USIWM0_REG USICR
509 #define USIWM1_REG USICR
510 #define USIOIE_REG USICR
511 #define USISIE_REG USICR
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 PCIF_REG EIFR
525 #define INTF0_REG EIFR
526 #define INTF1_REG EIFR
529 #define ISC00_REG MCUCR
530 #define ISC01_REG MCUCR
531 #define ISC10_REG MCUCR
532 #define ISC11_REG MCUCR
533 #define SM0_REG MCUCR
535 #define SM1_REG MCUCR
536 #define PUD_REG MCUCR
539 /* #define OCR1AH0_REG OCR1AH */ /* dup in OCR1BH */
540 /* #define OCR1AH1_REG OCR1AH */ /* dup in OCR1BH */
541 /* #define OCR1AH2_REG OCR1AH */ /* dup in OCR1BH */
542 /* #define OCR1AH3_REG OCR1AH */ /* dup in OCR1BH */
543 /* #define OCR1AH4_REG OCR1AH */ /* dup in OCR1BH */
544 /* #define OCR1AH5_REG OCR1AH */ /* dup in OCR1BH */
545 /* #define OCR1AH6_REG OCR1AH */ /* dup in OCR1BH */
546 /* #define OCR1AH7_REG OCR1AH */ /* dup in OCR1BH */
549 /* #define OCR1AL0_REG OCR1AL */ /* dup in OCR1BL */
550 /* #define OCR1AL1_REG OCR1AL */ /* dup in OCR1BL */
551 /* #define OCR1AL2_REG OCR1AL */ /* dup in OCR1BL */
552 /* #define OCR1AL3_REG OCR1AL */ /* dup in OCR1BL */
553 /* #define OCR1AL4_REG OCR1AL */ /* dup in OCR1BL */
554 /* #define OCR1AL5_REG OCR1AL */ /* dup in OCR1BL */
555 /* #define OCR1AL6_REG OCR1AL */ /* dup in OCR1BL */
556 /* #define OCR1AL7_REG OCR1AL */ /* dup in OCR1BL */
559 #define ACIS0_REG ACSR
560 #define ACIS1_REG ACSR
561 #define ACIC_REG ACSR
562 #define ACIE_REG ACSR
565 #define ACBG_REG ACSR
569 #define PINA0_REG PINA
570 #define PINA1_REG PINA
571 #define PINA2_REG PINA
574 #define USIDR0_REG USIDR
575 #define USIDR1_REG USIDR
576 #define USIDR2_REG USIDR
577 #define USIDR3_REG USIDR
578 #define USIDR4_REG USIDR
579 #define USIDR5_REG USIDR
580 #define USIDR6_REG USIDR
581 #define USIDR7_REG USIDR
584 #define AIN0_PORT PORTB
587 #define AIN1_PORT PORTB
590 #define OC0A_PORT PORTB
593 #define OC1A_PORT PORTB
596 #define OC1B_PORT PORTB
599 #define MOSI_PORT PORTB
601 #define DI_PORT PORTB
604 #define MISO_PORT PORTB
606 #define DO_PORT PORTB
609 #define SCK_PORT PORTB
611 #define SCL_PORT PORTB
614 #define RXD_PORT PORTD
617 #define TXD_PORT PORTD
620 #define INT0_PORT PORTD
622 #define XCK_PORT PORTD
624 #define CKOUT_PORT PORTD
627 #define INT1_PORT PORTD
630 #define T0_PORT PORTD
633 #define T1_PORT PORTD
635 #define OC0B_PORT PORTD
638 #define ICP_PORT PORTD