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