00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #define TIMER0_PRESCALER_DIV_0 0
00029 #define TIMER0_PRESCALER_DIV_1 1
00030 #define TIMER0_PRESCALER_DIV_8 2
00031 #define TIMER0_PRESCALER_DIV_64 3
00032 #define TIMER0_PRESCALER_DIV_256 4
00033 #define TIMER0_PRESCALER_DIV_1024 5
00034 #define TIMER0_PRESCALER_DIV_FALL 6
00035 #define TIMER0_PRESCALER_DIV_RISE 7
00036
00037 #define TIMER0_PRESCALER_REG_0 0
00038 #define TIMER0_PRESCALER_REG_1 1
00039 #define TIMER0_PRESCALER_REG_2 8
00040 #define TIMER0_PRESCALER_REG_3 64
00041 #define TIMER0_PRESCALER_REG_4 256
00042 #define TIMER0_PRESCALER_REG_5 1024
00043 #define TIMER0_PRESCALER_REG_6 -1
00044 #define TIMER0_PRESCALER_REG_7 -2
00045
00046
00047 #define TIMER1_PRESCALER_DIV_0 0
00048 #define TIMER1_PRESCALER_DIV_1 1
00049 #define TIMER1_PRESCALER_DIV_8 2
00050 #define TIMER1_PRESCALER_DIV_64 3
00051 #define TIMER1_PRESCALER_DIV_256 4
00052 #define TIMER1_PRESCALER_DIV_1024 5
00053 #define TIMER1_PRESCALER_DIV_FALL 6
00054 #define TIMER1_PRESCALER_DIV_RISE 7
00055
00056 #define TIMER1_PRESCALER_REG_0 0
00057 #define TIMER1_PRESCALER_REG_1 1
00058 #define TIMER1_PRESCALER_REG_2 8
00059 #define TIMER1_PRESCALER_REG_3 64
00060 #define TIMER1_PRESCALER_REG_4 256
00061 #define TIMER1_PRESCALER_REG_5 1024
00062 #define TIMER1_PRESCALER_REG_6 -1
00063 #define TIMER1_PRESCALER_REG_7 -2
00064
00065
00066 #define TIMER2_PRESCALER_DIV_0 0
00067 #define TIMER2_PRESCALER_DIV_1 1
00068 #define TIMER2_PRESCALER_DIV_8 2
00069 #define TIMER2_PRESCALER_DIV_32 3
00070 #define TIMER2_PRESCALER_DIV_64 4
00071 #define TIMER2_PRESCALER_DIV_128 5
00072 #define TIMER2_PRESCALER_DIV_256 6
00073 #define TIMER2_PRESCALER_DIV_1024 7
00074
00075 #define TIMER2_PRESCALER_REG_0 0
00076 #define TIMER2_PRESCALER_REG_1 1
00077 #define TIMER2_PRESCALER_REG_2 8
00078 #define TIMER2_PRESCALER_REG_3 32
00079 #define TIMER2_PRESCALER_REG_4 64
00080 #define TIMER2_PRESCALER_REG_5 128
00081 #define TIMER2_PRESCALER_REG_6 256
00082 #define TIMER2_PRESCALER_REG_7 1024
00083
00084
00085
00086 #define TIMER0_AVAILABLE
00087 #define TIMER1_AVAILABLE
00088 #define TIMER1A_AVAILABLE
00089 #define TIMER1B_AVAILABLE
00090 #define TIMER2_AVAILABLE
00091
00092
00093 #define SIG_OVERFLOW0_NUM 0
00094 #define SIG_OVERFLOW1_NUM 1
00095 #define SIG_OVERFLOW2_NUM 2
00096 #define SIG_OVERFLOW_TOTAL_NUM 3
00097
00098
00099 #define SIG_OUTPUT_COMPARE1A_NUM 0
00100 #define SIG_OUTPUT_COMPARE1B_NUM 1
00101 #define SIG_OUTPUT_COMPARE2_NUM 2
00102 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 3
00103
00104
00105 #define PWM1A_NUM 0
00106 #define PWM1B_NUM 1
00107 #define PWM2_NUM 2
00108 #define PWM_TOTAL_NUM 3
00109
00110
00111 #define SIG_INPUT_CAPTURE1_NUM 0
00112 #define SIG_INPUT_CAPTURE_TOTAL_NUM 1
00113
00114
00115
00116 #define WDP0_REG WDTCR
00117 #define WDP1_REG WDTCR
00118 #define WDP2_REG WDTCR
00119 #define WDE_REG WDTCR
00120 #define WDTOE_REG WDTCR
00121
00122
00123 #define INT0_REG GIMSK
00124 #define INT1_REG GIMSK
00125
00126
00127 #define ICR1H0_REG ICR1H
00128 #define ICR1H1_REG ICR1H
00129 #define ICR1H2_REG ICR1H
00130 #define ICR1H3_REG ICR1H
00131 #define ICR1H4_REG ICR1H
00132 #define ICR1H5_REG ICR1H
00133 #define ICR1H6_REG ICR1H
00134 #define ICR1H7_REG ICR1H
00135
00136
00137 #define MUX0_REG ADMUX
00138 #define MUX1_REG ADMUX
00139 #define MUX2_REG ADMUX
00140
00141
00142 #define CS00_REG TCCR0
00143 #define CS01_REG TCCR0
00144 #define CS02_REG TCCR0
00145
00146
00147 #define CS20_REG TCCR2
00148 #define CS21_REG TCCR2
00149 #define CS22_REG TCCR2
00150 #define CTC2_REG TCCR2
00151 #define COM20_REG TCCR2
00152 #define COM21_REG TCCR2
00153 #define PWM2_REG TCCR2
00154
00155
00156 #define DDB0_REG DDRB
00157 #define DDB1_REG DDRB
00158 #define DDB2_REG DDRB
00159 #define DDB3_REG DDRB
00160 #define DDB4_REG DDRB
00161 #define DDB5_REG DDRB
00162 #define DDB6_REG DDRB
00163 #define DDB7_REG DDRB
00164
00165
00166 #define OR_REG USR
00167 #define FE_REG USR
00168 #define UDRE_REG USR
00169 #define TXC_REG USR
00170 #define RXC_REG USR
00171
00172
00173 #define EEDR0_REG EEDR
00174 #define EEDR1_REG EEDR
00175 #define EEDR2_REG EEDR
00176 #define EEDR3_REG EEDR
00177 #define EEDR4_REG EEDR
00178 #define EEDR5_REG EEDR
00179 #define EEDR6_REG EEDR
00180 #define EEDR7_REG EEDR
00181
00182
00183 #define DDC0_REG DDRC
00184 #define DDC1_REG DDRC
00185 #define DDC2_REG DDRC
00186 #define DDC3_REG DDRC
00187 #define DDC4_REG DDRC
00188 #define DDC5_REG DDRC
00189 #define DDC6_REG DDRC
00190 #define DDC7_REG DDRC
00191
00192
00193 #define DDA0_REG DDRA
00194 #define DDA1_REG DDRA
00195 #define DDA2_REG DDRA
00196 #define DDA3_REG DDRA
00197 #define DDA4_REG DDRA
00198 #define DDA5_REG DDRA
00199 #define DDA6_REG DDRA
00200 #define DDA7_REG DDRA
00201
00202
00203 #define PWM10_REG TCCR1A
00204 #define PWM11_REG TCCR1A
00205 #define COM1B0_REG TCCR1A
00206 #define COM1B1_REG TCCR1A
00207 #define COM1A0_REG TCCR1A
00208 #define COM1A1_REG TCCR1A
00209
00210
00211 #define DDD0_REG DDRD
00212 #define DDD1_REG DDRD
00213 #define DDD2_REG DDRD
00214 #define DDD3_REG DDRD
00215 #define DDD4_REG DDRD
00216 #define DDD5_REG DDRD
00217 #define DDD6_REG DDRD
00218 #define DDD7_REG DDRD
00219
00220
00221 #define CS10_REG TCCR1B
00222 #define CS11_REG TCCR1B
00223 #define CS12_REG TCCR1B
00224 #define CTC1_REG TCCR1B
00225 #define ICES1_REG TCCR1B
00226 #define ICNC1_REG TCCR1B
00227
00228
00229 #define INTF0_REG GIFR
00230 #define INTF1_REG GIFR
00231
00232
00233 #define TOIE0_REG TIMSK
00234 #define TOIE1_REG TIMSK
00235 #define OCIE1B_REG TIMSK
00236 #define OCIE1A_REG TIMSK
00237 #define TICIE1_REG TIMSK
00238 #define TOIE2_REG TIMSK
00239 #define OCIE2_REG TIMSK
00240
00241
00242 #define TXB8_REG UCR
00243 #define RXB8_REG UCR
00244 #define CHR9_REG UCR
00245 #define TXEN_REG UCR
00246 #define RXEN_REG UCR
00247 #define UDRIE_REG UCR
00248 #define TXCIE_REG UCR
00249 #define RXCIE_REG UCR
00250
00251
00252 #define SPDR0_REG SPDR
00253 #define SPDR1_REG SPDR
00254 #define SPDR2_REG SPDR
00255 #define SPDR3_REG SPDR
00256 #define SPDR4_REG SPDR
00257 #define SPDR5_REG SPDR
00258 #define SPDR6_REG SPDR
00259 #define SPDR7_REG SPDR
00260
00261
00262 #define WCOL_REG SPSR
00263 #define SPIF_REG SPSR
00264
00265
00266 #define ACIS0_REG ACSR
00267 #define ACIS1_REG ACSR
00268 #define ACIC_REG ACSR
00269 #define ACIE_REG ACSR
00270 #define ACI_REG ACSR
00271 #define ACO_REG ACSR
00272 #define ACD_REG ACSR
00273
00274
00275 #define SP8_REG SPH
00276 #define SP9_REG SPH
00277
00278
00279 #define OCR1BL0_REG OCR1BL
00280 #define OCR1BL1_REG OCR1BL
00281 #define OCR1BL2_REG OCR1BL
00282 #define OCR1BL3_REG OCR1BL
00283 #define OCR1BL4_REG OCR1BL
00284 #define OCR1BL5_REG OCR1BL
00285 #define OCR1BL6_REG OCR1BL
00286 #define OCR1BL7_REG OCR1BL
00287
00288
00289 #define ICR1L0_REG ICR1L
00290 #define ICR1L1_REG ICR1L
00291 #define ICR1L2_REG ICR1L
00292 #define ICR1L3_REG ICR1L
00293 #define ICR1L4_REG ICR1L
00294 #define ICR1L5_REG ICR1L
00295 #define ICR1L6_REG ICR1L
00296 #define ICR1L7_REG ICR1L
00297
00298
00299 #define OCR1BH0_REG OCR1BH
00300 #define OCR1BH1_REG OCR1BH
00301 #define OCR1BH2_REG OCR1BH
00302 #define OCR1BH3_REG OCR1BH
00303 #define OCR1BH4_REG OCR1BH
00304 #define OCR1BH5_REG OCR1BH
00305 #define OCR1BH6_REG OCR1BH
00306 #define OCR1BH7_REG OCR1BH
00307
00308
00309 #define PIND0_REG PIND
00310 #define PIND1_REG PIND
00311 #define PIND2_REG PIND
00312 #define PIND3_REG PIND
00313 #define PIND4_REG PIND
00314 #define PIND5_REG PIND
00315 #define PIND6_REG PIND
00316 #define PIND7_REG PIND
00317
00318
00319 #define SP0_REG SPL
00320 #define SP1_REG SPL
00321 #define SP2_REG SPL
00322 #define SP3_REG SPL
00323 #define SP4_REG SPL
00324 #define SP5_REG SPL
00325 #define SP6_REG SPL
00326 #define SP7_REG SPL
00327
00328
00329 #define ADC0_REG ADCL
00330 #define ADC1_REG ADCL
00331 #define ADC2_REG ADCL
00332 #define ADC3_REG ADCL
00333 #define ADC4_REG ADCL
00334 #define ADC5_REG ADCL
00335 #define ADC6_REG ADCL
00336 #define ADC7_REG ADCL
00337
00338
00339 #define PORF_REG MCUSR
00340 #define EXTRF_REG MCUSR
00341
00342
00343 #define EERE_REG EECR
00344 #define EEWE_REG EECR
00345 #define EEMWE_REG EECR
00346 #define EERIE_REG EECR
00347
00348
00349 #define TCNT1L0_REG TCNT1L
00350 #define TCNT1L1_REG TCNT1L
00351 #define TCNT1L2_REG TCNT1L
00352 #define TCNT1L3_REG TCNT1L
00353 #define TCNT1L4_REG TCNT1L
00354 #define TCNT1L5_REG TCNT1L
00355 #define TCNT1L6_REG TCNT1L
00356 #define TCNT1L7_REG TCNT1L
00357
00358
00359 #define PORTB0_REG PORTB
00360 #define PORTB1_REG PORTB
00361 #define PORTB2_REG PORTB
00362 #define PORTB3_REG PORTB
00363 #define PORTB4_REG PORTB
00364 #define PORTB5_REG PORTB
00365 #define PORTB6_REG PORTB
00366 #define PORTB7_REG PORTB
00367
00368
00369 #define PORTD0_REG PORTD
00370 #define PORTD1_REG PORTD
00371 #define PORTD2_REG PORTD
00372 #define PORTD3_REG PORTD
00373 #define PORTD4_REG PORTD
00374 #define PORTD5_REG PORTD
00375 #define PORTD6_REG PORTD
00376 #define PORTD7_REG PORTD
00377
00378
00379 #define TCNT1H0_REG TCNT1H
00380 #define TCNT1H1_REG TCNT1H
00381 #define TCNT1H2_REG TCNT1H
00382 #define TCNT1H3_REG TCNT1H
00383 #define TCNT1H4_REG TCNT1H
00384 #define TCNT1H5_REG TCNT1H
00385 #define TCNT1H6_REG TCNT1H
00386 #define TCNT1H7_REG TCNT1H
00387
00388
00389 #define PORTC0_REG PORTC
00390 #define PORTC1_REG PORTC
00391 #define PORTC2_REG PORTC
00392 #define PORTC3_REG PORTC
00393 #define PORTC4_REG PORTC
00394 #define PORTC5_REG PORTC
00395 #define PORTC6_REG PORTC
00396 #define PORTC7_REG PORTC
00397
00398
00399 #define ADC8_REG ADCH
00400 #define ADC9_REG ADCH
00401
00402
00403 #define PORTA0_REG PORTA
00404 #define PORTA1_REG PORTA
00405 #define PORTA2_REG PORTA
00406 #define PORTA3_REG PORTA
00407 #define PORTA4_REG PORTA
00408 #define PORTA5_REG PORTA
00409 #define PORTA6_REG PORTA
00410 #define PORTA7_REG PORTA
00411
00412
00413 #define TCNT2_0_REG TCNT2
00414 #define TCNT2_1_REG TCNT2
00415 #define TCNT2_2_REG TCNT2
00416 #define TCNT2_3_REG TCNT2
00417 #define TCNT2_4_REG TCNT2
00418 #define TCNT2_5_REG TCNT2
00419 #define TCNT2_6_REG TCNT2
00420 #define TCNT2_7_REG TCNT2
00421
00422
00423 #define TCNT00_REG TCNT0
00424 #define TCNT01_REG TCNT0
00425 #define TCNT02_REG TCNT0
00426 #define TCNT03_REG TCNT0
00427 #define TCNT04_REG TCNT0
00428 #define TCNT05_REG TCNT0
00429 #define TCNT06_REG TCNT0
00430 #define TCNT07_REG TCNT0
00431
00432
00433 #define UDR0_REG UDR
00434 #define UDR1_REG UDR
00435 #define UDR2_REG UDR
00436 #define UDR3_REG UDR
00437 #define UDR4_REG UDR
00438 #define UDR5_REG UDR
00439 #define UDR6_REG UDR
00440 #define UDR7_REG UDR
00441
00442
00443 #define UBRR0_REG UBRR
00444 #define UBRR1_REG UBRR
00445 #define UBRR2_REG UBRR
00446 #define UBRR3_REG UBRR
00447 #define UBRR4_REG UBRR
00448 #define UBRR5_REG UBRR
00449 #define UBRR6_REG UBRR
00450 #define UBRR7_REG UBRR
00451
00452
00453 #define ADPS0_REG ADCSR
00454 #define ADPS1_REG ADCSR
00455 #define ADPS2_REG ADCSR
00456 #define ADIE_REG ADCSR
00457 #define ADIF_REG ADCSR
00458 #define ADFR_REG ADCSR
00459 #define ADSC_REG ADCSR
00460 #define ADEN_REG ADCSR
00461
00462
00463 #define C_REG SREG
00464 #define Z_REG SREG
00465 #define N_REG SREG
00466 #define V_REG SREG
00467 #define S_REG SREG
00468 #define H_REG SREG
00469 #define T_REG SREG
00470 #define I_REG SREG
00471
00472
00473 #define TOV0_REG TIFR
00474 #define TOV1_REG TIFR
00475 #define OCF1B_REG TIFR
00476 #define OCF1A_REG TIFR
00477 #define ICF1_REG TIFR
00478 #define TOV2_REG TIFR
00479 #define OCF2_REG TIFR
00480
00481
00482 #define EEAR8_REG EEARH
00483
00484
00485 #define EEAR0_REG EEARL
00486 #define EEAR1_REG EEARL
00487 #define EEAR2_REG EEARL
00488 #define EEAR3_REG EEARL
00489 #define EEAR4_REG EEARL
00490 #define EEAR5_REG EEARL
00491 #define EEAR6_REG EEARL
00492 #define EEAR7_REG EEARL
00493
00494
00495 #define PINC0_REG PINC
00496 #define PINC1_REG PINC
00497 #define PINC2_REG PINC
00498 #define PINC3_REG PINC
00499 #define PINC4_REG PINC
00500 #define PINC5_REG PINC
00501 #define PINC6_REG PINC
00502 #define PINC7_REG PINC
00503
00504
00505 #define PINB0_REG PINB
00506 #define PINB1_REG PINB
00507 #define PINB2_REG PINB
00508 #define PINB3_REG PINB
00509 #define PINB4_REG PINB
00510 #define PINB5_REG PINB
00511 #define PINB6_REG PINB
00512 #define PINB7_REG PINB
00513
00514
00515 #define PINA0_REG PINA
00516 #define PINA1_REG PINA
00517 #define PINA2_REG PINA
00518 #define PINA3_REG PINA
00519 #define PINA4_REG PINA
00520 #define PINA5_REG PINA
00521 #define PINA6_REG PINA
00522 #define PINA7_REG PINA
00523
00524
00525 #define ISC00_REG MCUCR
00526 #define ISC01_REG MCUCR
00527 #define ISC10_REG MCUCR
00528 #define ISC11_REG MCUCR
00529 #define SM0_REG MCUCR
00530 #define SM1_REG MCUCR
00531 #define SE_REG MCUCR
00532
00533
00534 #define OCR1AH0_REG OCR1AH
00535 #define OCR1AH1_REG OCR1AH
00536 #define OCR1AH2_REG OCR1AH
00537 #define OCR1AH3_REG OCR1AH
00538 #define OCR1AH4_REG OCR1AH
00539 #define OCR1AH5_REG OCR1AH
00540 #define OCR1AH6_REG OCR1AH
00541 #define OCR1AH7_REG OCR1AH
00542
00543
00544 #define OCR1AL0_REG OCR1AL
00545 #define OCR1AL1_REG OCR1AL
00546 #define OCR1AL2_REG OCR1AL
00547 #define OCR1AL3_REG OCR1AL
00548 #define OCR1AL4_REG OCR1AL
00549 #define OCR1AL5_REG OCR1AL
00550 #define OCR1AL6_REG OCR1AL
00551 #define OCR1AL7_REG OCR1AL
00552
00553
00554 #define SPR0_REG SPCR
00555 #define SPR1_REG SPCR
00556 #define CPHA_REG SPCR
00557 #define CPOL_REG SPCR
00558 #define MSTR_REG SPCR
00559 #define DORD_REG SPCR
00560 #define SPE_REG SPCR
00561 #define SPIE_REG SPCR
00562
00563
00564 #define OCR2_0_REG OCR2
00565 #define OCR2_1_REG OCR2
00566 #define OCR2_2_REG OCR2
00567 #define OCR2_3_REG OCR2
00568 #define OCR2_4_REG OCR2
00569 #define OCR2_5_REG OCR2
00570 #define OCR2_6_REG OCR2
00571 #define OCR2_7_REG OCR2
00572
00573
00574 #define TCR2UB_REG ASSR
00575 #define OCR2UB_REG ASSR
00576 #define TCN2UB_REG ASSR
00577 #define AS2_REG ASSR
00578
00579
00580 #define ADC0_PORT PORTA
00581 #define ADC0_BIT 0
00582
00583 #define ADC1_PORT PORTA
00584 #define ADC1_BIT 1
00585
00586 #define ADC2_PORT PORTA
00587 #define ADC2_BIT 2
00588
00589 #define ADC3_PORT PORTA
00590 #define ADC3_BIT 3
00591
00592 #define ADC4_PORT PORTA
00593 #define ADC4_BIT 4
00594
00595 #define ADc5_PORT PORTA
00596 #define ADc5_BIT 5
00597
00598 #define ADC6_PORT PORTA
00599 #define ADC6_BIT 6
00600
00601 #define ADC7_PORT PORTA
00602 #define ADC7_BIT 7
00603
00604 #define T0_PORT PORTB
00605 #define T0_BIT 0
00606
00607 #define T1_PORT PORTB
00608 #define T1_BIT 1
00609
00610 #define AIN0_PORT PORTB
00611 #define AIN0_BIT 2
00612
00613 #define AIN1_PORT PORTB
00614 #define AIN1_BIT 3
00615
00616 #define SS_PORT PORTB
00617 #define SS_BIT 4
00618
00619 #define MOSI_PORT PORTB
00620 #define MOSI_BIT 5
00621
00622 #define MISO_PORT PORTB
00623 #define MISO_BIT 6
00624
00625
00626
00627
00628
00629
00630
00631
00632 #define TOSC1_PORT PORTC
00633 #define TOSC1_BIT 6
00634
00635 #define TOSC2_PORT PORTC
00636 #define TOSC2_BIT 7
00637
00638 #define RXD_PORT PORTD
00639 #define RXD_BIT 0
00640
00641 #define TXD_PORT PORTD
00642 #define TXD_BIT 1
00643
00644 #define INT0_PORT PORTD
00645 #define INT0_BIT 2
00646
00647 #define INT1_PORT PORTD
00648 #define INT1_BIT 3
00649
00650 #define OC1B_PORT PORTD
00651 #define OC1B_BIT 4
00652
00653 #define OC1A_PORT PORTD
00654 #define OC1A_BIT 5
00655
00656 #define ICP_PORT PORTD
00657 #define ICP_BIT 6
00658
00659 #define OC2_PORT PORTD
00660 #define OC2_BIT 7
00661
00662