init
[protos/xbee-avr.git] / aversive / parts / AT90CAN128.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_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
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          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
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_32         3
70 #define TIMER2_PRESCALER_DIV_64         4
71 #define TIMER2_PRESCALER_DIV_128        5
72 #define TIMER2_PRESCALER_DIV_256        6
73 #define TIMER2_PRESCALER_DIV_1024       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          32
79 #define TIMER2_PRESCALER_REG_4          64
80 #define TIMER2_PRESCALER_REG_5          128
81 #define TIMER2_PRESCALER_REG_6          256
82 #define TIMER2_PRESCALER_REG_7          1024
83
84 /* prescalers timer 3 */
85 #define TIMER3_PRESCALER_DIV_0          0
86 #define TIMER3_PRESCALER_DIV_1          1
87 #define TIMER3_PRESCALER_DIV_8          2
88 #define TIMER3_PRESCALER_DIV_64         3
89 #define TIMER3_PRESCALER_DIV_256        4
90 #define TIMER3_PRESCALER_DIV_1024       5
91 #define TIMER3_PRESCALER_DIV_FALL       6
92 #define TIMER3_PRESCALER_DIV_RISE       7
93
94 #define TIMER3_PRESCALER_REG_0          0
95 #define TIMER3_PRESCALER_REG_1          1
96 #define TIMER3_PRESCALER_REG_2          8
97 #define TIMER3_PRESCALER_REG_3          64
98 #define TIMER3_PRESCALER_REG_4          256
99 #define TIMER3_PRESCALER_REG_5          1024
100 #define TIMER3_PRESCALER_REG_6          -1
101 #define TIMER3_PRESCALER_REG_7          -2
102
103
104 /* available timers */
105 #define TIMER0_AVAILABLE
106 #define TIMER1_AVAILABLE
107 #define TIMER1A_AVAILABLE
108 #define TIMER1B_AVAILABLE
109 #define TIMER1C_AVAILABLE
110 #define TIMER2_AVAILABLE
111 #define TIMER3_AVAILABLE
112 #define TIMER3A_AVAILABLE
113 #define TIMER3B_AVAILABLE
114 #define TIMER3C_AVAILABLE
115
116 /* overflow interrupt number */
117 #define SIG_OVERFLOW0_NUM 0
118 #define SIG_OVERFLOW1_NUM 1
119 #define SIG_OVERFLOW2_NUM 2
120 #define SIG_OVERFLOW3_NUM 3
121 #define SIG_OVERFLOW_TOTAL_NUM 4
122
123 /* output compare interrupt number */
124 #define SIG_OUTPUT_COMPARE0_NUM 0
125 #define SIG_OUTPUT_COMPARE1A_NUM 1
126 #define SIG_OUTPUT_COMPARE1B_NUM 2
127 #define SIG_OUTPUT_COMPARE1C_NUM 3
128 #define SIG_OUTPUT_COMPARE2_NUM 4
129 #define SIG_OUTPUT_COMPARE3A_NUM 5
130 #define SIG_OUTPUT_COMPARE3B_NUM 6
131 #define SIG_OUTPUT_COMPARE3C_NUM 7
132 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 8
133
134 /* Pwm nums */
135 #define PWM0_NUM 0
136 #define PWM1A_NUM 1
137 #define PWM1B_NUM 2
138 #define PWM1C_NUM 3
139 #define PWM2_NUM 4
140 #define PWM3A_NUM 5
141 #define PWM3B_NUM 6
142 #define PWM3C_NUM 7
143 #define PWM_TOTAL_NUM 8
144
145 /* input capture interrupt number */
146 #define SIG_INPUT_CAPTURE1_NUM 0
147 #define SIG_INPUT_CAPTURE3_NUM 1
148 #define SIG_INPUT_CAPTURE_TOTAL_NUM 2
149
150
151 /* WDTCR */
152 #define WDP0_REG             WDTCR
153 #define WDP1_REG             WDTCR
154 #define WDP2_REG             WDTCR
155 #define WDE_REG              WDTCR
156 #define WDCE_REG             WDTCR
157
158 /* ADMUX */
159 #define MUX0_REG             ADMUX
160 #define MUX1_REG             ADMUX
161 #define MUX2_REG             ADMUX
162 #define MUX3_REG             ADMUX
163 #define MUX4_REG             ADMUX
164 #define ADLAR_REG            ADMUX
165 #define REFS0_REG            ADMUX
166 #define REFS1_REG            ADMUX
167
168 /* EEDR */
169 #define EEDR0_REG            EEDR
170 #define EEDR1_REG            EEDR
171 #define EEDR2_REG            EEDR
172 #define EEDR3_REG            EEDR
173 #define EEDR4_REG            EEDR
174 #define EEDR5_REG            EEDR
175 #define EEDR6_REG            EEDR
176 #define EEDR7_REG            EEDR
177
178 /* RAMPZ */
179 #define RAMPZ0_REG           RAMPZ
180
181 /* OCR2A */
182 #define OCR2A0_REG           OCR2A
183 #define OCR2A1_REG           OCR2A
184 #define OCR2A2_REG           OCR2A
185 #define OCR2A3_REG           OCR2A
186 #define OCR2A4_REG           OCR2A
187 #define OCR2A5_REG           OCR2A
188 #define OCR2A6_REG           OCR2A
189 #define OCR2A7_REG           OCR2A
190
191 /* SPDR */
192 #define SPDR0_REG            SPDR
193 #define SPDR1_REG            SPDR
194 #define SPDR2_REG            SPDR
195 #define SPDR3_REG            SPDR
196 #define SPDR4_REG            SPDR
197 #define SPDR5_REG            SPDR
198 #define SPDR6_REG            SPDR
199 #define SPDR7_REG            SPDR
200
201 /* SPSR */
202 #define SPI2X_REG            SPSR
203 #define WCOL_REG             SPSR
204 #define SPIF_REG             SPSR
205
206 /* ICR1H */
207 #define ICR1H0_REG           ICR1H
208 #define ICR1H1_REG           ICR1H
209 #define ICR1H2_REG           ICR1H
210 #define ICR1H3_REG           ICR1H
211 #define ICR1H4_REG           ICR1H
212 #define ICR1H5_REG           ICR1H
213 #define ICR1H6_REG           ICR1H
214 #define ICR1H7_REG           ICR1H
215
216 /* ICR1L */
217 #define ICR1L0_REG           ICR1L
218 #define ICR1L1_REG           ICR1L
219 #define ICR1L2_REG           ICR1L
220 #define ICR1L3_REG           ICR1L
221 #define ICR1L4_REG           ICR1L
222 #define ICR1L5_REG           ICR1L
223 #define ICR1L6_REG           ICR1L
224 #define ICR1L7_REG           ICR1L
225
226 /* EEARH */
227 #define EEAR8_REG            EEARH
228 #define EEAR9_REG            EEARH
229 #define EEAR10_REG           EEARH
230 #define EEAR11_REG           EEARH
231
232 /* CANGSTA */
233 #define ERRP_REG             CANGSTA
234 #define BOFF_REG             CANGSTA
235 #define ENFG_REG             CANGSTA
236 #define RXBSY_REG            CANGSTA
237 #define TXBSY_REG            CANGSTA
238 #define OVRG_REG             CANGSTA
239
240 /* CANGCON */
241 #define SWRES_REG            CANGCON
242 #define ENASTB_REG           CANGCON
243 #define TEST_REG             CANGCON
244 #define LISTEN_REG           CANGCON
245 #define SYNTTC_REG           CANGCON
246 #define TTC_REG              CANGCON
247 #define OVRQ_REG             CANGCON
248 #define ABRQ_REG             CANGCON
249
250 /* PORTG */
251 #define PORTG0_REG           PORTG
252 #define PORTG1_REG           PORTG
253 #define PORTG2_REG           PORTG
254 #define PORTG3_REG           PORTG
255 #define PORTG4_REG           PORTG
256
257 /* UCSR0C */
258 #define UCPOL0_REG           UCSR0C
259 #define UCSZ00_REG           UCSR0C
260 #define UCSZ01_REG           UCSR0C
261 #define USBS0_REG            UCSR0C
262 #define UPM00_REG            UCSR0C
263 #define UPM01_REG            UCSR0C
264 #define UMSEL0_REG           UCSR0C
265
266 /* UCSR0B */
267 #define TXB80_REG            UCSR0B
268 #define RXB80_REG            UCSR0B
269 #define UCSZ02_REG           UCSR0B
270 #define TXEN0_REG            UCSR0B
271 #define RXEN0_REG            UCSR0B
272 #define UDRIE0_REG           UCSR0B
273 #define TXCIE0_REG           UCSR0B
274 #define RXCIE0_REG           UCSR0B
275
276 /* TCNT1H */
277 #define TCNT1H0_REG          TCNT1H
278 #define TCNT1H1_REG          TCNT1H
279 #define TCNT1H2_REG          TCNT1H
280 #define TCNT1H3_REG          TCNT1H
281 #define TCNT1H4_REG          TCNT1H
282 #define TCNT1H5_REG          TCNT1H
283 #define TCNT1H6_REG          TCNT1H
284 #define TCNT1H7_REG          TCNT1H
285
286 /* PORTC */
287 #define PORTC0_REG           PORTC
288 #define PORTC1_REG           PORTC
289 #define PORTC2_REG           PORTC
290 #define PORTC3_REG           PORTC
291 #define PORTC4_REG           PORTC
292 #define PORTC5_REG           PORTC
293 #define PORTC6_REG           PORTC
294 #define PORTC7_REG           PORTC
295
296 /* PORTA */
297 #define PORTA0_REG           PORTA
298 #define PORTA1_REG           PORTA
299 #define PORTA2_REG           PORTA
300 #define PORTA3_REG           PORTA
301 #define PORTA4_REG           PORTA
302 #define PORTA5_REG           PORTA
303 #define PORTA6_REG           PORTA
304 #define PORTA7_REG           PORTA
305
306 /* EEARL */
307 #define EEARL0_REG           EEARL
308 #define EEARL1_REG           EEARL
309 #define EEARL2_REG           EEARL
310 #define EEARL3_REG           EEARL
311 #define EEARL4_REG           EEARL
312 #define EEARL5_REG           EEARL
313 #define EEARL6_REG           EEARL
314 #define EEARL7_REG           EEARL
315
316 /* EIMSK */
317 #define INT0_REG             EIMSK
318 #define INT1_REG             EIMSK
319 #define INT2_REG             EIMSK
320 #define INT3_REG             EIMSK
321 #define INT4_REG             EIMSK
322 #define INT5_REG             EIMSK
323 #define INT6_REG             EIMSK
324 #define INT7_REG             EIMSK
325
326 /* UDR1 */
327 #define UDR10_REG            UDR1
328 #define UDR11_REG            UDR1
329 #define UDR12_REG            UDR1
330 #define UDR13_REG            UDR1
331 #define UDR14_REG            UDR1
332 #define UDR15_REG            UDR1
333 #define UDR16_REG            UDR1
334 #define UDR17_REG            UDR1
335
336 /* UDR0 */
337 #define UDR00_REG            UDR0
338 #define UDR01_REG            UDR0
339 #define UDR02_REG            UDR0
340 #define UDR03_REG            UDR0
341 #define UDR04_REG            UDR0
342 #define UDR05_REG            UDR0
343 #define UDR06_REG            UDR0
344 #define UDR07_REG            UDR0
345
346 /* GPIOR2 */
347 #define GPIOR20_REG          GPIOR2
348 #define GPIOR21_REG          GPIOR2
349 #define GPIOR22_REG          GPIOR2
350 #define GPIOR23_REG          GPIOR2
351 #define GPIOR24_REG          GPIOR2
352 #define GPIOR25_REG          GPIOR2
353 #define GPIOR26_REG          GPIOR2
354 #define GPIOR27_REG          GPIOR2
355
356 /* EICRB */
357 #define ISC40_REG            EICRB
358 #define ISC41_REG            EICRB
359 #define ISC50_REG            EICRB
360 #define ISC51_REG            EICRB
361 #define ISC60_REG            EICRB
362 #define ISC61_REG            EICRB
363 #define ISC70_REG            EICRB
364 #define ISC71_REG            EICRB
365
366 /* EICRA */
367 #define ISC00_REG            EICRA
368 #define ISC01_REG            EICRA
369 #define ISC10_REG            EICRA
370 #define ISC11_REG            EICRA
371 #define ISC20_REG            EICRA
372 #define ISC21_REG            EICRA
373 #define ISC30_REG            EICRA
374 #define ISC31_REG            EICRA
375
376 /* DIDR0 */
377 #define ADC0D_REG            DIDR0
378 #define ADC1D_REG            DIDR0
379 #define ADC2D_REG            DIDR0
380 #define ADC3D_REG            DIDR0
381 #define ADC4D_REG            DIDR0
382 #define ADC5D_REG            DIDR0
383 #define ADC6D_REG            DIDR0
384 #define ADC7D_REG            DIDR0
385
386 /* DIDR1 */
387 #define AIN0D_REG            DIDR1
388 #define AIN1D_REG            DIDR1
389
390 /* DDRF */
391 #define DDF0_REG             DDRF
392 #define DDF1_REG             DDRF
393 #define DDF2_REG             DDRF
394 #define DDF3_REG             DDRF
395 #define DDF4_REG             DDRF
396 #define DDF5_REG             DDRF
397 #define DDF6_REG             DDRF
398 #define DDF7_REG             DDRF
399
400 /* ASSR */
401 #define TCR2UB_REG           ASSR
402 #define OCR2UB_REG           ASSR
403 #define TCN2UB_REG           ASSR
404 #define AS2_REG              ASSR
405 #define EXCLK_REG            ASSR
406
407 /* CLKPR */
408 #define CLKPS0_REG           CLKPR
409 #define CLKPS1_REG           CLKPR
410 #define CLKPS2_REG           CLKPR
411 #define CLKPS3_REG           CLKPR
412 #define CLKPCE_REG           CLKPR
413
414 /* SREG */
415 #define C_REG                SREG
416 #define Z_REG                SREG
417 #define N_REG                SREG
418 #define V_REG                SREG
419 #define S_REG                SREG
420 #define H_REG                SREG
421 #define T_REG                SREG
422 #define I_REG                SREG
423
424 /* CANIDM1 */
425 #define IDMSK21_REG          CANIDM1
426 #define IDMSK22_REG          CANIDM1
427 #define IDMSK23_REG          CANIDM1
428 #define IDMSK24_REG          CANIDM1
429 #define IDMSK25_REG          CANIDM1
430 #define IDMSK26_REG          CANIDM1
431 #define IDMSK27_REG          CANIDM1
432 #define IDMSK28_REG          CANIDM1
433
434 /* CANIDM3 */
435 #define IDMSK5_REG           CANIDM3
436 #define IDMSK6_REG           CANIDM3
437 #define IDMSK7_REG           CANIDM3
438 #define IDMSK8_REG           CANIDM3
439 #define IDMSK9_REG           CANIDM3
440 #define IDMSK10_REG          CANIDM3
441 #define IDMSK11_REG          CANIDM3
442 #define IDMSK12_REG          CANIDM3
443
444 /* CANIDM2 */
445 #define IDMSK13_REG          CANIDM2
446 #define IDMSK14_REG          CANIDM2
447 #define IDMSK15_REG          CANIDM2
448 #define IDMSK16_REG          CANIDM2
449 #define IDMSK17_REG          CANIDM2
450 #define IDMSK18_REG          CANIDM2
451 #define IDMSK19_REG          CANIDM2
452 #define IDMSK20_REG          CANIDM2
453
454 /* CANIDM4 */
455 #define IDEMSK_REG           CANIDM4
456 #define RTRMSK_REG           CANIDM4
457 #define IDMSK0_REG           CANIDM4
458 #define IDMSK1_REG           CANIDM4
459 #define IDMSK2_REG           CANIDM4
460 #define IDMSK3_REG           CANIDM4
461 #define IDMSK4_REG           CANIDM4
462
463 /* UBRR1L */
464 /* #define UBRR0_REG            UBRR1L */ /* dup in UBRR0L */
465 /* #define UBRR1_REG            UBRR1L */ /* dup in UBRR0L */
466 /* #define UBRR2_REG            UBRR1L */ /* dup in UBRR0L */
467 /* #define UBRR3_REG            UBRR1L */ /* dup in UBRR0L */
468 /* #define UBRR4_REG            UBRR1L */ /* dup in UBRR0L */
469 /* #define UBRR5_REG            UBRR1L */ /* dup in UBRR0L */
470 /* #define UBRR6_REG            UBRR1L */ /* dup in UBRR0L */
471 /* #define UBRR7_REG            UBRR1L */ /* dup in UBRR0L */
472
473 /* DDRC */
474 #define DDC0_REG             DDRC
475 #define DDC1_REG             DDRC
476 #define DDC2_REG             DDRC
477 #define DDC3_REG             DDRC
478 #define DDC4_REG             DDRC
479 #define DDC5_REG             DDRC
480 #define DDC6_REG             DDRC
481 #define DDC7_REG             DDRC
482
483 /* OCR3AL */
484 #define OCR3AL0_REG          OCR3AL
485 #define OCR3AL1_REG          OCR3AL
486 #define OCR3AL2_REG          OCR3AL
487 #define OCR3AL3_REG          OCR3AL
488 #define OCR3AL4_REG          OCR3AL
489 #define OCR3AL5_REG          OCR3AL
490 #define OCR3AL6_REG          OCR3AL
491 #define OCR3AL7_REG          OCR3AL
492
493 /* DDRA */
494 #define DDA0_REG             DDRA
495 #define DDA1_REG             DDRA
496 #define DDA2_REG             DDRA
497 #define DDA3_REG             DDRA
498 #define DDA4_REG             DDRA
499 #define DDA5_REG             DDRA
500 #define DDA6_REG             DDRA
501 #define DDA7_REG             DDRA
502
503 /* UBRR1H */
504 /* #define UBRR8_REG            UBRR1H */ /* dup in UBRR0H */
505 /* #define UBRR9_REG            UBRR1H */ /* dup in UBRR0H */
506 /* #define UBRR10_REG           UBRR1H */ /* dup in UBRR0H */
507 /* #define UBRR11_REG           UBRR1H */ /* dup in UBRR0H */
508
509 /* DDRG */
510 #define DDG0_REG             DDRG
511 #define DDG1_REG             DDRG
512 #define DDG2_REG             DDRG
513 #define DDG3_REG             DDRG
514 #define DDG4_REG             DDRG
515
516 /* OCR3AH */
517 #define OCR3AH0_REG          OCR3AH
518 #define OCR3AH1_REG          OCR3AH
519 #define OCR3AH2_REG          OCR3AH
520 #define OCR3AH3_REG          OCR3AH
521 #define OCR3AH4_REG          OCR3AH
522 #define OCR3AH5_REG          OCR3AH
523 #define OCR3AH6_REG          OCR3AH
524 #define OCR3AH7_REG          OCR3AH
525
526 /* TCCR1B */
527 #define CS10_REG             TCCR1B
528 #define CS11_REG             TCCR1B
529 #define CS12_REG             TCCR1B
530 #define WGM12_REG            TCCR1B
531 #define WGM13_REG            TCCR1B
532 #define ICES1_REG            TCCR1B
533 #define ICNC1_REG            TCCR1B
534
535 /* OSCCAL */
536 #define CAL0_REG             OSCCAL
537 #define CAL1_REG             OSCCAL
538 #define CAL2_REG             OSCCAL
539 #define CAL3_REG             OSCCAL
540 #define CAL4_REG             OSCCAL
541 #define CAL5_REG             OSCCAL
542 #define CAL6_REG             OSCCAL
543
544 /* DDRD */
545 #define DDD0_REG             DDRD
546 #define DDD1_REG             DDRD
547 #define DDD2_REG             DDRD
548 #define DDD3_REG             DDRD
549 #define DDD4_REG             DDRD
550 #define DDD5_REG             DDRD
551 #define DDD6_REG             DDRD
552 #define DDD7_REG             DDRD
553
554 /* GPIOR1 */
555 #define GPIOR10_REG          GPIOR1
556 #define GPIOR11_REG          GPIOR1
557 #define GPIOR12_REG          GPIOR1
558 #define GPIOR13_REG          GPIOR1
559 #define GPIOR14_REG          GPIOR1
560 #define GPIOR15_REG          GPIOR1
561 #define GPIOR16_REG          GPIOR1
562 #define GPIOR17_REG          GPIOR1
563
564 /* GPIOR0 */
565 #define GPIOR00_REG          GPIOR0
566 #define GPIOR01_REG          GPIOR0
567 #define GPIOR02_REG          GPIOR0
568 #define GPIOR03_REG          GPIOR0
569 #define GPIOR04_REG          GPIOR0
570 #define GPIOR05_REG          GPIOR0
571 #define GPIOR06_REG          GPIOR0
572 #define GPIOR07_REG          GPIOR0
573
574 /* TWBR */
575 #define TWBR0_REG            TWBR
576 #define TWBR1_REG            TWBR
577 #define TWBR2_REG            TWBR
578 #define TWBR3_REG            TWBR
579 #define TWBR4_REG            TWBR
580 #define TWBR5_REG            TWBR
581 #define TWBR6_REG            TWBR
582 #define TWBR7_REG            TWBR
583
584 /* CANGIT */
585 #define AERG_REG             CANGIT
586 #define FERG_REG             CANGIT
587 #define CERG_REG             CANGIT
588 #define SERG_REG             CANGIT
589 #define BXOK_REG             CANGIT
590 #define OVRTIM_REG           CANGIT
591 #define BOFFIT_REG           CANGIT
592 #define CANIT_REG            CANGIT
593
594 /* TCNT2 */
595 #define TCNT2_0_REG          TCNT2
596 #define TCNT2_1_REG          TCNT2
597 #define TCNT2_2_REG          TCNT2
598 #define TCNT2_3_REG          TCNT2
599 #define TCNT2_4_REG          TCNT2
600 #define TCNT2_5_REG          TCNT2
601 #define TCNT2_6_REG          TCNT2
602 #define TCNT2_7_REG          TCNT2
603
604 /* CANGIE */
605 #define ENOVRT_REG           CANGIE
606 #define ENERG_REG            CANGIE
607 #define ENBX_REG             CANGIE
608 #define ENERR_REG            CANGIE
609 #define ENTX_REG             CANGIE
610 #define ENRX_REG             CANGIE
611 #define ENBOFF_REG           CANGIE
612 #define ENIT_REG             CANGIE
613
614 /* TCNT0 */
615 #define TCNT0_0_REG          TCNT0
616 #define TCNT0_1_REG          TCNT0
617 #define TCNT0_2_REG          TCNT0
618 #define TCNT0_3_REG          TCNT0
619 #define TCNT0_4_REG          TCNT0
620 #define TCNT0_5_REG          TCNT0
621 #define TCNT0_6_REG          TCNT0
622 #define TCNT0_7_REG          TCNT0
623
624 /* TWAR */
625 #define TWGCE_REG            TWAR
626 #define TWA0_REG             TWAR
627 #define TWA1_REG             TWAR
628 #define TWA2_REG             TWAR
629 #define TWA3_REG             TWAR
630 #define TWA4_REG             TWAR
631 #define TWA5_REG             TWAR
632 #define TWA6_REG             TWAR
633
634 /* CANIE2 */
635 #define IEMOB0_REG           CANIE2
636 #define IEMOB1_REG           CANIE2
637 #define IEMOB2_REG           CANIE2
638 #define IEMOB3_REG           CANIE2
639 #define IEMOB4_REG           CANIE2
640 #define IEMOB5_REG           CANIE2
641 #define IEMOB6_REG           CANIE2
642 #define IEMOB7_REG           CANIE2
643
644 /* TCCR3C */
645 #define FOC3C_REG            TCCR3C
646 #define FOC3B_REG            TCCR3C
647 #define FOC3A_REG            TCCR3C
648
649 /* CANIE1 */
650 #define IEMOB8_REG           CANIE1
651 #define IEMOB9_REG           CANIE1
652 #define IEMOB10_REG          CANIE1
653 #define IEMOB11_REG          CANIE1
654 #define IEMOB12_REG          CANIE1
655 #define IEMOB13_REG          CANIE1
656 #define IEMOB14_REG          CANIE1
657
658 /* TCCR0A */
659 #define CS00_REG             TCCR0A
660 #define CS01_REG             TCCR0A
661 #define CS02_REG             TCCR0A
662 #define WGM01_REG            TCCR0A
663 #define COM0A0_REG           TCCR0A
664 #define COM0A1_REG           TCCR0A
665 #define WGM00_REG            TCCR0A
666 #define FOC0A_REG            TCCR0A
667
668 /* TIFR2 */
669 #define TOV2_REG             TIFR2
670 #define OCF2A_REG            TIFR2
671
672 /* TIFR3 */
673 #define TOV3_REG             TIFR3
674 #define OCF3A_REG            TIFR3
675 #define OCF3B_REG            TIFR3
676 #define OCF3C_REG            TIFR3
677 #define ICF3_REG             TIFR3
678
679 /* SPCR */
680 #define SPR0_REG             SPCR
681 #define SPR1_REG             SPCR
682 #define CPHA_REG             SPCR
683 #define CPOL_REG             SPCR
684 #define MSTR_REG             SPCR
685 #define DORD_REG             SPCR
686 #define SPE_REG              SPCR
687 #define SPIE_REG             SPCR
688
689 /* TIFR1 */
690 #define TOV1_REG             TIFR1
691 #define OCF1A_REG            TIFR1
692 #define OCF1B_REG            TIFR1
693 #define OCF1C_REG            TIFR1
694 #define ICF1_REG             TIFR1
695
696 /* CANIDT4 */
697 #define RB0TAG_REG           CANIDT4
698 #define RB1TAG_REG           CANIDT4
699 #define RTRTAG_REG           CANIDT4
700 #define IDT0_REG             CANIDT4
701 #define IDT1_REG             CANIDT4
702 #define IDT2_REG             CANIDT4
703 #define IDT3_REG             CANIDT4
704 #define IDT4_REG             CANIDT4
705
706 /* CANIDT2 */
707 #define IDT13_REG            CANIDT2
708 #define IDT14_REG            CANIDT2
709 #define IDT15_REG            CANIDT2
710 #define IDT16_REG            CANIDT2
711 #define IDT17_REG            CANIDT2
712 #define IDT18_REG            CANIDT2
713 #define IDT19_REG            CANIDT2
714 #define IDT20_REG            CANIDT2
715
716 /* CANIDT3 */
717 #define IDT5_REG             CANIDT3
718 #define IDT6_REG             CANIDT3
719 #define IDT7_REG             CANIDT3
720 #define IDT8_REG             CANIDT3
721 #define IDT9_REG             CANIDT3
722 #define IDT10_REG            CANIDT3
723 #define IDT11_REG            CANIDT3
724 #define IDT12_REG            CANIDT3
725
726 /* CANIDT1 */
727 #define IDT21_REG            CANIDT1
728 #define IDT22_REG            CANIDT1
729 #define IDT23_REG            CANIDT1
730 #define IDT24_REG            CANIDT1
731 #define IDT25_REG            CANIDT1
732 #define IDT26_REG            CANIDT1
733 #define IDT27_REG            CANIDT1
734 #define IDT28_REG            CANIDT1
735
736 /* CANSIT1 */
737 #define SIT8_REG             CANSIT1
738 #define SIT9_REG             CANSIT1
739 #define SIT10_REG            CANSIT1
740 #define SIT11_REG            CANSIT1
741 #define SIT12_REG            CANSIT1
742 #define SIT13_REG            CANSIT1
743 #define SIT14_REG            CANSIT1
744
745 /* OCR3CH */
746 #define OCR3CH0_REG          OCR3CH
747 #define OCR3CH1_REG          OCR3CH
748 #define OCR3CH2_REG          OCR3CH
749 #define OCR3CH3_REG          OCR3CH
750 #define OCR3CH4_REG          OCR3CH
751 #define OCR3CH5_REG          OCR3CH
752 #define OCR3CH6_REG          OCR3CH
753 #define OCR3CH7_REG          OCR3CH
754
755 /* OCR3CL */
756 #define OCR3CL0_REG          OCR3CL
757 #define OCR3CL1_REG          OCR3CL
758 #define OCR3CL2_REG          OCR3CL
759 #define OCR3CL3_REG          OCR3CL
760 #define OCR3CL4_REG          OCR3CL
761 #define OCR3CL5_REG          OCR3CL
762 #define OCR3CL6_REG          OCR3CL
763 #define OCR3CL7_REG          OCR3CL
764
765 /* GTCCR */
766 #define PSR310_REG           GTCCR
767 #define TSM_REG              GTCCR
768 #define PSR2_REG             GTCCR
769
770 /* CANCDMOB */
771 #define DLC0_REG             CANCDMOB
772 #define DLC1_REG             CANCDMOB
773 #define DLC2_REG             CANCDMOB
774 #define DLC3_REG             CANCDMOB
775 #define IDE_REG              CANCDMOB
776 #define RPLV_REG             CANCDMOB
777 #define CONMOB0_REG          CANCDMOB
778 #define CONMOB1_REG          CANCDMOB
779
780 /* SPH */
781 #define SP8_REG              SPH
782 #define SP9_REG              SPH
783 #define SP10_REG             SPH
784 #define SP11_REG             SPH
785 #define SP12_REG             SPH
786 #define SP13_REG             SPH
787 #define SP14_REG             SPH
788 #define SP15_REG             SPH
789
790 /* CANSIT2 */
791 #define SIT0_REG             CANSIT2
792 #define SIT1_REG             CANSIT2
793 #define SIT2_REG             CANSIT2
794 #define SIT3_REG             CANSIT2
795 #define SIT4_REG             CANSIT2
796 #define SIT5_REG             CANSIT2
797 #define SIT6_REG             CANSIT2
798 #define SIT7_REG             CANSIT2
799
800 /* CANHPMOB */
801 #define CGP0_REG             CANHPMOB
802 #define CGP1_REG             CANHPMOB
803 #define CGP2_REG             CANHPMOB
804 #define CGP3_REG             CANHPMOB
805 #define HPMOB0_REG           CANHPMOB
806 #define HPMOB1_REG           CANHPMOB
807 #define HPMOB2_REG           CANHPMOB
808 #define HPMOB3_REG           CANHPMOB
809
810 /* TCCR3B */
811 #define CS30_REG             TCCR3B
812 #define CS31_REG             TCCR3B
813 #define CS32_REG             TCCR3B
814 #define WGM32_REG            TCCR3B
815 #define WGM33_REG            TCCR3B
816 #define ICES3_REG            TCCR3B
817 #define ICNC3_REG            TCCR3B
818
819 /* TCCR3A */
820 #define WGM30_REG            TCCR3A
821 #define WGM31_REG            TCCR3A
822 #define COM3C0_REG           TCCR3A
823 #define COM3C1_REG           TCCR3A
824 #define COM3B0_REG           TCCR3A
825 #define COM3B1_REG           TCCR3A
826 #define COM3A0_REG           TCCR3A
827 #define COM3A1_REG           TCCR3A
828
829 /* PORTF */
830 #define PORTF0_REG           PORTF
831 #define PORTF1_REG           PORTF
832 #define PORTF2_REG           PORTF
833 #define PORTF3_REG           PORTF
834 #define PORTF4_REG           PORTF
835 #define PORTF5_REG           PORTF
836 #define PORTF6_REG           PORTF
837 #define PORTF7_REG           PORTF
838
839 /* OCR1BL */
840 #define OCR1BL0_REG          OCR1BL
841 #define OCR1BL1_REG          OCR1BL
842 #define OCR1BL2_REG          OCR1BL
843 #define OCR1BL3_REG          OCR1BL
844 #define OCR1BL4_REG          OCR1BL
845 #define OCR1BL5_REG          OCR1BL
846 #define OCR1BL6_REG          OCR1BL
847 #define OCR1BL7_REG          OCR1BL
848
849 /* TCNT3H */
850 #define TCNT3H0_REG          TCNT3H
851 #define TCNT3H1_REG          TCNT3H
852 #define TCNT3H2_REG          TCNT3H
853 #define TCNT3H3_REG          TCNT3H
854 #define TCNT3H4_REG          TCNT3H
855 #define TCNT3H5_REG          TCNT3H
856 #define TCNT3H6_REG          TCNT3H
857 #define TCNT3H7_REG          TCNT3H
858
859 /* OCR1BH */
860 #define OCR1BH0_REG          OCR1BH
861 #define OCR1BH1_REG          OCR1BH
862 #define OCR1BH2_REG          OCR1BH
863 #define OCR1BH3_REG          OCR1BH
864 #define OCR1BH4_REG          OCR1BH
865 #define OCR1BH5_REG          OCR1BH
866 #define OCR1BH6_REG          OCR1BH
867 #define OCR1BH7_REG          OCR1BH
868
869 /* TCNT3L */
870 #define TCNT3L0_REG          TCNT3L
871 #define TCNT3L1_REG          TCNT3L
872 #define TCNT3L2_REG          TCNT3L
873 #define TCNT3L3_REG          TCNT3L
874 #define TCNT3L4_REG          TCNT3L
875 #define TCNT3L5_REG          TCNT3L
876 #define TCNT3L6_REG          TCNT3L
877 #define TCNT3L7_REG          TCNT3L
878
879 /* SPL */
880 #define SP0_REG              SPL
881 #define SP1_REG              SPL
882 #define SP2_REG              SPL
883 #define SP3_REG              SPL
884 #define SP4_REG              SPL
885 #define SP5_REG              SPL
886 #define SP6_REG              SPL
887 #define SP7_REG              SPL
888
889 /* MCUSR */
890 #define JTRF_REG             MCUSR
891 #define PORF_REG             MCUSR
892 #define EXTRF_REG            MCUSR
893 #define BORF_REG             MCUSR
894 #define WDRF_REG             MCUSR
895
896 /* EECR */
897 #define EERE_REG             EECR
898 #define EEWE_REG             EECR
899 #define EEMWE_REG            EECR
900 #define EERIE_REG            EECR
901
902 /* SMCR */
903 #define SE_REG               SMCR
904 #define SM0_REG              SMCR
905 #define SM1_REG              SMCR
906 #define SM2_REG              SMCR
907
908 /* TWCR */
909 #define TWIE_REG             TWCR
910 #define TWEN_REG             TWCR
911 #define TWWC_REG             TWCR
912 #define TWSTO_REG            TWCR
913 #define TWSTA_REG            TWCR
914 #define TWEA_REG             TWCR
915 #define TWINT_REG            TWCR
916
917 /* TCCR2A */
918 #define CS20_REG             TCCR2A
919 #define CS21_REG             TCCR2A
920 #define CS22_REG             TCCR2A
921 #define WGM21_REG            TCCR2A
922 #define COM2A0_REG           TCCR2A
923 #define COM2A1_REG           TCCR2A
924 #define WGM20_REG            TCCR2A
925 #define FOC2A_REG            TCCR2A
926
927 /* UBRR0H */
928 /* #define UBRR8_REG            UBRR0H */ /* dup in UBRR1H */
929 /* #define UBRR9_REG            UBRR0H */ /* dup in UBRR1H */
930 /* #define UBRR10_REG           UBRR0H */ /* dup in UBRR1H */
931 /* #define UBRR11_REG           UBRR0H */ /* dup in UBRR1H */
932
933 /* UBRR0L */
934 /* #define UBRR0_REG            UBRR0L */ /* dup in UBRR1L */
935 /* #define UBRR1_REG            UBRR0L */ /* dup in UBRR1L */
936 /* #define UBRR2_REG            UBRR0L */ /* dup in UBRR1L */
937 /* #define UBRR3_REG            UBRR0L */ /* dup in UBRR1L */
938 /* #define UBRR4_REG            UBRR0L */ /* dup in UBRR1L */
939 /* #define UBRR5_REG            UBRR0L */ /* dup in UBRR1L */
940 /* #define UBRR6_REG            UBRR0L */ /* dup in UBRR1L */
941 /* #define UBRR7_REG            UBRR0L */ /* dup in UBRR1L */
942
943 /* TWSR */
944 #define TWPS0_REG            TWSR
945 #define TWPS1_REG            TWSR
946 #define TWS3_REG             TWSR
947 #define TWS4_REG             TWSR
948 #define TWS5_REG             TWSR
949 #define TWS6_REG             TWSR
950 #define TWS7_REG             TWSR
951
952 /* CANPAGE */
953 #define INDX0_REG            CANPAGE
954 #define INDX1_REG            CANPAGE
955 #define INDX2_REG            CANPAGE
956 #define AINC_REG             CANPAGE
957 #define MOBNB0_REG           CANPAGE
958 #define MOBNB1_REG           CANPAGE
959 #define MOBNB2_REG           CANPAGE
960 #define MOBNB3_REG           CANPAGE
961
962 /* MCUCR */
963 #define JTD_REG              MCUCR
964 #define IVCE_REG             MCUCR
965 #define IVSEL_REG            MCUCR
966 #define PUD_REG              MCUCR
967
968 /* PINC */
969 #define PINC0_REG            PINC
970 #define PINC1_REG            PINC
971 #define PINC2_REG            PINC
972 #define PINC3_REG            PINC
973 #define PINC4_REG            PINC
974 #define PINC5_REG            PINC
975 #define PINC6_REG            PINC
976 #define PINC7_REG            PINC
977
978 /* OCR1CL */
979 #define OCR1CL0_REG          OCR1CL
980 #define OCR1CL1_REG          OCR1CL
981 #define OCR1CL2_REG          OCR1CL
982 #define OCR1CL3_REG          OCR1CL
983 #define OCR1CL4_REG          OCR1CL
984 #define OCR1CL5_REG          OCR1CL
985 #define OCR1CL6_REG          OCR1CL
986 #define OCR1CL7_REG          OCR1CL
987
988 /* OCR1CH */
989 #define OCR1CH0_REG          OCR1CH
990 #define OCR1CH1_REG          OCR1CH
991 #define OCR1CH2_REG          OCR1CH
992 #define OCR1CH3_REG          OCR1CH
993 #define OCR1CH4_REG          OCR1CH
994 #define OCR1CH5_REG          OCR1CH
995 #define OCR1CH6_REG          OCR1CH
996 #define OCR1CH7_REG          OCR1CH
997
998 /* OCDR */
999 #define OCDR0_REG            OCDR
1000 #define OCDR1_REG            OCDR
1001 #define OCDR2_REG            OCDR
1002 #define OCDR3_REG            OCDR
1003 #define OCDR4_REG            OCDR
1004 #define OCDR5_REG            OCDR
1005 #define OCDR6_REG            OCDR
1006 #define OCDR7_REG            OCDR
1007
1008 /* PINA */
1009 #define PINA0_REG            PINA
1010 #define PINA1_REG            PINA
1011 #define PINA2_REG            PINA
1012 #define PINA3_REG            PINA
1013 #define PINA4_REG            PINA
1014 #define PINA5_REG            PINA
1015 #define PINA6_REG            PINA
1016 #define PINA7_REG            PINA
1017
1018 /* CANSTMOB */
1019 #define AERR_REG             CANSTMOB
1020 #define FERR_REG             CANSTMOB
1021 #define CERR_REG             CANSTMOB
1022 #define SERR_REG             CANSTMOB
1023 #define BERR_REG             CANSTMOB
1024 #define RXOK_REG             CANSTMOB
1025 #define TXOK_REG             CANSTMOB
1026 #define DLCW_REG             CANSTMOB
1027
1028 /* UCSR1B */
1029 #define TXB81_REG            UCSR1B
1030 #define RXB81_REG            UCSR1B
1031 #define UCSZ12_REG           UCSR1B
1032 #define TXEN1_REG            UCSR1B
1033 #define RXEN1_REG            UCSR1B
1034 #define UDRIE1_REG           UCSR1B
1035 #define TXCIE1_REG           UCSR1B
1036 #define RXCIE1_REG           UCSR1B
1037
1038 /* UCSR1C */
1039 #define UCPOL1_REG           UCSR1C
1040 #define UCSZ10_REG           UCSR1C
1041 #define UCSZ11_REG           UCSR1C
1042 #define USBS1_REG            UCSR1C
1043 #define UPM10_REG            UCSR1C
1044 #define UPM11_REG            UCSR1C
1045 #define UMSEL1_REG           UCSR1C
1046
1047 /* UCSR1A */
1048 #define MPCM1_REG            UCSR1A
1049 #define U2X1_REG             UCSR1A
1050 #define UPE1_REG             UCSR1A
1051 #define DOR1_REG             UCSR1A
1052 #define FE1_REG              UCSR1A
1053 #define UDRE1_REG            UCSR1A
1054 #define TXC1_REG             UCSR1A
1055 #define RXC1_REG             UCSR1A
1056
1057 /* DDRB */
1058 #define DDB0_REG             DDRB
1059 #define DDB1_REG             DDRB
1060 #define DDB2_REG             DDRB
1061 #define DDB3_REG             DDRB
1062 #define DDB4_REG             DDRB
1063 #define DDB5_REG             DDRB
1064 #define DDB6_REG             DDRB
1065 #define DDB7_REG             DDRB
1066
1067 /* TWDR */
1068 #define TWD0_REG             TWDR
1069 #define TWD1_REG             TWDR
1070 #define TWD2_REG             TWDR
1071 #define TWD3_REG             TWDR
1072 #define TWD4_REG             TWDR
1073 #define TWD5_REG             TWDR
1074 #define TWD6_REG             TWDR
1075 #define TWD7_REG             TWDR
1076
1077 /* PORTB */
1078 #define PORTB0_REG           PORTB
1079 #define PORTB1_REG           PORTB
1080 #define PORTB2_REG           PORTB
1081 #define PORTB3_REG           PORTB
1082 #define PORTB4_REG           PORTB
1083 #define PORTB5_REG           PORTB
1084 #define PORTB6_REG           PORTB
1085 #define PORTB7_REG           PORTB
1086
1087 /* ADCSRA */
1088 #define ADPS0_REG            ADCSRA
1089 #define ADPS1_REG            ADCSRA
1090 #define ADPS2_REG            ADCSRA
1091 #define ADIE_REG             ADCSRA
1092 #define ADIF_REG             ADCSRA
1093 #define ADATE_REG            ADCSRA
1094 #define ADSC_REG             ADCSRA
1095 #define ADEN_REG             ADCSRA
1096
1097 /* CANEN2 */
1098 #define ENMOB0_REG           CANEN2
1099 #define ENMOB1_REG           CANEN2
1100 #define ENMOB2_REG           CANEN2
1101 #define ENMOB3_REG           CANEN2
1102 #define ENMOB4_REG           CANEN2
1103 #define ENMOB5_REG           CANEN2
1104 #define ENMOB6_REG           CANEN2
1105 #define ENMOB7_REG           CANEN2
1106
1107 /* CANEN1 */
1108 #define ENMOB8_REG           CANEN1
1109 #define ENMOB9_REG           CANEN1
1110 #define ENMOB10_REG          CANEN1
1111 #define ENMOB11_REG          CANEN1
1112 #define ENMOB12_REG          CANEN1
1113 #define ENMOB13_REG          CANEN1
1114 #define ENMOB14_REG          CANEN1
1115
1116 /* ADCSRB */
1117 #define ADTS0_REG            ADCSRB
1118 #define ADTS1_REG            ADCSRB
1119 #define ADTS2_REG            ADCSRB
1120 #define ADHSM_REG            ADCSRB
1121 #define ACME_REG             ADCSRB
1122
1123 /* TCCR1A */
1124 #define WGM10_REG            TCCR1A
1125 #define WGM11_REG            TCCR1A
1126 #define COM1C0_REG           TCCR1A
1127 #define COM1C1_REG           TCCR1A
1128 #define COM1B0_REG           TCCR1A
1129 #define COM1B1_REG           TCCR1A
1130 #define COM1A0_REG           TCCR1A
1131 #define COM1A1_REG           TCCR1A
1132
1133 /* OCR0A */
1134 #define OCR0A0_REG           OCR0A
1135 #define OCR0A1_REG           OCR0A
1136 #define OCR0A2_REG           OCR0A
1137 #define OCR0A3_REG           OCR0A
1138 #define OCR0A4_REG           OCR0A
1139 #define OCR0A5_REG           OCR0A
1140 #define OCR0A6_REG           OCR0A
1141 #define OCR0A7_REG           OCR0A
1142
1143 /* ACSR */
1144 #define ACIS0_REG            ACSR
1145 #define ACIS1_REG            ACSR
1146 #define ACIC_REG             ACSR
1147 #define ACIE_REG             ACSR
1148 #define ACI_REG              ACSR
1149 #define ACO_REG              ACSR
1150 #define ACBG_REG             ACSR
1151 #define ACD_REG              ACSR
1152
1153 /* UCSR0A */
1154 #define MPCM0_REG            UCSR0A
1155 #define U2X0_REG             UCSR0A
1156 #define UPE0_REG             UCSR0A
1157 #define DOR0_REG             UCSR0A
1158 #define FE0_REG              UCSR0A
1159 #define UDRE0_REG            UCSR0A
1160 #define TXC0_REG             UCSR0A
1161 #define RXC0_REG             UCSR0A
1162
1163 /* TCCR1C */
1164 #define FOC1C_REG            TCCR1C
1165 #define FOC1B_REG            TCCR1C
1166 #define FOC1A_REG            TCCR1C
1167
1168 /* ICR3H */
1169 #define ICR3H0_REG           ICR3H
1170 #define ICR3H1_REG           ICR3H
1171 #define ICR3H2_REG           ICR3H
1172 #define ICR3H3_REG           ICR3H
1173 #define ICR3H4_REG           ICR3H
1174 #define ICR3H5_REG           ICR3H
1175 #define ICR3H6_REG           ICR3H
1176 #define ICR3H7_REG           ICR3H
1177
1178 /* DDRE */
1179 #define DDE0_REG             DDRE
1180 #define DDE1_REG             DDRE
1181 #define DDE2_REG             DDRE
1182 #define DDE3_REG             DDRE
1183 #define DDE4_REG             DDRE
1184 #define DDE5_REG             DDRE
1185 #define DDE6_REG             DDRE
1186 #define DDE7_REG             DDRE
1187
1188 /* PORTD */
1189 #define PORTD0_REG           PORTD
1190 #define PORTD1_REG           PORTD
1191 #define PORTD2_REG           PORTD
1192 #define PORTD3_REG           PORTD
1193 #define PORTD4_REG           PORTD
1194 #define PORTD5_REG           PORTD
1195 #define PORTD6_REG           PORTD
1196 #define PORTD7_REG           PORTD
1197
1198 /* ICR3L */
1199 #define ICR3L0_REG           ICR3L
1200 #define ICR3L1_REG           ICR3L
1201 #define ICR3L2_REG           ICR3L
1202 #define ICR3L3_REG           ICR3L
1203 #define ICR3L4_REG           ICR3L
1204 #define ICR3L5_REG           ICR3L
1205 #define ICR3L6_REG           ICR3L
1206 #define ICR3L7_REG           ICR3L
1207
1208 /* PORTE */
1209 #define PORTE0_REG           PORTE
1210 #define PORTE1_REG           PORTE
1211 #define PORTE2_REG           PORTE
1212 #define PORTE3_REG           PORTE
1213 #define PORTE4_REG           PORTE
1214 #define PORTE5_REG           PORTE
1215 #define PORTE6_REG           PORTE
1216 #define PORTE7_REG           PORTE
1217
1218 /* SPMCSR */
1219 #define SPMEN_REG            SPMCSR
1220 #define PGERS_REG            SPMCSR
1221 #define PGWRT_REG            SPMCSR
1222 #define BLBSET_REG           SPMCSR
1223 #define RWWSRE_REG           SPMCSR
1224 #define RWWSB_REG            SPMCSR
1225 #define SPMIE_REG            SPMCSR
1226
1227 /* CANBT2 */
1228 #define PRS0_REG             CANBT2
1229 #define PRS1_REG             CANBT2
1230 #define PRS2_REG             CANBT2
1231 #define SJW0_REG             CANBT2
1232 #define SJW1_REG             CANBT2
1233
1234 /* CANBT3 */
1235 #define SMP_REG              CANBT3
1236 #define PHS10_REG            CANBT3
1237 #define PHS11_REG            CANBT3
1238 #define PHS12_REG            CANBT3
1239 #define PHS20_REG            CANBT3
1240 #define PHS21_REG            CANBT3
1241 #define PHS22_REG            CANBT3
1242
1243 /* ADCL */
1244 #define ADCL0_REG            ADCL
1245 #define ADCL1_REG            ADCL
1246 #define ADCL2_REG            ADCL
1247 #define ADCL3_REG            ADCL
1248 #define ADCL4_REG            ADCL
1249 #define ADCL5_REG            ADCL
1250 #define ADCL6_REG            ADCL
1251 #define ADCL7_REG            ADCL
1252
1253 /* CANBT1 */
1254 #define BRP0_REG             CANBT1
1255 #define BRP1_REG             CANBT1
1256 #define BRP2_REG             CANBT1
1257 #define BRP3_REG             CANBT1
1258 #define BRP4_REG             CANBT1
1259 #define BRP5_REG             CANBT1
1260
1261 /* ADCH */
1262 #define ADCH0_REG            ADCH
1263 #define ADCH1_REG            ADCH
1264 #define ADCH2_REG            ADCH
1265 #define ADCH3_REG            ADCH
1266 #define ADCH4_REG            ADCH
1267 #define ADCH5_REG            ADCH
1268 #define ADCH6_REG            ADCH
1269 #define ADCH7_REG            ADCH
1270
1271 /* OCR3BL */
1272 #define OCR3BL0_REG          OCR3BL
1273 #define OCR3BL1_REG          OCR3BL
1274 #define OCR3BL2_REG          OCR3BL
1275 #define OCR3BL3_REG          OCR3BL
1276 #define OCR3BL4_REG          OCR3BL
1277 #define OCR3BL5_REG          OCR3BL
1278 #define OCR3BL6_REG          OCR3BL
1279 #define OCR3BL7_REG          OCR3BL
1280
1281 /* OCR3BH */
1282 #define OCR3BH0_REG          OCR3BH
1283 #define OCR3BH1_REG          OCR3BH
1284 #define OCR3BH2_REG          OCR3BH
1285 #define OCR3BH3_REG          OCR3BH
1286 #define OCR3BH4_REG          OCR3BH
1287 #define OCR3BH5_REG          OCR3BH
1288 #define OCR3BH6_REG          OCR3BH
1289 #define OCR3BH7_REG          OCR3BH
1290
1291 /* TIMSK2 */
1292 #define TOIE2_REG            TIMSK2
1293 #define OCIE2A_REG           TIMSK2
1294
1295 /* TIMSK3 */
1296 #define TOIE3_REG            TIMSK3
1297 #define OCIE3A_REG           TIMSK3
1298 #define OCIE3B_REG           TIMSK3
1299 #define OCIE3C_REG           TIMSK3
1300 #define ICIE3_REG            TIMSK3
1301
1302 /* TIMSK0 */
1303 #define TOIE0_REG            TIMSK0
1304 #define OCIE0A_REG           TIMSK0
1305
1306 /* TIMSK1 */
1307 #define TOIE1_REG            TIMSK1
1308 #define OCIE1A_REG           TIMSK1
1309 #define OCIE1B_REG           TIMSK1
1310 #define OCIE1C_REG           TIMSK1
1311 #define ICIE1_REG            TIMSK1
1312
1313 /* XMCRB */
1314 #define XMM0_REG             XMCRB
1315 #define XMM1_REG             XMCRB
1316 #define XMM2_REG             XMCRB
1317 #define XMBK_REG             XMCRB
1318
1319 /* XMCRA */
1320 #define SRW00_REG            XMCRA
1321 #define SRW01_REG            XMCRA
1322 #define SRW10_REG            XMCRA
1323 #define SRW11_REG            XMCRA
1324 #define SRL0_REG             XMCRA
1325 #define SRL1_REG             XMCRA
1326 #define SRL2_REG             XMCRA
1327 #define SRE_REG              XMCRA
1328
1329 /* TCNT1L */
1330 #define TCNT1L0_REG          TCNT1L
1331 #define TCNT1L1_REG          TCNT1L
1332 #define TCNT1L2_REG          TCNT1L
1333 #define TCNT1L3_REG          TCNT1L
1334 #define TCNT1L4_REG          TCNT1L
1335 #define TCNT1L5_REG          TCNT1L
1336 #define TCNT1L6_REG          TCNT1L
1337 #define TCNT1L7_REG          TCNT1L
1338
1339 /* PINB */
1340 #define PINB0_REG            PINB
1341 #define PINB1_REG            PINB
1342 #define PINB2_REG            PINB
1343 #define PINB3_REG            PINB
1344 #define PINB4_REG            PINB
1345 #define PINB5_REG            PINB
1346 #define PINB6_REG            PINB
1347 #define PINB7_REG            PINB
1348
1349 /* EIFR */
1350 #define INTF0_REG            EIFR
1351 #define INTF1_REG            EIFR
1352 #define INTF2_REG            EIFR
1353 #define INTF3_REG            EIFR
1354 #define INTF4_REG            EIFR
1355 #define INTF5_REG            EIFR
1356 #define INTF6_REG            EIFR
1357 #define INTF7_REG            EIFR
1358
1359 /* PING */
1360 #define PING0_REG            PING
1361 #define PING1_REG            PING
1362 #define PING2_REG            PING
1363 #define PING3_REG            PING
1364 #define PING4_REG            PING
1365
1366 /* PINF */
1367 #define PINF0_REG            PINF
1368 #define PINF1_REG            PINF
1369 #define PINF2_REG            PINF
1370 #define PINF3_REG            PINF
1371 #define PINF4_REG            PINF
1372 #define PINF5_REG            PINF
1373 #define PINF6_REG            PINF
1374 #define PINF7_REG            PINF
1375
1376 /* PINE */
1377 #define PINE0_REG            PINE
1378 #define PINE1_REG            PINE
1379 #define PINE2_REG            PINE
1380 #define PINE3_REG            PINE
1381 #define PINE4_REG            PINE
1382 #define PINE5_REG            PINE
1383 #define PINE6_REG            PINE
1384 #define PINE7_REG            PINE
1385
1386 /* PIND */
1387 #define PIND0_REG            PIND
1388 #define PIND1_REG            PIND
1389 #define PIND2_REG            PIND
1390 #define PIND3_REG            PIND
1391 #define PIND4_REG            PIND
1392 #define PIND5_REG            PIND
1393 #define PIND6_REG            PIND
1394 #define PIND7_REG            PIND
1395
1396 /* OCR1AH */
1397 #define OCR1AH0_REG          OCR1AH
1398 #define OCR1AH1_REG          OCR1AH
1399 #define OCR1AH2_REG          OCR1AH
1400 #define OCR1AH3_REG          OCR1AH
1401 #define OCR1AH4_REG          OCR1AH
1402 #define OCR1AH5_REG          OCR1AH
1403 #define OCR1AH6_REG          OCR1AH
1404 #define OCR1AH7_REG          OCR1AH
1405
1406 /* OCR1AL */
1407 #define OCR1AL0_REG          OCR1AL
1408 #define OCR1AL1_REG          OCR1AL
1409 #define OCR1AL2_REG          OCR1AL
1410 #define OCR1AL3_REG          OCR1AL
1411 #define OCR1AL4_REG          OCR1AL
1412 #define OCR1AL5_REG          OCR1AL
1413 #define OCR1AL6_REG          OCR1AL
1414 #define OCR1AL7_REG          OCR1AL
1415
1416 /* TIFR0 */
1417 #define TOV0_REG             TIFR0
1418 #define OCF0A_REG            TIFR0
1419
1420 /* pins mapping */
1421 #define AD0_PORT PORTA
1422 #define AD0_BIT 0
1423
1424 #define AD1_PORT PORTA
1425 #define AD1_BIT 1
1426
1427 #define AD2_PORT PORTA
1428 #define AD2_BIT 2
1429
1430 #define AD3_PORT PORTA
1431 #define AD3_BIT 3
1432
1433 #define AD4_PORT PORTA
1434 #define AD4_BIT 4
1435
1436 #define AD5_PORT PORTA
1437 #define AD5_BIT 5
1438
1439 #define AD6_PORT PORTA
1440 #define AD6_BIT 6
1441
1442 #define AD7_PORT PORTA
1443 #define AD7_BIT 7
1444
1445 #define SS_PORT PORTB
1446 #define SS_BIT 0
1447
1448 #define SCK_PORT PORTB
1449 #define SCK_BIT 1
1450
1451 #define MOSI_PORT PORTB
1452 #define MOSI_BIT 2
1453
1454 #define MISO_PORT PORTB
1455 #define MISO_BIT 3
1456
1457 #define OC0_PORT PORTB
1458 #define OC0_BIT 4
1459 #define PWM0_PORT PORTB
1460 #define PWM0_BIT 4
1461
1462 #define OC1A_PORT PORTB
1463 #define OC1A_BIT 5
1464 #define PWM1A_PORT PORTB
1465 #define PWM1A_BIT 5
1466
1467 #define OC1B_PORT PORTB
1468 #define OC1B_BIT 6
1469 #define PWM1B_PORT PORTB
1470 #define PWM1B_BIT 6
1471
1472 #define OC2_PORT PORTB
1473 #define OC2_BIT 7
1474 #define PWM2_PORT PORTB
1475 #define PWM2_BIT 7
1476 #define OC1C_PORT PORTB
1477 #define OC1C_BIT 7
1478
1479 #define A8_PORT PORTC
1480 #define A8_BIT 0
1481
1482 #define A9_PORT PORTC
1483 #define A9_BIT 1
1484
1485 #define A10_PORT PORTC
1486 #define A10_BIT 2
1487
1488 #define A11_PORT PORTC
1489 #define A11_BIT 3
1490
1491 #define A12_PORT PORTC
1492 #define A12_BIT 4
1493
1494 #define A13_PORT PORTC
1495 #define A13_BIT 5
1496
1497 #define A14_PORT PORTC
1498 #define A14_BIT 6
1499
1500 #define A15_PORT PORTC
1501 #define A15_BIT 7
1502
1503 #define SCL_PORT PORTD
1504 #define SCL_BIT 0
1505 #define INT0_PORT PORTD
1506 #define INT0_BIT 0
1507
1508 #define SDA_PORT PORTD
1509 #define SDA_BIT 1
1510 #define INT1_PORT PORTD
1511 #define INT1_BIT 1
1512
1513 #define RXD1_PORT PORTD
1514 #define RXD1_BIT 2
1515 #define INT2_PORT PORTD
1516 #define INT2_BIT 2
1517
1518 #define TXD1_PORT PORTD
1519 #define TXD1_BIT 3
1520 #define INT3_PORT PORTD
1521 #define INT3_BIT 3
1522
1523 #define IC1_PORT PORTD
1524 #define IC1_BIT 4
1525
1526 #define XCK1_PORT PORTD
1527 #define XCK1_BIT 5
1528
1529 #define T1_PORT PORTD
1530 #define T1_BIT 6
1531
1532 #define T2_PORT PORTD
1533 #define T2_BIT 7
1534
1535 #define RXD0_PORT PORTE
1536 #define RXD0_BIT 0
1537 #define PDI_PORT PORTE
1538 #define PDI_BIT 0
1539
1540 #define TXD0_PORT PORTE
1541 #define TXD0_BIT 1
1542 #define PDO_PORT PORTE
1543 #define PDO_BIT 1
1544
1545 #define XCK0_PORT PORTE
1546 #define XCK0_BIT 2
1547 #define AIN0_PORT PORTE
1548 #define AIN0_BIT 2
1549
1550 #define OC3A_PORT PORTE
1551 #define OC3A_BIT 3
1552 #define AIN1_PORT PORTE
1553 #define AIN1_BIT 3
1554
1555 #define OC3B_PORT PORTE
1556 #define OC3B_BIT 4
1557 #define INT4_PORT PORTE
1558 #define INT4_BIT 4
1559
1560 #define OC3C_PORT PORTE
1561 #define OC3C_BIT 5
1562 #define INT5_PORT PORTE
1563 #define INT5_BIT 5
1564
1565 #define T3_PORT PORTE
1566 #define T3_BIT 6
1567 #define INT6_PORT PORTE
1568 #define INT6_BIT 6
1569
1570 #define IC3_PORT PORTE
1571 #define IC3_BIT 7
1572 #define INT7_PORT PORTE
1573 #define INT7_BIT 7
1574
1575 #define ADC0_PORT PORTF
1576 #define ADC0_BIT 0
1577
1578 #define ADC1_PORT PORTF
1579 #define ADC1_BIT 1
1580
1581 #define ADC2_PORT PORTF
1582 #define ADC2_BIT 2
1583
1584 #define ADC3_PORT PORTF
1585 #define ADC3_BIT 3
1586
1587 #define ADC4_PORT PORTF
1588 #define ADC4_BIT 4
1589 #define TCK_PORT PORTF
1590 #define TCK_BIT 4
1591
1592 #define ADC5_PORT PORTF
1593 #define ADC5_BIT 5
1594 #define TMS_PORT PORTF
1595 #define TMS_BIT 5
1596
1597 #define ADC6_PORT PORTF
1598 #define ADC6_BIT 6
1599 #define TD0_PORT PORTF
1600 #define TD0_BIT 6
1601
1602 #define ADC7_PORT PORTF
1603 #define ADC7_BIT 7
1604 #define TDI_PORT PORTF
1605 #define TDI_BIT 7
1606
1607 #define WR_PORT PORTG
1608 #define WR_BIT 0
1609
1610 #define RD_PORT PORTG
1611 #define RD_BIT 1
1612
1613 #define ALE_PORT PORTG
1614 #define ALE_BIT 2
1615
1616 #define TOSC2_PORT PORTG
1617 #define TOSC2_BIT 3
1618
1619 #define TOSC1_PORT PORTG
1620 #define TOSC1_BIT 4
1621
1622