prog_fuse.sh: reindent file
[aversive.git] / include / aversive / parts / ATmega103comp.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2009)
3  * 
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.
8  *
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.
13  *
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
17  *
18  *  Revision : $Id $
19  *
20  */
21
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 */
25
26
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_32         3
32 #define TIMER0_PRESCALER_DIV_64         4
33 #define TIMER0_PRESCALER_DIV_128        5
34 #define TIMER0_PRESCALER_DIV_256        6
35 #define TIMER0_PRESCALER_DIV_1024       7
36
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          32
41 #define TIMER0_PRESCALER_REG_4          64
42 #define TIMER0_PRESCALER_REG_5          128
43 #define TIMER0_PRESCALER_REG_6          256
44 #define TIMER0_PRESCALER_REG_7          1024
45
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
55
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
64
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_64         3
70 #define TIMER2_PRESCALER_DIV_256        4
71 #define TIMER2_PRESCALER_DIV_1024       5
72 #define TIMER2_PRESCALER_DIV_FALL       6
73 #define TIMER2_PRESCALER_DIV_RISE       7
74
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          64
79 #define TIMER2_PRESCALER_REG_4          256
80 #define TIMER2_PRESCALER_REG_5          1024
81 #define TIMER2_PRESCALER_REG_6          -1
82 #define TIMER2_PRESCALER_REG_7          -2
83
84
85 /* available timers */
86 #define TIMER0_AVAILABLE
87 #define TIMER1_AVAILABLE
88 #define TIMER1A_AVAILABLE
89 #define TIMER1B_AVAILABLE
90 #define TIMER1C_AVAILABLE
91 #define TIMER2_AVAILABLE
92 #define TIMER3_AVAILABLE
93 #define TIMER3A_AVAILABLE
94 #define TIMER3B_AVAILABLE
95 #define TIMER3C_AVAILABLE
96
97 /* overflow interrupt number */
98 #define SIG_OVERFLOW0_NUM 0
99 #define SIG_OVERFLOW1_NUM 1
100 #define SIG_OVERFLOW2_NUM 2
101 #define SIG_OVERFLOW3_NUM 3
102 #define SIG_OVERFLOW_TOTAL_NUM 4
103
104 /* output compare interrupt number */
105 #define SIG_OUTPUT_COMPARE0_NUM 0
106 #define SIG_OUTPUT_COMPARE1A_NUM 1
107 #define SIG_OUTPUT_COMPARE1B_NUM 2
108 #define SIG_OUTPUT_COMPARE1C_NUM 3
109 #define SIG_OUTPUT_COMPARE2_NUM 4
110 #define SIG_OUTPUT_COMPARE3A_NUM 5
111 #define SIG_OUTPUT_COMPARE3B_NUM 6
112 #define SIG_OUTPUT_COMPARE3C_NUM 7
113 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 8
114
115 /* Pwm nums */
116 #define PWM0_NUM 0
117 #define PWM1A_NUM 1
118 #define PWM1B_NUM 2
119 #define PWM1C_NUM 3
120 #define PWM2_NUM 4
121 #define PWM3A_NUM 5
122 #define PWM3B_NUM 6
123 #define PWM3C_NUM 7
124 #define PWM_TOTAL_NUM 8
125
126 /* input capture interrupt number */
127 #define SIG_INPUT_CAPTURE1_NUM 0
128 #define SIG_INPUT_CAPTURE3_NUM 1
129 #define SIG_INPUT_CAPTURE_TOTAL_NUM 2
130
131
132 /* WDTCR */
133 #define WDP0_REG             WDTCR
134 #define WDP1_REG             WDTCR
135 #define WDP2_REG             WDTCR
136 #define WDE_REG              WDTCR
137 #define WDCE_REG             WDTCR
138
139 /* ICR1H */
140 #define ICR1H0_REG           ICR1H
141 #define ICR1H1_REG           ICR1H
142 #define ICR1H2_REG           ICR1H
143 #define ICR1H3_REG           ICR1H
144 #define ICR1H4_REG           ICR1H
145 #define ICR1H5_REG           ICR1H
146 #define ICR1H6_REG           ICR1H
147 #define ICR1H7_REG           ICR1H
148
149 /* ADMUX */
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
158
159 /* TCCR0 */
160 #define CS00_REG             TCCR0
161 #define CS01_REG             TCCR0
162 #define CS02_REG             TCCR0
163 #define CTC0_REG             TCCR0
164 #define COM00_REG            TCCR0
165 #define COM01_REG            TCCR0
166 #define PWM0_REG             TCCR0
167
168 /* SREG */
169 #define C_REG                SREG
170 #define Z_REG                SREG
171 #define N_REG                SREG
172 #define V_REG                SREG
173 #define S_REG                SREG
174 #define H_REG                SREG
175 #define T_REG                SREG
176 #define I_REG                SREG
177
178 /* DDRB */
179 #define DDB0_REG             DDRB
180 #define DDB1_REG             DDRB
181 #define DDB2_REG             DDRB
182 #define DDB3_REG             DDRB
183 #define DDB4_REG             DDRB
184 #define DDB5_REG             DDRB
185 #define DDB6_REG             DDRB
186 #define DDB7_REG             DDRB
187
188 /* XDIV */
189 #define XDIV0_REG            XDIV
190 #define XDIV1_REG            XDIV
191 #define XDIV2_REG            XDIV
192 #define XDIV3_REG            XDIV
193 #define XDIV4_REG            XDIV
194 #define XDIV5_REG            XDIV
195 #define XDIV6_REG            XDIV
196 #define XDIVEN_REG           XDIV
197
198 /* EEDR */
199 #define EEDR0_REG            EEDR
200 #define EEDR1_REG            EEDR
201 #define EEDR2_REG            EEDR
202 #define EEDR3_REG            EEDR
203 #define EEDR4_REG            EEDR
204 #define EEDR5_REG            EEDR
205 #define EEDR6_REG            EEDR
206 #define EEDR7_REG            EEDR
207
208 /* DDRE */
209 #define DDE0_REG             DDRE
210 #define DDE1_REG             DDRE
211 #define DDE2_REG             DDRE
212 #define DDE3_REG             DDRE
213 #define DDE4_REG             DDRE
214 #define DDE5_REG             DDRE
215 #define DDE6_REG             DDRE
216 #define DDE7_REG             DDRE
217
218 /* DDRA */
219 #define DDA0_REG             DDRA
220 #define DDA1_REG             DDRA
221 #define DDA2_REG             DDRA
222 #define DDA3_REG             DDRA
223 #define DDA4_REG             DDRA
224 #define DDA5_REG             DDRA
225 #define DDA6_REG             DDRA
226 #define DDA7_REG             DDRA
227
228 /* TCCR1A */
229 #define PWM10_REG            TCCR1A
230 #define PWM11_REG            TCCR1A
231 #define COM1B0_REG           TCCR1A
232 #define COM1B1_REG           TCCR1A
233 #define COM1A0_REG           TCCR1A
234 #define COM1A1_REG           TCCR1A
235
236 /* DDRD */
237 #define DDD0_REG             DDRD
238 #define DDD1_REG             DDRD
239 #define DDD2_REG             DDRD
240 #define DDD3_REG             DDRD
241 #define DDD4_REG             DDRD
242 #define DDD5_REG             DDRD
243 #define DDD6_REG             DDRD
244 #define DDD7_REG             DDRD
245
246 /* TCCR1B */
247 #define CS10_REG             TCCR1B
248 #define CS11_REG             TCCR1B
249 #define CS12_REG             TCCR1B
250 #define CTC1_REG             TCCR1B
251 #define ICES1_REG            TCCR1B
252 #define ICNC1_REG            TCCR1B
253
254 /* TIMSK */
255 #define TOIE2_REG            TIMSK
256 #define OCIE2_REG            TIMSK
257 #define TOIE0_REG            TIMSK
258 #define OCIE0_REG            TIMSK
259 #define TOIE1_REG            TIMSK
260 #define OCIE1B_REG           TIMSK
261 #define OCIE1A_REG           TIMSK
262 #define TICIE1_REG           TIMSK
263
264 /* EIMSK */
265 #define INT0_REG             EIMSK
266 #define INT1_REG             EIMSK
267 #define INT2_REG             EIMSK
268 #define INT3_REG             EIMSK
269 #define INT4_REG             EIMSK
270 #define INT5_REG             EIMSK
271 #define INT6_REG             EIMSK
272 #define INT7_REG             EIMSK
273
274 /* RAMPZ */
275 #define RAMPZ0_REG           RAMPZ
276
277 /* SPDR */
278 #define SPDR0_REG            SPDR
279 #define SPDR1_REG            SPDR
280 #define SPDR2_REG            SPDR
281 #define SPDR3_REG            SPDR
282 #define SPDR4_REG            SPDR
283 #define SPDR5_REG            SPDR
284 #define SPDR6_REG            SPDR
285 #define SPDR7_REG            SPDR
286
287 /* ADCSR */
288 #define ADPS0_REG            ADCSR
289 #define ADPS1_REG            ADCSR
290 #define ADPS2_REG            ADCSR
291 #define ADIE_REG             ADCSR
292 #define ADIF_REG             ADCSR
293 #define ADFR_REG             ADCSR
294 #define ADSC_REG             ADCSR
295 #define ADEN_REG             ADCSR
296
297 /* SFIOR */
298 #define ACME_REG             SFIOR
299 #define PSR321_REG           SFIOR
300 #define PSR0_REG             SFIOR
301 #define PUD_REG              SFIOR
302 #define TSM_REG              SFIOR
303
304 /* UDR0 */
305 #define UDR00_REG            UDR0
306 #define UDR01_REG            UDR0
307 #define UDR02_REG            UDR0
308 #define UDR03_REG            UDR0
309 #define UDR04_REG            UDR0
310 #define UDR05_REG            UDR0
311 #define UDR06_REG            UDR0
312 #define UDR07_REG            UDR0
313
314 /* SPH */
315 #define SP8_REG              SPH
316 #define SP9_REG              SPH
317 #define SP10_REG             SPH
318 #define SP11_REG             SPH
319 #define SP12_REG             SPH
320 #define SP13_REG             SPH
321 #define SP14_REG             SPH
322 #define SP15_REG             SPH
323
324 /* OCR1BL */
325 #define OCR1BL0_REG          OCR1BL
326 #define OCR1BL1_REG          OCR1BL
327 #define OCR1BL2_REG          OCR1BL
328 #define OCR1BL3_REG          OCR1BL
329 #define OCR1BL4_REG          OCR1BL
330 #define OCR1BL5_REG          OCR1BL
331 #define OCR1BL6_REG          OCR1BL
332 #define OCR1BL7_REG          OCR1BL
333
334 /* SPL */
335 #define SP0_REG              SPL
336 #define SP1_REG              SPL
337 #define SP2_REG              SPL
338 #define SP3_REG              SPL
339 #define SP4_REG              SPL
340 #define SP5_REG              SPL
341 #define SP6_REG              SPL
342 #define SP7_REG              SPL
343
344 /* OCR1BH */
345 #define OCR1BH0_REG          OCR1BH
346 #define OCR1BH1_REG          OCR1BH
347 #define OCR1BH2_REG          OCR1BH
348 #define OCR1BH3_REG          OCR1BH
349 #define OCR1BH4_REG          OCR1BH
350 #define OCR1BH5_REG          OCR1BH
351 #define OCR1BH6_REG          OCR1BH
352 #define OCR1BH7_REG          OCR1BH
353
354 /* PIND */
355 #define PIND0_REG            PIND
356 #define PIND1_REG            PIND
357 #define PIND2_REG            PIND
358 #define PIND3_REG            PIND
359 #define PIND4_REG            PIND
360 #define PIND5_REG            PIND
361 #define PIND6_REG            PIND
362 #define PIND7_REG            PIND
363
364 /* ICR1L */
365 #define ICR1L0_REG           ICR1L
366 #define ICR1L1_REG           ICR1L
367 #define ICR1L2_REG           ICR1L
368 #define ICR1L3_REG           ICR1L
369 #define ICR1L4_REG           ICR1L
370 #define ICR1L5_REG           ICR1L
371 #define ICR1L6_REG           ICR1L
372 #define ICR1L7_REG           ICR1L
373
374 /* SPSR */
375 #define SPI2X_REG            SPSR
376 #define WCOL_REG             SPSR
377 #define SPIF_REG             SPSR
378
379 /* ADCL */
380 #define ADCL0_REG            ADCL
381 #define ADCL1_REG            ADCL
382 #define ADCL2_REG            ADCL
383 #define ADCL3_REG            ADCL
384 #define ADCL4_REG            ADCL
385 #define ADCL5_REG            ADCL
386 #define ADCL6_REG            ADCL
387 #define ADCL7_REG            ADCL
388
389 /* ACSR */
390 #define ACIS0_REG            ACSR
391 #define ACIS1_REG            ACSR
392 #define ACIC_REG             ACSR
393 #define ACIE_REG             ACSR
394 #define ACI_REG              ACSR
395 #define ACO_REG              ACSR
396 #define ACBG_REG             ACSR
397 #define ACD_REG              ACSR
398
399 /* EECR */
400 #define EERE_REG             EECR
401 #define EEWE_REG             EECR
402 #define EEMWE_REG            EECR
403 #define EERIE_REG            EECR
404
405 /* PORTE */
406 #define PORTE0_REG           PORTE
407 #define PORTE1_REG           PORTE
408 #define PORTE2_REG           PORTE
409 #define PORTE3_REG           PORTE
410 #define PORTE4_REG           PORTE
411 #define PORTE5_REG           PORTE
412 #define PORTE6_REG           PORTE
413 #define PORTE7_REG           PORTE
414
415 /* TCNT1L */
416 #define TCNT1L0_REG          TCNT1L
417 #define TCNT1L1_REG          TCNT1L
418 #define TCNT1L2_REG          TCNT1L
419 #define TCNT1L3_REG          TCNT1L
420 #define TCNT1L4_REG          TCNT1L
421 #define TCNT1L5_REG          TCNT1L
422 #define TCNT1L6_REG          TCNT1L
423 #define TCNT1L7_REG          TCNT1L
424
425 /* PORTB */
426 #define PORTB0_REG           PORTB
427 #define PORTB1_REG           PORTB
428 #define PORTB2_REG           PORTB
429 #define PORTB3_REG           PORTB
430 #define PORTB4_REG           PORTB
431 #define PORTB5_REG           PORTB
432 #define PORTB6_REG           PORTB
433 #define PORTB7_REG           PORTB
434
435 /* PORTD */
436 #define PORTD0_REG           PORTD
437 #define PORTD1_REG           PORTD
438 #define PORTD2_REG           PORTD
439 #define PORTD3_REG           PORTD
440 #define PORTD4_REG           PORTD
441 #define PORTD5_REG           PORTD
442 #define PORTD6_REG           PORTD
443 #define PORTD7_REG           PORTD
444
445 /* UCSR0B */
446 #define TXB80_REG            UCSR0B
447 #define RXB80_REG            UCSR0B
448 #define UCSZ02_REG           UCSR0B
449 #define TXEN0_REG            UCSR0B
450 #define RXEN0_REG            UCSR0B
451 #define UDRIE0_REG           UCSR0B
452 #define TXCIE0_REG           UCSR0B
453 #define RXCIE0_REG           UCSR0B
454
455 /* TCNT1H */
456 #define TCNT1H0_REG          TCNT1H
457 #define TCNT1H1_REG          TCNT1H
458 #define TCNT1H2_REG          TCNT1H
459 #define TCNT1H3_REG          TCNT1H
460 #define TCNT1H4_REG          TCNT1H
461 #define TCNT1H5_REG          TCNT1H
462 #define TCNT1H6_REG          TCNT1H
463 #define TCNT1H7_REG          TCNT1H
464
465 /* PORTC */
466 #define PORTC0_REG           PORTC
467 #define PORTC1_REG           PORTC
468 #define PORTC2_REG           PORTC
469 #define PORTC3_REG           PORTC
470 #define PORTC4_REG           PORTC
471 #define PORTC5_REG           PORTC
472 #define PORTC6_REG           PORTC
473 #define PORTC7_REG           PORTC
474
475 /* ADCH */
476 #define ADCH0_REG            ADCH
477 #define ADCH1_REG            ADCH
478 #define ADCH2_REG            ADCH
479 #define ADCH3_REG            ADCH
480 #define ADCH4_REG            ADCH
481 #define ADCH5_REG            ADCH
482 #define ADCH6_REG            ADCH
483 #define ADCH7_REG            ADCH
484
485 /* PORTA */
486 #define PORTA0_REG           PORTA
487 #define PORTA1_REG           PORTA
488 #define PORTA2_REG           PORTA
489 #define PORTA3_REG           PORTA
490 #define PORTA4_REG           PORTA
491 #define PORTA5_REG           PORTA
492 #define PORTA6_REG           PORTA
493 #define PORTA7_REG           PORTA
494
495 /* TCNT2 */
496 #define TCNT2_0_REG          TCNT2
497 #define TCNT2_1_REG          TCNT2
498 #define TCNT2_2_REG          TCNT2
499 #define TCNT2_3_REG          TCNT2
500 #define TCNT2_4_REG          TCNT2
501 #define TCNT2_5_REG          TCNT2
502 #define TCNT2_6_REG          TCNT2
503 #define TCNT2_7_REG          TCNT2
504
505 /* TCNT0 */
506 #define TCNT0_0_REG          TCNT0
507 #define TCNT0_1_REG          TCNT0
508 #define TCNT0_2_REG          TCNT0
509 #define TCNT0_3_REG          TCNT0
510 #define TCNT0_4_REG          TCNT0
511 #define TCNT0_5_REG          TCNT0
512 #define TCNT0_6_REG          TCNT0
513 #define TCNT0_7_REG          TCNT0
514
515 /* MCUCSR */
516 #define PORF_REG             MCUCSR
517 #define EXTRF_REG            MCUCSR
518
519 /* UCSR0A */
520 #define MPCM0_REG            UCSR0A
521 #define U2X0_REG             UCSR0A
522 #define UPE0_REG             UCSR0A
523 #define DOR0_REG             UCSR0A
524 #define FE0_REG              UCSR0A
525 #define UDRE0_REG            UCSR0A
526 #define TXC0_REG             UCSR0A
527 #define RXC0_REG             UCSR0A
528
529 /* EEARL */
530 #define EEARL0_REG           EEARL
531 #define EEARL1_REG           EEARL
532 #define EEARL2_REG           EEARL
533 #define EEARL3_REG           EEARL
534 #define EEARL4_REG           EEARL
535 #define EEARL5_REG           EEARL
536 #define EEARL6_REG           EEARL
537 #define EEARL7_REG           EEARL
538
539 /* TCCR2 */
540 #define CS20_REG             TCCR2
541 #define CS21_REG             TCCR2
542 #define CS22_REG             TCCR2
543 #define CTC2_REG             TCCR2
544 #define COM20_REG            TCCR2
545 #define COM21_REG            TCCR2
546 #define PWM2_REG             TCCR2
547
548 /* TIFR */
549 #define TOV2_REG             TIFR
550 #define OCF2_REG             TIFR
551 #define TOV0_REG             TIFR
552 #define OCF0_REG             TIFR
553 #define TOV1_REG             TIFR
554 #define OCF1B_REG            TIFR
555 #define OCF1A_REG            TIFR
556 #define ICF1_REG             TIFR
557
558 /* UBRR0L */
559 #define UBRR0_REG            UBRR0L
560 #define UBRR1_REG            UBRR0L
561 #define UBRR2_REG            UBRR0L
562 #define UBRR3_REG            UBRR0L
563 #define UBRR4_REG            UBRR0L
564 #define UBRR5_REG            UBRR0L
565 #define UBRR6_REG            UBRR0L
566 #define UBRR7_REG            UBRR0L
567
568 /* EEARH */
569 #define EEAR8_REG            EEARH
570 #define EEAR9_REG            EEARH
571 #define EEAR10_REG           EEARH
572 #define EEAR11_REG           EEARH
573
574 /* EICRB */
575 #define ISC40_REG            EICRB
576 #define ISC41_REG            EICRB
577 #define ISC50_REG            EICRB
578 #define ISC51_REG            EICRB
579 #define ISC60_REG            EICRB
580 #define ISC61_REG            EICRB
581 #define ISC70_REG            EICRB
582 #define ISC71_REG            EICRB
583
584 /* PINB */
585 #define PINB0_REG            PINB
586 #define PINB1_REG            PINB
587 #define PINB2_REG            PINB
588 #define PINB3_REG            PINB
589 #define PINB4_REG            PINB
590 #define PINB5_REG            PINB
591 #define PINB6_REG            PINB
592 #define PINB7_REG            PINB
593
594 /* EIFR */
595 #define INTF0_REG            EIFR
596 #define INTF1_REG            EIFR
597 #define INTF2_REG            EIFR
598 #define INTF3_REG            EIFR
599 #define INTF4_REG            EIFR
600 #define INTF5_REG            EIFR
601 #define INTF6_REG            EIFR
602 #define INTF7_REG            EIFR
603
604 /* PINF */
605 #define PINF0_REG            PINF
606 #define PINF1_REG            PINF
607 #define PINF2_REG            PINF
608 #define PINF3_REG            PINF
609 #define PINF4_REG            PINF
610 #define PINF5_REG            PINF
611 #define PINF6_REG            PINF
612 #define PINF7_REG            PINF
613
614 /* PINE */
615 #define PINE0_REG            PINE
616 #define PINE1_REG            PINE
617 #define PINE2_REG            PINE
618 #define PINE3_REG            PINE
619 #define PINE4_REG            PINE
620 #define PINE5_REG            PINE
621 #define PINE6_REG            PINE
622 #define PINE7_REG            PINE
623
624 /* MCUCR */
625 #define IVCE_REG             MCUCR
626 #define IVSEL_REG            MCUCR
627 #define SM2_REG              MCUCR
628 #define SM0_REG              MCUCR
629 #define SM1_REG              MCUCR
630 #define SE_REG               MCUCR
631 #define SRW10_REG            MCUCR
632 #define SRE_REG              MCUCR
633
634 /* OCR1AH */
635 #define OCR1AH0_REG          OCR1AH
636 #define OCR1AH1_REG          OCR1AH
637 #define OCR1AH2_REG          OCR1AH
638 #define OCR1AH3_REG          OCR1AH
639 #define OCR1AH4_REG          OCR1AH
640 #define OCR1AH5_REG          OCR1AH
641 #define OCR1AH6_REG          OCR1AH
642 #define OCR1AH7_REG          OCR1AH
643
644 /* OCR1AL */
645 #define OCR1AL0_REG          OCR1AL
646 #define OCR1AL1_REG          OCR1AL
647 #define OCR1AL2_REG          OCR1AL
648 #define OCR1AL3_REG          OCR1AL
649 #define OCR1AL4_REG          OCR1AL
650 #define OCR1AL5_REG          OCR1AL
651 #define OCR1AL6_REG          OCR1AL
652 #define OCR1AL7_REG          OCR1AL
653
654 /* SPCR */
655 #define SPR0_REG             SPCR
656 #define SPR1_REG             SPCR
657 #define CPHA_REG             SPCR
658 #define CPOL_REG             SPCR
659 #define MSTR_REG             SPCR
660 #define DORD_REG             SPCR
661 #define SPE_REG              SPCR
662 #define SPIE_REG             SPCR
663
664 /* OCR0 */
665 #define OCR0_0_REG           OCR0
666 #define OCR0_1_REG           OCR0
667 #define OCR0_2_REG           OCR0
668 #define OCR0_3_REG           OCR0
669 #define OCR0_4_REG           OCR0
670 #define OCR0_5_REG           OCR0
671 #define OCR0_6_REG           OCR0
672 #define OCR0_7_REG           OCR0
673
674 /* PINA */
675 #define PINA0_REG            PINA
676 #define PINA1_REG            PINA
677 #define PINA2_REG            PINA
678 #define PINA3_REG            PINA
679 #define PINA4_REG            PINA
680 #define PINA5_REG            PINA
681 #define PINA6_REG            PINA
682 #define PINA7_REG            PINA
683
684 /* OCR2 */
685 #define OCR2_0_REG           OCR2
686 #define OCR2_1_REG           OCR2
687 #define OCR2_2_REG           OCR2
688 #define OCR2_3_REG           OCR2
689 #define OCR2_4_REG           OCR2
690 #define OCR2_5_REG           OCR2
691 #define OCR2_6_REG           OCR2
692 #define OCR2_7_REG           OCR2
693
694 /* ASSR */
695 #define TCR0UB_REG           ASSR
696 #define OCR0UB_REG           ASSR
697 #define TCN0UB_REG           ASSR
698 #define AS0_REG              ASSR
699
700 /* pins mapping */
701 #define AD0_PORT PORTA
702 #define AD0_BIT 0
703
704 #define AD1_PORT PORTA
705 #define AD1_BIT 1
706
707 #define AD2_PORT PORTA
708 #define AD2_BIT 2
709
710 #define AD3_PORT PORTA
711 #define AD3_BIT 3
712
713 #define AD4_PORT PORTA
714 #define AD4_BIT 4
715
716 #define AD5_PORT PORTA
717 #define AD5_BIT 5
718
719 #define AD6_PORT PORTA
720 #define AD6_BIT 6
721
722 #define AD7_PORT PORTA
723 #define AD7_BIT 7
724
725 #define SS_PORT PORTB
726 #define SS_BIT 0
727
728 #define SCK_PORT PORTB
729 #define SCK_BIT 1
730
731 #define MOSI_PORT PORTB
732 #define MOSI_BIT 2
733
734 #define MISO_PORT PORTB
735 #define MISO_BIT 3
736
737 #define OC0_PORT PORTB
738 #define OC0_BIT 4
739 #define PWM0_PORT PORTB
740 #define PWM0_BIT 4
741
742 #define OC1A_PORT PORTB
743 #define OC1A_BIT 5
744 #define PWM1A_PORT PORTB
745 #define PWM1A_BIT 5
746
747 #define OC1B_PORT PORTB
748 #define OC1B_BIT 6
749 #define PWM1B_PORT PORTB
750 #define PWM1B_BIT 6
751
752 #define OC2_PORT PORTB
753 #define OC2_BIT 7
754 #define PWM2_PORT PORTB
755 #define PWM2_BIT 7
756 #define OC1C_PORT PORTB
757 #define OC1C_BIT 7
758
759 #define A8_PORT PORTC
760 #define A8_BIT 0
761
762 #define A9_PORT PORTC
763 #define A9_BIT 1
764
765 #define A10_PORT PORTC
766 #define A10_BIT 2
767
768 #define A11_PORT PORTC
769 #define A11_BIT 3
770
771 #define A12_PORT PORTC
772 #define A12_BIT 4
773
774 #define A13_PORT PORTC
775 #define A13_BIT 5
776
777 #define A14_PORT PORTC
778 #define A14_BIT 6
779
780 #define A15_PORT PORTC
781 #define A15_BIT 7
782
783 #define SCL_PORT PORTD
784 #define SCL_BIT 0
785 #define INT0_PORT PORTD
786 #define INT0_BIT 0
787
788 #define SDA_PORT PORTD
789 #define SDA_BIT 1
790 #define INT1_PORT PORTD
791 #define INT1_BIT 1
792
793 #define RXD1_PORT PORTD
794 #define RXD1_BIT 2
795 #define INT2_PORT PORTD
796 #define INT2_BIT 2
797
798 #define TXD1_PORT PORTD
799 #define TXD1_BIT 3
800 #define INT3_PORT PORTD
801 #define INT3_BIT 3
802
803 #define IC1_PORT PORTD
804 #define IC1_BIT 4
805
806 #define XCK1_PORT PORTD
807 #define XCK1_BIT 5
808
809 #define T1_PORT PORTD
810 #define T1_BIT 6
811
812 #define T2_PORT PORTD
813 #define T2_BIT 7
814
815 #define RXD0_PORT PORTE
816 #define RXD0_BIT 0
817 #define PDI_PORT PORTE
818 #define PDI_BIT 0
819
820 #define TXD0_PORT PORTE
821 #define TXD0_BIT 1
822 #define PDO_PORT PORTE
823 #define PDO_BIT 1
824
825 #define XCK0_PORT PORTE
826 #define XCK0_BIT 2
827 #define AIN0_PORT PORTE
828 #define AIN0_BIT 2
829
830 #define OC3A_PORT PORTE
831 #define OC3A_BIT 3
832 #define AIN1_PORT PORTE
833 #define AIN1_BIT 3
834
835 #define OC3B_PORT PORTE
836 #define OC3B_BIT 4
837 #define INT4_PORT PORTE
838 #define INT4_BIT 4
839
840 #define OC3C_PORT PORTE
841 #define OC3C_BIT 5
842 #define INT5_PORT PORTE
843 #define INT5_BIT 5
844
845 #define T3_PORT PORTE
846 #define T3_BIT 6
847 #define INT6_PORT PORTE
848 #define INT6_BIT 6
849
850 #define IC3_PORT PORTE
851 #define IC3_BIT 7
852 #define INT7_PORT PORTE
853 #define INT7_BIT 7
854
855 #define ADC0_PORT PORTF
856 #define ADC0_BIT 0
857
858 #define ADC1_PORT PORTF
859 #define ADC1_BIT 1
860
861 #define ADC2_PORT PORTF
862 #define ADC2_BIT 2
863
864 #define ADC3_PORT PORTF
865 #define ADC3_BIT 3
866
867 #define ADC4_PORT PORTF
868 #define ADC4_BIT 4
869 #define TCK_PORT PORTF
870 #define TCK_BIT 4
871
872 #define ADC5_PORT PORTF
873 #define ADC5_BIT 5
874 #define TMS_PORT PORTF
875 #define TMS_BIT 5
876
877 #define ADC6_PORT PORTF
878 #define ADC6_BIT 6
879 #define TD0_PORT PORTF
880 #define TD0_BIT 6
881
882 #define ADC7_PORT PORTF
883 #define ADC7_BIT 7
884 #define TDI_PORT PORTF
885 #define TDI_BIT 7
886
887 #define WR_PORT PORTG
888 #define WR_BIT 0
889
890 #define RD_PORT PORTG
891 #define RD_BIT 1
892
893 #define ALE_PORT PORTG
894 #define ALE_BIT 2
895
896 #define TOSC2_PORT PORTG
897 #define TOSC2_BIT 3
898
899 #define TOSC1_PORT PORTG
900 #define TOSC1_BIT 4
901
902