prog_fuse.sh: reindent file
[aversive.git] / include / aversive / parts / ATmega169P.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
85 /* available timers */
86 #define TIMER0_AVAILABLE
87 #define TIMER1_AVAILABLE
88 #define TIMER1A_AVAILABLE
89 #define TIMER1B_AVAILABLE
90 #define TIMER2_AVAILABLE
91
92 /* overflow interrupt number */
93 #define SIG_OVERFLOW0_NUM 0
94 #define SIG_OVERFLOW1_NUM 1
95 #define SIG_OVERFLOW2_NUM 2
96 #define SIG_OVERFLOW_TOTAL_NUM 3
97
98 /* output compare interrupt number */
99 #define SIG_OUTPUT_COMPARE0_NUM 0
100 #define SIG_OUTPUT_COMPARE1A_NUM 1
101 #define SIG_OUTPUT_COMPARE1B_NUM 2
102 #define SIG_OUTPUT_COMPARE2_NUM 3
103 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 4
104
105 /* Pwm nums */
106 #define PWM0_NUM 0
107 #define PWM1A_NUM 1
108 #define PWM1B_NUM 2
109 #define PWM2_NUM 3
110 #define PWM_TOTAL_NUM 4
111
112 /* input capture interrupt number */
113 #define SIG_INPUT_CAPTURE1_NUM 0
114 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
115
116
117 /* WDTCR */
118 #define WDP0_REG             WDTCR
119 #define WDP1_REG             WDTCR
120 #define WDP2_REG             WDTCR
121 #define WDE_REG              WDTCR
122 #define WDCE_REG             WDTCR
123
124 /* ADMUX */
125 #define MUX0_REG             ADMUX
126 #define MUX1_REG             ADMUX
127 #define MUX2_REG             ADMUX
128 #define MUX3_REG             ADMUX
129 #define MUX4_REG             ADMUX
130 #define ADLAR_REG            ADMUX
131 #define REFS0_REG            ADMUX
132 #define REFS1_REG            ADMUX
133
134 /* EEDR */
135 #define EEDR0_REG            EEDR
136 #define EEDR1_REG            EEDR
137 #define EEDR2_REG            EEDR
138 #define EEDR3_REG            EEDR
139 #define EEDR4_REG            EEDR
140 #define EEDR5_REG            EEDR
141 #define EEDR6_REG            EEDR
142 #define EEDR7_REG            EEDR
143
144 /* OCR2A */
145 #define OCR2A0_REG           OCR2A
146 #define OCR2A1_REG           OCR2A
147 #define OCR2A2_REG           OCR2A
148 #define OCR2A3_REG           OCR2A
149 #define OCR2A4_REG           OCR2A
150 #define OCR2A5_REG           OCR2A
151 #define OCR2A6_REG           OCR2A
152 #define OCR2A7_REG           OCR2A
153
154 /* SPDR */
155 #define SPDR0_REG            SPDR
156 #define SPDR1_REG            SPDR
157 #define SPDR2_REG            SPDR
158 #define SPDR3_REG            SPDR
159 #define SPDR4_REG            SPDR
160 #define SPDR5_REG            SPDR
161 #define SPDR6_REG            SPDR
162 #define SPDR7_REG            SPDR
163
164 /* SPSR */
165 #define SPI2X_REG            SPSR
166 #define WCOL_REG             SPSR
167 #define SPIF_REG             SPSR
168
169 /* SPH */
170 #define SP8_REG              SPH
171 #define SP9_REG              SPH
172 #define SP10_REG             SPH
173
174 /* ICR1L */
175 #define ICR1L0_REG           ICR1L
176 #define ICR1L1_REG           ICR1L
177 #define ICR1L2_REG           ICR1L
178 #define ICR1L3_REG           ICR1L
179 #define ICR1L4_REG           ICR1L
180 #define ICR1L5_REG           ICR1L
181 #define ICR1L6_REG           ICR1L
182 #define ICR1L7_REG           ICR1L
183
184 /* PRR */
185 #define PRADC_REG            PRR
186 #define PRUSART0_REG         PRR
187 #define PRSPI_REG            PRR
188 #define PRTIM1_REG           PRR
189 #define PRLCD_REG            PRR
190
191 /* UCSR0A */
192 #define MPCM0_REG            UCSR0A
193 #define U2X0_REG             UCSR0A
194 #define UPE0_REG             UCSR0A
195 #define DOR0_REG             UCSR0A
196 #define FE0_REG              UCSR0A
197 #define UDRE0_REG            UCSR0A
198 #define TXC0_REG             UCSR0A
199 #define RXC0_REG             UCSR0A
200
201 /* PORTG */
202 #define PORTG0_REG           PORTG
203 #define PORTG1_REG           PORTG
204 #define PORTG2_REG           PORTG
205 #define PORTG3_REG           PORTG
206 #define PORTG4_REG           PORTG
207 #define PORTG5_REG           PORTG
208
209 /* UCSR0C */
210 #define UCPOL0_REG           UCSR0C
211 #define UCSZ00_REG           UCSR0C
212 #define UCSZ01_REG           UCSR0C
213 #define USBS0_REG            UCSR0C
214 #define UPM00_REG            UCSR0C
215 #define UPM01_REG            UCSR0C
216 #define UMSEL0_REG           UCSR0C
217
218 /* USISR */
219 #define USICNT0_REG          USISR
220 #define USICNT1_REG          USISR
221 #define USICNT2_REG          USISR
222 #define USICNT3_REG          USISR
223 #define USIDC_REG            USISR
224 #define USIPF_REG            USISR
225 #define USIOIF_REG           USISR
226 #define USISIF_REG           USISR
227
228 /* TCNT1H */
229 #define TCNT1H0_REG          TCNT1H
230 #define TCNT1H1_REG          TCNT1H
231 #define TCNT1H2_REG          TCNT1H
232 #define TCNT1H3_REG          TCNT1H
233 #define TCNT1H4_REG          TCNT1H
234 #define TCNT1H5_REG          TCNT1H
235 #define TCNT1H6_REG          TCNT1H
236 #define TCNT1H7_REG          TCNT1H
237
238 /* PORTC */
239 #define PORTC0_REG           PORTC
240 #define PORTC1_REG           PORTC
241 #define PORTC2_REG           PORTC
242 #define PORTC3_REG           PORTC
243 #define PORTC4_REG           PORTC
244 #define PORTC5_REG           PORTC
245 #define PORTC6_REG           PORTC
246 #define PORTC7_REG           PORTC
247
248 /* PORTA */
249 #define PORTA0_REG           PORTA
250 #define PORTA1_REG           PORTA
251 #define PORTA2_REG           PORTA
252 #define PORTA3_REG           PORTA
253 #define PORTA4_REG           PORTA
254 #define PORTA5_REG           PORTA
255 #define PORTA6_REG           PORTA
256 #define PORTA7_REG           PORTA
257
258 /* UDR0 */
259 #define UDR00_REG            UDR0
260 #define UDR01_REG            UDR0
261 #define UDR02_REG            UDR0
262 #define UDR03_REG            UDR0
263 #define UDR04_REG            UDR0
264 #define UDR05_REG            UDR0
265 #define UDR06_REG            UDR0
266 #define UDR07_REG            UDR0
267
268 /* GPIOR2 */
269 #define GPIOR20_REG          GPIOR2
270 #define GPIOR21_REG          GPIOR2
271 #define GPIOR22_REG          GPIOR2
272 #define GPIOR23_REG          GPIOR2
273 #define GPIOR24_REG          GPIOR2
274 #define GPIOR25_REG          GPIOR2
275 #define GPIOR26_REG          GPIOR2
276 #define GPIOR27_REG          GPIOR2
277
278 /* EICRA */
279 #define ISC00_REG            EICRA
280 #define ISC01_REG            EICRA
281
282 /* DIDR0 */
283 #define ADC0D_REG            DIDR0
284 #define ADC1D_REG            DIDR0
285 #define ADC2D_REG            DIDR0
286 #define ADC3D_REG            DIDR0
287 #define ADC4D_REG            DIDR0
288 #define ADC5D_REG            DIDR0
289 #define ADC6D_REG            DIDR0
290 #define ADC7D_REG            DIDR0
291
292 /* DIDR1 */
293 #define AIN0D_REG            DIDR1
294 #define AIN1D_REG            DIDR1
295
296 /* ASSR */
297 #define TCR2UB_REG           ASSR
298 #define OCR2UB_REG           ASSR
299 #define TCN2UB_REG           ASSR
300 #define AS2_REG              ASSR
301 #define EXCLK_REG            ASSR
302
303 /* CLKPR */
304 #define CLKPS0_REG           CLKPR
305 #define CLKPS1_REG           CLKPR
306 #define CLKPS2_REG           CLKPR
307 #define CLKPS3_REG           CLKPR
308 #define CLKPCE_REG           CLKPR
309
310 /* SREG */
311 #define C_REG                SREG
312 #define Z_REG                SREG
313 #define N_REG                SREG
314 #define V_REG                SREG
315 #define S_REG                SREG
316 #define H_REG                SREG
317 #define T_REG                SREG
318 #define I_REG                SREG
319
320 /* DDRB */
321 #define DDB0_REG             DDRB
322 #define DDB1_REG             DDRB
323 #define DDB2_REG             DDRB
324 #define DDB3_REG             DDRB
325 #define DDB4_REG             DDRB
326 #define DDB5_REG             DDRB
327 #define DDB6_REG             DDRB
328 #define DDB7_REG             DDRB
329
330 /* DDRC */
331 #define DDC0_REG             DDRC
332 #define DDC1_REG             DDRC
333 #define DDC2_REG             DDRC
334 #define DDC3_REG             DDRC
335 #define DDC4_REG             DDRC
336 #define DDC5_REG             DDRC
337 #define DDC6_REG             DDRC
338 #define DDC7_REG             DDRC
339
340 /* DDRA */
341 #define DDA0_REG             DDRA
342 #define DDA1_REG             DDRA
343 #define DDA2_REG             DDRA
344 #define DDA3_REG             DDRA
345 #define DDA4_REG             DDRA
346 #define DDA5_REG             DDRA
347 #define DDA6_REG             DDRA
348 #define DDA7_REG             DDRA
349
350 /* TCCR1A */
351 #define WGM10_REG            TCCR1A
352 #define WGM11_REG            TCCR1A
353 #define COM1B0_REG           TCCR1A
354 #define COM1B1_REG           TCCR1A
355 #define COM1A0_REG           TCCR1A
356 #define COM1A1_REG           TCCR1A
357
358 /* DDRG */
359 #define DDG0_REG             DDRG
360 #define DDG1_REG             DDRG
361 #define DDG2_REG             DDRG
362 #define DDG3_REG             DDRG
363 #define DDG4_REG             DDRG
364 #define DDG5_REG             DDRG
365
366 /* TCCR1C */
367 #define FOC1B_REG            TCCR1C
368 #define FOC1A_REG            TCCR1C
369
370 /* TCCR1B */
371 #define CS10_REG             TCCR1B
372 #define CS11_REG             TCCR1B
373 #define CS12_REG             TCCR1B
374 #define WGM12_REG            TCCR1B
375 #define WGM13_REG            TCCR1B
376 #define ICES1_REG            TCCR1B
377 #define ICNC1_REG            TCCR1B
378
379 /* OSCCAL */
380 #define CAL0_REG             OSCCAL
381 #define CAL1_REG             OSCCAL
382 #define CAL2_REG             OSCCAL
383 #define CAL3_REG             OSCCAL
384 #define CAL4_REG             OSCCAL
385 #define CAL5_REG             OSCCAL
386 #define CAL6_REG             OSCCAL
387 #define CAL7_REG             OSCCAL
388
389 /* LCDDR3 */
390 #define SEG024_REG           LCDDR3
391
392 /* LCDDR2 */
393 #define SEG016_REG           LCDDR2
394 #define SEG017_REG           LCDDR2
395 #define SEG018_REG           LCDDR2
396 #define SEG019_REG           LCDDR2
397 #define SEG020_REG           LCDDR2
398 #define SEG021_REG           LCDDR2
399 #define SEG022_REG           LCDDR2
400 #define SEG023_REG           LCDDR2
401
402 /* LCDDR1 */
403 #define SEG008_REG           LCDDR1
404 #define SEG009_REG           LCDDR1
405 #define SEG010_REG           LCDDR1
406 #define SEG011_REG           LCDDR1
407 #define SEG012_REG           LCDDR1
408 #define SEG013_REG           LCDDR1
409 #define SEG014_REG           LCDDR1
410 #define SEG015_REG           LCDDR1
411
412 /* LCDDR0 */
413 #define SEG000_REG           LCDDR0
414 #define SEG001_REG           LCDDR0
415 #define SEG002_REG           LCDDR0
416 #define SEG003_REG           LCDDR0
417 #define SEG004_REG           LCDDR0
418 #define SEG005_REG           LCDDR0
419 #define SEG006_REG           LCDDR0
420 #define SEG007_REG           LCDDR0
421
422 /* LCDDR7 */
423 #define SEG116_REG           LCDDR7
424 #define SEG117_REG           LCDDR7
425 #define SEG118_REG           LCDDR7
426 #define SEG119_REG           LCDDR7
427 #define SEG120_REG           LCDDR7
428 #define SEG121_REG           LCDDR7
429 #define SEG122_REG           LCDDR7
430 #define SEG123_REG           LCDDR7
431
432 /* LCDDR6 */
433 #define SEG108_REG           LCDDR6
434 #define SEG109_REG           LCDDR6
435 #define SEG110_REG           LCDDR6
436 #define SEG111_REG           LCDDR6
437 #define SEG112_REG           LCDDR6
438 #define SEG113_REG           LCDDR6
439 #define SEG114_REG           LCDDR6
440 #define SEG115_REG           LCDDR6
441
442 /* LCDDR5 */
443 #define SEG100_REG           LCDDR5
444 #define SEG101_REG           LCDDR5
445 #define SEG102_REG           LCDDR5
446 #define SEG103_REG           LCDDR5
447 #define SEG104_REG           LCDDR5
448 #define SEG105_REG           LCDDR5
449 #define SEG106_REG           LCDDR5
450 #define SEG107_REG           LCDDR5
451
452 /* GPIOR1 */
453 #define GPIOR10_REG          GPIOR1
454 #define GPIOR11_REG          GPIOR1
455 #define GPIOR12_REG          GPIOR1
456 #define GPIOR13_REG          GPIOR1
457 #define GPIOR14_REG          GPIOR1
458 #define GPIOR15_REG          GPIOR1
459 #define GPIOR16_REG          GPIOR1
460 #define GPIOR17_REG          GPIOR1
461
462 /* GPIOR0 */
463 #define GPIOR00_REG          GPIOR0
464 #define GPIOR01_REG          GPIOR0
465 #define GPIOR02_REG          GPIOR0
466 #define GPIOR03_REG          GPIOR0
467 #define GPIOR04_REG          GPIOR0
468 #define GPIOR05_REG          GPIOR0
469 #define GPIOR06_REG          GPIOR0
470 #define GPIOR07_REG          GPIOR0
471
472 /* LCDDR8 */
473 #define SEG124_REG           LCDDR8
474
475 /* LCDCRA */
476 #define LCDBL_REG            LCDCRA
477 #define LCDCCD_REG           LCDCRA
478 #define LCDBD_REG            LCDCRA
479 #define LCDIE_REG            LCDCRA
480 #define LCDIF_REG            LCDCRA
481 #define LCDAB_REG            LCDCRA
482 #define LCDEN_REG            LCDCRA
483
484 /* DDRE */
485 #define DDE0_REG             DDRE
486 #define DDE1_REG             DDRE
487 #define DDE2_REG             DDRE
488 #define DDE3_REG             DDRE
489 #define DDE4_REG             DDRE
490 #define DDE5_REG             DDRE
491 #define DDE6_REG             DDRE
492 #define DDE7_REG             DDRE
493
494 /* TCNT2 */
495 #define TCNT2_0_REG          TCNT2
496 #define TCNT2_1_REG          TCNT2
497 #define TCNT2_2_REG          TCNT2
498 #define TCNT2_3_REG          TCNT2
499 #define TCNT2_4_REG          TCNT2
500 #define TCNT2_5_REG          TCNT2
501 #define TCNT2_6_REG          TCNT2
502 #define TCNT2_7_REG          TCNT2
503
504 /* TCNT0 */
505 #define TCNT0_0_REG          TCNT0
506 #define TCNT0_1_REG          TCNT0
507 #define TCNT0_2_REG          TCNT0
508 #define TCNT0_3_REG          TCNT0
509 #define TCNT0_4_REG          TCNT0
510 #define TCNT0_5_REG          TCNT0
511 #define TCNT0_6_REG          TCNT0
512 #define TCNT0_7_REG          TCNT0
513
514 /* TCCR0A */
515 #define CS00_REG             TCCR0A
516 #define CS01_REG             TCCR0A
517 #define CS02_REG             TCCR0A
518 #define WGM01_REG            TCCR0A
519 #define COM0A0_REG           TCCR0A
520 #define COM0A1_REG           TCCR0A
521 #define WGM00_REG            TCCR0A
522 #define FOC0A_REG            TCCR0A
523
524 /* TIFR2 */
525 #define TOV2_REG             TIFR2
526 #define OCF2A_REG            TIFR2
527
528 /* SPCR */
529 #define SPR0_REG             SPCR
530 #define SPR1_REG             SPCR
531 #define CPHA_REG             SPCR
532 #define CPOL_REG             SPCR
533 #define MSTR_REG             SPCR
534 #define DORD_REG             SPCR
535 #define SPE_REG              SPCR
536 #define SPIE_REG             SPCR
537
538 /* TIFR1 */
539 #define TOV1_REG             TIFR1
540 #define OCF1A_REG            TIFR1
541 #define OCF1B_REG            TIFR1
542 #define ICF1_REG             TIFR1
543
544 /* GTCCR */
545 #define PSR310_REG           GTCCR
546 #define TSM_REG              GTCCR
547 #define PSR2_REG             GTCCR
548
549 /* ICR1H */
550 #define ICR1H0_REG           ICR1H
551 #define ICR1H1_REG           ICR1H
552 #define ICR1H2_REG           ICR1H
553 #define ICR1H3_REG           ICR1H
554 #define ICR1H4_REG           ICR1H
555 #define ICR1H5_REG           ICR1H
556 #define ICR1H6_REG           ICR1H
557 #define ICR1H7_REG           ICR1H
558
559 /* LCDCRB */
560 #define LCDPM0_REG           LCDCRB
561 #define LCDPM1_REG           LCDCRB
562 #define LCDPM2_REG           LCDCRB
563 #define LCDMUX0_REG          LCDCRB
564 #define LCDMUX1_REG          LCDCRB
565 #define LCD2B_REG            LCDCRB
566 #define LCDCS_REG            LCDCRB
567
568 /* LCDDR18 */
569 #define SEG324_REG           LCDDR18
570
571 /* LCDDR13 */
572 #define SEG224_REG           LCDDR13
573
574 /* LCDDR12 */
575 #define SEG216_REG           LCDDR12
576 #define SEG217_REG           LCDDR12
577 #define SEG218_REG           LCDDR12
578 #define SEG219_REG           LCDDR12
579 #define SEG220_REG           LCDDR12
580 #define SEG221_REG           LCDDR12
581 #define SEG222_REG           LCDDR12
582 #define SEG223_REG           LCDDR12
583
584 /* LCDDR11 */
585 #define SEG208_REG           LCDDR11
586 #define SEG209_REG           LCDDR11
587 #define SEG210_REG           LCDDR11
588 #define SEG211_REG           LCDDR11
589 #define SEG212_REG           LCDDR11
590 #define SEG213_REG           LCDDR11
591 #define SEG214_REG           LCDDR11
592 #define SEG215_REG           LCDDR11
593
594 /* LCDDR10 */
595 #define SEG200_REG           LCDDR10
596 #define SEG201_REG           LCDDR10
597 #define SEG202_REG           LCDDR10
598 #define SEG203_REG           LCDDR10
599 #define SEG204_REG           LCDDR10
600 #define SEG205_REG           LCDDR10
601 #define SEG206_REG           LCDDR10
602 #define SEG207_REG           LCDDR10
603
604 /* LCDDR17 */
605 #define SEG316_REG           LCDDR17
606 #define SEG317_REG           LCDDR17
607 #define SEG318_REG           LCDDR17
608 #define SEG319_REG           LCDDR17
609 #define SEG320_REG           LCDDR17
610 #define SEG321_REG           LCDDR17
611 #define SEG322_REG           LCDDR17
612 #define SEG323_REG           LCDDR17
613
614 /* LCDDR16 */
615 #define SEG308_REG           LCDDR16
616 #define SEG309_REG           LCDDR16
617 #define SEG310_REG           LCDDR16
618 #define SEG311_REG           LCDDR16
619 #define SEG312_REG           LCDDR16
620 #define SEG313_REG           LCDDR16
621 #define SEG314_REG           LCDDR16
622 #define SEG315_REG           LCDDR16
623
624 /* LCDDR15 */
625 #define SEG300_REG           LCDDR15
626 #define SEG301_REG           LCDDR15
627 #define SEG302_REG           LCDDR15
628 #define SEG303_REG           LCDDR15
629 #define SEG304_REG           LCDDR15
630 #define SEG305_REG           LCDDR15
631 #define SEG306_REG           LCDDR15
632 #define SEG307_REG           LCDDR15
633
634 /* OCR1BL */
635 #define OCR1BL0_REG          OCR1BL
636 #define OCR1BL1_REG          OCR1BL
637 #define OCR1BL2_REG          OCR1BL
638 #define OCR1BL3_REG          OCR1BL
639 #define OCR1BL4_REG          OCR1BL
640 #define OCR1BL5_REG          OCR1BL
641 #define OCR1BL6_REG          OCR1BL
642 #define OCR1BL7_REG          OCR1BL
643
644 /* OCR1BH */
645 #define OCR1BH0_REG          OCR1BH
646 #define OCR1BH1_REG          OCR1BH
647 #define OCR1BH2_REG          OCR1BH
648 #define OCR1BH3_REG          OCR1BH
649 #define OCR1BH4_REG          OCR1BH
650 #define OCR1BH5_REG          OCR1BH
651 #define OCR1BH6_REG          OCR1BH
652 #define OCR1BH7_REG          OCR1BH
653
654 /* SPL */
655 #define SP0_REG              SPL
656 #define SP1_REG              SPL
657 #define SP2_REG              SPL
658 #define SP3_REG              SPL
659 #define SP4_REG              SPL
660 #define SP5_REG              SPL
661 #define SP6_REG              SPL
662 #define SP7_REG              SPL
663
664 /* MCUSR */
665 #define JTRF_REG             MCUSR
666 #define PORF_REG             MCUSR
667 #define EXTRF_REG            MCUSR
668 #define BORF_REG             MCUSR
669 #define WDRF_REG             MCUSR
670
671 /* EECR */
672 #define EERE_REG             EECR
673 #define EEWE_REG             EECR
674 #define EEMWE_REG            EECR
675 #define EERIE_REG            EECR
676
677 /* SMCR */
678 #define SE_REG               SMCR
679 #define SM0_REG              SMCR
680 #define SM1_REG              SMCR
681 #define SM2_REG              SMCR
682
683 /* TCCR2A */
684 #define CS20_REG             TCCR2A
685 #define CS21_REG             TCCR2A
686 #define CS22_REG             TCCR2A
687 #define WGM21_REG            TCCR2A
688 #define COM2A0_REG           TCCR2A
689 #define COM2A1_REG           TCCR2A
690 #define WGM20_REG            TCCR2A
691 #define FOC2A_REG            TCCR2A
692
693 /* UBRR0H */
694 #define UBRR8_REG            UBRR0H
695 #define UBRR9_REG            UBRR0H
696 #define UBRR10_REG           UBRR0H
697 #define UBRR11_REG           UBRR0H
698
699 /* UBRR0L */
700 #define UBRR0_REG            UBRR0L
701 #define UBRR1_REG            UBRR0L
702 #define UBRR2_REG            UBRR0L
703 #define UBRR3_REG            UBRR0L
704 #define UBRR4_REG            UBRR0L
705 #define UBRR5_REG            UBRR0L
706 #define UBRR6_REG            UBRR0L
707 #define UBRR7_REG            UBRR0L
708
709 /* EEARH */
710 #define EEAR8_REG            EEARH
711
712 /* EEARL */
713 #define EEAR0_REG            EEARL
714 #define EEAR1_REG            EEARL
715 #define EEAR2_REG            EEARL
716 #define EEAR3_REG            EEARL
717 #define EEAR4_REG            EEARL
718 #define EEAR5_REG            EEARL
719 #define EEAR6_REG            EEARL
720 #define EEAR7_REG            EEARL
721
722 /* MCUCR */
723 #define JTD_REG              MCUCR
724 #define IVCE_REG             MCUCR
725 #define IVSEL_REG            MCUCR
726 #define PUD_REG              MCUCR
727
728 /* OCDR */
729 #define OCDR0_REG            OCDR
730 #define OCDR1_REG            OCDR
731 #define OCDR2_REG            OCDR
732 #define OCDR3_REG            OCDR
733 #define OCDR4_REG            OCDR
734 #define OCDR5_REG            OCDR
735 #define OCDR6_REG            OCDR
736 #define OCDR7_REG            OCDR
737
738 /* PINA */
739 #define PINA0_REG            PINA
740 #define PINA1_REG            PINA
741 #define PINA2_REG            PINA
742 #define PINA3_REG            PINA
743 #define PINA4_REG            PINA
744 #define PINA5_REG            PINA
745 #define PINA6_REG            PINA
746 #define PINA7_REG            PINA
747
748 /* PORTE */
749 #define PORTE0_REG           PORTE
750 #define PORTE1_REG           PORTE
751 #define PORTE2_REG           PORTE
752 #define PORTE3_REG           PORTE
753 #define PORTE4_REG           PORTE
754 #define PORTE5_REG           PORTE
755 #define PORTE6_REG           PORTE
756 #define PORTE7_REG           PORTE
757
758 /* LCDCCR */
759 #define LCDCC0_REG           LCDCCR
760 #define LCDCC1_REG           LCDCCR
761 #define LCDCC2_REG           LCDCCR
762 #define LCDCC3_REG           LCDCCR
763 #define LCDMDT_REG           LCDCCR
764 #define LCDDC0_REG           LCDCCR
765 #define LCDDC1_REG           LCDCCR
766 #define LCDDC2_REG           LCDCCR
767
768 /* PINE */
769 #define PINE0_REG            PINE
770 #define PINE1_REG            PINE
771 #define PINE2_REG            PINE
772 #define PINE3_REG            PINE
773 #define PINE4_REG            PINE
774 #define PINE5_REG            PINE
775 #define PINE6_REG            PINE
776 #define PINE7_REG            PINE
777
778 /* ADCSRA */
779 #define ADPS0_REG            ADCSRA
780 #define ADPS1_REG            ADCSRA
781 #define ADPS2_REG            ADCSRA
782 #define ADIE_REG             ADCSRA
783 #define ADIF_REG             ADCSRA
784 #define ADATE_REG            ADCSRA
785 #define ADSC_REG             ADCSRA
786 #define ADEN_REG             ADCSRA
787
788 /* ADCSRB */
789 #define ACME_REG             ADCSRB
790 #define ADTS0_REG            ADCSRB
791 #define ADTS1_REG            ADCSRB
792 #define ADTS2_REG            ADCSRB
793
794 /* DDRF */
795 #define DDF0_REG             DDRF
796 #define DDF1_REG             DDRF
797 #define DDF2_REG             DDRF
798 #define DDF3_REG             DDRF
799 #define DDF4_REG             DDRF
800 #define DDF5_REG             DDRF
801 #define DDF6_REG             DDRF
802 #define DDF7_REG             DDRF
803
804 /* OCR0A */
805 #define OCR0A0_REG           OCR0A
806 #define OCR0A1_REG           OCR0A
807 #define OCR0A2_REG           OCR0A
808 #define OCR0A3_REG           OCR0A
809 #define OCR0A4_REG           OCR0A
810 #define OCR0A5_REG           OCR0A
811 #define OCR0A6_REG           OCR0A
812 #define OCR0A7_REG           OCR0A
813
814 /* ACSR */
815 #define ACIS0_REG            ACSR
816 #define ACIS1_REG            ACSR
817 #define ACIC_REG             ACSR
818 #define ACIE_REG             ACSR
819 #define ACI_REG              ACSR
820 #define ACO_REG              ACSR
821 #define ACBG_REG             ACSR
822 #define ACD_REG              ACSR
823
824 /* TCNT1L */
825 #define TCNT1L0_REG          TCNT1L
826 #define TCNT1L1_REG          TCNT1L
827 #define TCNT1L2_REG          TCNT1L
828 #define TCNT1L3_REG          TCNT1L
829 #define TCNT1L4_REG          TCNT1L
830 #define TCNT1L5_REG          TCNT1L
831 #define TCNT1L6_REG          TCNT1L
832 #define TCNT1L7_REG          TCNT1L
833
834 /* DDRD */
835 #define DDD0_REG             DDRD
836 #define DDD1_REG             DDRD
837 #define DDD2_REG             DDRD
838 #define DDD3_REG             DDRD
839 #define DDD4_REG             DDRD
840 #define DDD5_REG             DDRD
841 #define DDD6_REG             DDRD
842 #define DDD7_REG             DDRD
843
844 /* USICR */
845 #define USITC_REG            USICR
846 #define USICLK_REG           USICR
847 #define USICS0_REG           USICR
848 #define USICS1_REG           USICR
849 #define USIWM0_REG           USICR
850 #define USIWM1_REG           USICR
851 #define USIOIE_REG           USICR
852 #define USISIE_REG           USICR
853
854 /* PORTD */
855 #define PORTD0_REG           PORTD
856 #define PORTD1_REG           PORTD
857 #define PORTD2_REG           PORTD
858 #define PORTD3_REG           PORTD
859 #define PORTD4_REG           PORTD
860 #define PORTD5_REG           PORTD
861 #define PORTD6_REG           PORTD
862 #define PORTD7_REG           PORTD
863
864 /* UCSR0B */
865 #define TXB80_REG            UCSR0B
866 #define RXB80_REG            UCSR0B
867 #define UCSZ02_REG           UCSR0B
868 #define TXEN0_REG            UCSR0B
869 #define RXEN0_REG            UCSR0B
870 #define UDRIE0_REG           UCSR0B
871 #define TXCIE0_REG           UCSR0B
872 #define RXCIE0_REG           UCSR0B
873
874 /* SPMCSR */
875 #define SPMEN_REG            SPMCSR
876 #define PGERS_REG            SPMCSR
877 #define PGWRT_REG            SPMCSR
878 #define BLBSET_REG           SPMCSR
879 #define RWWSRE_REG           SPMCSR
880 #define RWWSB_REG            SPMCSR
881 #define SPMIE_REG            SPMCSR
882
883 /* PORTB */
884 #define PORTB0_REG           PORTB
885 #define PORTB1_REG           PORTB
886 #define PORTB2_REG           PORTB
887 #define PORTB3_REG           PORTB
888 #define PORTB4_REG           PORTB
889 #define PORTB5_REG           PORTB
890 #define PORTB6_REG           PORTB
891 #define PORTB7_REG           PORTB
892
893 /* ADCL */
894 #define ADCL0_REG            ADCL
895 #define ADCL1_REG            ADCL
896 #define ADCL2_REG            ADCL
897 #define ADCL3_REG            ADCL
898 #define ADCL4_REG            ADCL
899 #define ADCL5_REG            ADCL
900 #define ADCL6_REG            ADCL
901 #define ADCL7_REG            ADCL
902
903 /* ADCH */
904 #define ADCH0_REG            ADCH
905 #define ADCH1_REG            ADCH
906 #define ADCH2_REG            ADCH
907 #define ADCH3_REG            ADCH
908 #define ADCH4_REG            ADCH
909 #define ADCH5_REG            ADCH
910 #define ADCH6_REG            ADCH
911 #define ADCH7_REG            ADCH
912
913 /* LCDFRR */
914 #define LCDCD0_REG           LCDFRR
915 #define LCDCD1_REG           LCDFRR
916 #define LCDCD2_REG           LCDFRR
917 #define LCDPS0_REG           LCDFRR
918 #define LCDPS1_REG           LCDFRR
919 #define LCDPS2_REG           LCDFRR
920
921 /* TIMSK2 */
922 #define TOIE2_REG            TIMSK2
923 #define OCIE2A_REG           TIMSK2
924
925 /* EIMSK */
926 #define INT0_REG             EIMSK
927 #define PCIE0_REG            EIMSK
928 #define PCIE1_REG            EIMSK
929
930 /* TIMSK0 */
931 #define TOIE0_REG            TIMSK0
932 #define OCIE0A_REG           TIMSK0
933
934 /* TIMSK1 */
935 #define TOIE1_REG            TIMSK1
936 #define OCIE1A_REG           TIMSK1
937 #define OCIE1B_REG           TIMSK1
938 #define ICIE1_REG            TIMSK1
939
940 /* PCMSK0 */
941 #define PCINT0_REG           PCMSK0
942 #define PCINT1_REG           PCMSK0
943 #define PCINT2_REG           PCMSK0
944 #define PCINT3_REG           PCMSK0
945 #define PCINT4_REG           PCMSK0
946 #define PCINT5_REG           PCMSK0
947 #define PCINT6_REG           PCMSK0
948 #define PCINT7_REG           PCMSK0
949
950 /* PCMSK1 */
951 #define PCINT8_REG           PCMSK1
952 #define PCINT9_REG           PCMSK1
953 #define PCINT10_REG          PCMSK1
954 #define PCINT11_REG          PCMSK1
955 #define PCINT12_REG          PCMSK1
956 #define PCINT13_REG          PCMSK1
957 #define PCINT14_REG          PCMSK1
958 #define PCINT15_REG          PCMSK1
959
960 /* PINC */
961 #define PINC0_REG            PINC
962 #define PINC1_REG            PINC
963 #define PINC2_REG            PINC
964 #define PINC3_REG            PINC
965 #define PINC4_REG            PINC
966 #define PINC5_REG            PINC
967 #define PINC6_REG            PINC
968 #define PINC7_REG            PINC
969
970 /* PINB */
971 #define PINB0_REG            PINB
972 #define PINB1_REG            PINB
973 #define PINB2_REG            PINB
974 #define PINB3_REG            PINB
975 #define PINB4_REG            PINB
976 #define PINB5_REG            PINB
977 #define PINB6_REG            PINB
978 #define PINB7_REG            PINB
979
980 /* EIFR */
981 #define INTF0_REG            EIFR
982 #define PCIF0_REG            EIFR
983 #define PCIF1_REG            EIFR
984
985 /* PING */
986 #define PING0_REG            PING
987 #define PING1_REG            PING
988 #define PING2_REG            PING
989 #define PING3_REG            PING
990 #define PING4_REG            PING
991 #define PING5_REG            PING
992
993 /* PINF */
994 #define PINF0_REG            PINF
995 #define PINF1_REG            PINF
996 #define PINF2_REG            PINF
997 #define PINF3_REG            PINF
998 #define PINF4_REG            PINF
999 #define PINF5_REG            PINF
1000 #define PINF6_REG            PINF
1001 #define PINF7_REG            PINF
1002
1003 /* PORTF */
1004 #define PORTF0_REG           PORTF
1005 #define PORTF1_REG           PORTF
1006 #define PORTF2_REG           PORTF
1007 #define PORTF3_REG           PORTF
1008 #define PORTF4_REG           PORTF
1009 #define PORTF5_REG           PORTF
1010 #define PORTF6_REG           PORTF
1011 #define PORTF7_REG           PORTF
1012
1013 /* PIND */
1014 #define PIND0_REG            PIND
1015 #define PIND1_REG            PIND
1016 #define PIND2_REG            PIND
1017 #define PIND3_REG            PIND
1018 #define PIND4_REG            PIND
1019 #define PIND5_REG            PIND
1020 #define PIND6_REG            PIND
1021 #define PIND7_REG            PIND
1022
1023 /* OCR1AH */
1024 #define OCR1AH0_REG          OCR1AH
1025 #define OCR1AH1_REG          OCR1AH
1026 #define OCR1AH2_REG          OCR1AH
1027 #define OCR1AH3_REG          OCR1AH
1028 #define OCR1AH4_REG          OCR1AH
1029 #define OCR1AH5_REG          OCR1AH
1030 #define OCR1AH6_REG          OCR1AH
1031 #define OCR1AH7_REG          OCR1AH
1032
1033 /* OCR1AL */
1034 #define OCR1AL0_REG          OCR1AL
1035 #define OCR1AL1_REG          OCR1AL
1036 #define OCR1AL2_REG          OCR1AL
1037 #define OCR1AL3_REG          OCR1AL
1038 #define OCR1AL4_REG          OCR1AL
1039 #define OCR1AL5_REG          OCR1AL
1040 #define OCR1AL6_REG          OCR1AL
1041 #define OCR1AL7_REG          OCR1AL
1042
1043 /* TIFR0 */
1044 #define TOV0_REG             TIFR0
1045 #define OCF0A_REG            TIFR0
1046
1047 /* USIDR */
1048 #define USIDR0_REG           USIDR
1049 #define USIDR1_REG           USIDR
1050 #define USIDR2_REG           USIDR
1051 #define USIDR3_REG           USIDR
1052 #define USIDR4_REG           USIDR
1053 #define USIDR5_REG           USIDR
1054 #define USIDR6_REG           USIDR
1055 #define USIDR7_REG           USIDR
1056
1057 /* pins mapping */
1058