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 #ifndef _AVR_IOM162_H_
00029 #define _AVR_IOM162_H_ 1
00030
00031
00032
00033 #ifndef _AVR_IO_H_
00034 # error "Include <avr/io.h> instead of this file."
00035 #endif
00036
00037 #ifndef _AVR_IOXXX_H_
00038 # define _AVR_IOXXX_H_ "iom162.h"
00039 #else
00040 # error "Attempt to include more than one <avr/ioXXX.h> file."
00041 #endif
00042
00043 #include <avr/sfr_defs.h>
00044
00045
00046
00047
00048 #define TCCR3A _SFR_MEM8(0x8B)
00049
00050
00051 #define TCCR3B _SFR_MEM8(0x8A)
00052
00053
00054 #define TCNT3H _SFR_MEM8(0x89)
00055 #define TCNT3L _SFR_MEM8(0x88)
00056 #define TCNT3 _SFR_MEM16(0x88)
00057
00058
00059 #define OCR3AH _SFR_MEM8(0x87)
00060 #define OCR3AL _SFR_MEM8(0x86)
00061 #define OCR3A _SFR_MEM16(0x86)
00062
00063
00064 #define OCR3BH _SFR_MEM8(0x85)
00065 #define OCR3BL _SFR_MEM8(0x84)
00066 #define OCR3B _SFR_MEM16(0x84)
00067
00068
00069 #define ICR3H _SFR_MEM8(0x81)
00070 #define ICR3L _SFR_MEM8(0x80)
00071 #define ICR3 _SFR_MEM16(0x80)
00072
00073
00074 #define ETIMSK _SFR_MEM8(0x7D)
00075
00076
00077 #define ETIFR _SFR_MEM8(0x7C)
00078
00079
00080 #define PCMSK1 _SFR_MEM8(0x6C)
00081
00082
00083 #define PCMSK0 _SFR_MEM8(0x6B)
00084
00085
00086 #define CLKPR _SFR_MEM8(0x61)
00087
00088
00089
00090
00091 #define SREG _SFR_IO8(0x3F)
00092 #define SPH _SFR_IO8(0x3E)
00093 #define SPL _SFR_IO8(0x3D)
00094 #define UBRR1H _SFR_IO8(0x3C)
00095 #define UCSR1C _SFR_IO8(0x3C)
00096 #define GICR _SFR_IO8(0x3B)
00097 #define GIFR _SFR_IO8(0x3A)
00098 #define TIMSK _SFR_IO8(0x39)
00099 #define TIFR _SFR_IO8(0x38)
00100 #define SPMCR _SFR_IO8(0x37)
00101 #define EMCUCR _SFR_IO8(0x36)
00102 #define MCUCR _SFR_IO8(0x35)
00103 #define MCUCSR _SFR_IO8(0x34)
00104 #define TCCR0 _SFR_IO8(0x33)
00105 #define TCNT0 _SFR_IO8(0x32)
00106 #define OCR0 _SFR_IO8(0x31)
00107 #define SFIOR _SFR_IO8(0x30)
00108 #define TCCR1A _SFR_IO8(0x2F)
00109 #define TCCR1B _SFR_IO8(0x2E)
00110 #define TCNT1H _SFR_IO8(0x2D)
00111 #define TCNT1L _SFR_IO8(0x2C)
00112 #define TCNT1 _SFR_IO16(0x2C)
00113 #define OCR1AH _SFR_IO8(0x2B)
00114 #define OCR1AL _SFR_IO8(0x2A)
00115 #define OCR1A _SFR_IO16(0x2A)
00116 #define OCR1BH _SFR_IO8(0x29)
00117 #define OCR1BL _SFR_IO8(0x28)
00118 #define OCR1B _SFR_IO16(0x28)
00119 #define TCCR2 _SFR_IO8(0x27)
00120 #define ASSR _SFR_IO8(0x26)
00121 #define ICR1H _SFR_IO8(0x25)
00122 #define ICR1L _SFR_IO8(0x24)
00123 #define ICR1 _SFR_IO16(0x24)
00124 #define TCNT2 _SFR_IO8(0x23)
00125 #define OCR2 _SFR_IO8(0x22)
00126 #define WDTCR _SFR_IO8(0x21)
00127 #define UBRR0H _SFR_IO8(0x20)
00128 #define UCSR0C _SFR_IO8(0x20)
00129 #define EEARH _SFR_IO8(0x1F)
00130 #define EEARL _SFR_IO8(0x1E)
00131 #define EEAR _SFR_IO16(0x1E)
00132 #define EEDR _SFR_IO8(0x1D)
00133 #define EECR _SFR_IO8(0x1C)
00134 #define PORTA _SFR_IO8(0x1B)
00135 #define DDRA _SFR_IO8(0x1A)
00136 #define PINA _SFR_IO8(0x19)
00137 #define PORTB _SFR_IO8(0x18)
00138 #define DDRB _SFR_IO8(0x17)
00139 #define PINB _SFR_IO8(0x16)
00140 #define PORTC _SFR_IO8(0x15)
00141 #define DDRC _SFR_IO8(0x14)
00142 #define PINC _SFR_IO8(0x13)
00143 #define PORTD _SFR_IO8(0x12)
00144 #define DDRD _SFR_IO8(0x11)
00145 #define PIND _SFR_IO8(0x10)
00146 #define SPDR _SFR_IO8(0x0F)
00147 #define SPSR _SFR_IO8(0x0E)
00148 #define SPCR _SFR_IO8(0x0D)
00149 #define UDR0 _SFR_IO8(0x0C)
00150 #define UCSR0A _SFR_IO8(0x0B)
00151 #define UCSR0B _SFR_IO8(0x0A)
00152 #define UBRR0L _SFR_IO8(0x09)
00153 #define ACSR _SFR_IO8(0x08)
00154 #define PORTE _SFR_IO8(0x07)
00155 #define DDRE _SFR_IO8(0x06)
00156 #define PINE _SFR_IO8(0x05)
00157 #define OSCCAL _SFR_IO8(0x04)
00158 #define OCDR _SFR_IO8(0x04)
00159 #define UDR1 _SFR_IO8(0x03)
00160 #define UCSR1A _SFR_IO8(0x02)
00161 #define UCSR1B _SFR_IO8(0x01)
00162 #define UBRR1L _SFR_IO8(0x00)
00163
00164
00165
00166
00167 #define SIG_INTERRUPT0 _VECTOR(1)
00168 #define SIG_INTERRUPT1 _VECTOR(2)
00169 #define SIG_INTERRUPT2 _VECTOR(3)
00170 #define SIG_PIN_CHANGE0 _VECTOR(4)
00171 #define SIG_PIN_CHANGE1 _VECTOR(5)
00172 #define SIG_INPUT_CAPTURE3 _VECTOR(6)
00173 #define SIG_OUTPUT_COMPARE3A _VECTOR(7)
00174 #define SIG_OUTPUT_COMPARE3B _VECTOR(8)
00175 #define SIG_OVERFLOW3 _VECTOR(9)
00176 #define SIG_OUTPUT_COMPARE2 _VECTOR(10)
00177 #define SIG_OVERFLOW2 _VECTOR(11)
00178 #define SIG_INPUT_CAPTURE1 _VECTOR(12)
00179 #define SIG_OUTPUT_COMPARE1A _VECTOR(13)
00180 #define SIG_OUTPUT_COMPARE1B _VECTOR(14)
00181 #define SIG_OVERFLOW1 _VECTOR(15)
00182 #define SIG_OUTPUT_COMPARE0 _VECTOR(16)
00183 #define SIG_OVERFLOW0 _VECTOR(17)
00184 #define SIG_SPI _VECTOR(18)
00185 #define SIG_USART0_RECV _VECTOR(19)
00186 #define SIG_USART1_RECV _VECTOR(20)
00187 #define SIG_USART0_DATA _VECTOR(21)
00188 #define SIG_USART1_DATA _VECTOR(22)
00189 #define SIG_USART0_TRANS _VECTOR(23)
00190 #define SIG_USART1_TRANS _VECTOR(24)
00191 #define SIG_EEPROM_READY _VECTOR(25)
00192 #define SIG_COMPARATOR _VECTOR(26)
00193 #define SIG_SPM_READY _VECTOR(27)
00194
00195 #define _VECTORS_SIZE 112
00196
00197
00198
00199
00200
00201
00202
00203 #define ICNC3 7
00204 #define ICES3 6
00205 #define WGM33 4
00206 #define WGM32 3
00207 #define CS32 2
00208 #define CS31 1
00209 #define CS30 0
00210
00211
00212
00213
00214
00215 #define COM3A1 7
00216 #define COM3A0 6
00217 #define COM3B1 5
00218 #define COM3B0 4
00219 #define FOC3A 3
00220 #define FOC3B 2
00221 #define WGM31 1
00222 #define WGM30 0
00223
00224
00225
00226
00227
00228 #define TICIE3 5
00229 #define OCIE3A 4
00230 #define OCIE3B 3
00231 #define TOIE3 2
00232
00233
00234
00235
00236
00237 #define ICF3 5
00238 #define OCF3A 4
00239 #define OCF3B 3
00240 #define TOV3 2
00241
00242
00243
00244
00245 #define PCINT15 7
00246 #define PCINT14 6
00247 #define PCINT13 5
00248 #define PCINT12 4
00249 #define PCINT11 3
00250 #define PCINT10 2
00251 #define PCINT9 1
00252 #define PCINT8 0
00253
00254
00255
00256
00257
00258 #define PCINT7 7
00259 #define PCINT6 6
00260 #define PCINT5 5
00261 #define PCINT4 4
00262 #define PCINT3 3
00263 #define PCINT2 2
00264 #define PCINT1 1
00265 #define PCINT0 0
00266
00267
00268
00269
00270
00271 #define CLKPCE 7
00272 #define CLKPS3 3
00273 #define CLKPS2 2
00274 #define CLKPS1 1
00275 #define CLKPS0 0
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285 #define SP15 15
00286 #define SP14 14
00287 #define SP13 13
00288 #define SP12 12
00289 #define SP11 11
00290 #define SP10 10
00291 #define SP9 9
00292 #define SP8 8
00293
00294
00295
00296
00297
00298 #define SP7 7
00299 #define SP6 6
00300 #define SP5 5
00301 #define SP4 4
00302 #define SP3 3
00303 #define SP2 2
00304 #define SP1 1
00305 #define SP0 0
00306
00307
00308
00309
00310
00311 #define URSEL1 7
00312 #define UBRR111 3
00313 #define UBRR110 2
00314 #define UBRR19 1
00315 #define UBRR18 0
00316
00317
00318
00319
00320
00321 #define URSEL1 7
00322 #define UMSEL1 6
00323 #define UPM11 5
00324 #define UPM10 4
00325 #define USBS1 3
00326 #define UCSZ11 2
00327 #define UCSZ10 1
00328 #define UCPOL1 0
00329
00330
00331
00332
00333
00334 #define INT1 7
00335 #define INT0 6
00336 #define INT2 5
00337 #define PCIE1 4
00338 #define PCIE0 3
00339 #define IVSEL 1
00340 #define IVCE 0
00341
00342
00343
00344
00345
00346 #define INTF1 7
00347 #define INTF0 6
00348 #define INTF2 5
00349 #define PCIF1 4
00350 #define PCIF0 3
00351
00352
00353
00354
00355
00356 #define TOIE1 7
00357 #define OCIE1A 6
00358 #define OCIE1B 5
00359 #define OCIE2 4
00360 #define TICIE1 3
00361 #define TOIE2 2
00362 #define TOIE0 1
00363 #define OCIE0 0
00364
00365
00366
00367
00368
00369 #define TOV1 7
00370 #define OCF1A 6
00371 #define OCF1B 5
00372 #define OCF2 4
00373 #define ICF1 3
00374 #define TOV2 2
00375 #define TOV0 1
00376 #define OCF0 0
00377
00378
00379
00380
00381
00382 #define SPMIE 7
00383 #define RWWSB 6
00384 #define RWWSRE 4
00385 #define BLBSET 3
00386 #define PGWRT 2
00387 #define PGERS 1
00388 #define SPMEN 0
00389
00390
00391
00392
00393
00394 #define SM0 7
00395 #define SRL2 6
00396 #define SRL1 5
00397 #define SRL0 4
00398 #define SRW01 3
00399 #define SRW00 2
00400 #define SRW11 1
00401 #define ISC2 0
00402
00403
00404
00405
00406
00407 #define SRE 7
00408 #define SRW10 6
00409 #define SE 5
00410 #define SM1 4
00411 #define ISC11 3
00412 #define ISC10 2
00413 #define ISC01 1
00414 #define ISC00 0
00415
00416
00417
00418
00419
00420 #define JTD 7
00421 #define SM2 5
00422 #define JTRF 4
00423 #define WDRF 3
00424 #define BORF 2
00425 #define EXTRF 1
00426 #define PORF 0
00427
00428
00429
00430
00431
00432 #define FOC0 7
00433 #define WGM00 6
00434 #define COM01 5
00435 #define COM00 4
00436 #define WGM01 3
00437 #define CS02 2
00438 #define CS01 1
00439 #define CS00 0
00440
00441
00442
00443
00444
00445 #define TSM 7
00446 #define XMBK 6
00447 #define XMM2 5
00448 #define XMM1 4
00449 #define XMM0 3
00450 #define PUD 2
00451 #define PSR2 1
00452 #define PSR310 0
00453
00454
00455
00456
00457
00458 #define COM1A1
00459 #define COM1A0
00460 #define COM1B1
00461 #define COM1B0
00462 #define FOC1A
00463 #define FOC1B
00464 #define WGM11
00465 #define WGM10
00466
00467
00468
00469
00470
00471
00472 #define ICNC1 7
00473 #define ICES1 6
00474 #define WGM13 4
00475 #define WGM12 3
00476 #define CS12 2
00477 #define CS11 1
00478 #define CS10 0
00479
00480
00481
00482
00483
00484 #define FOC2 7
00485 #define WGM20 6
00486 #define COM21 5
00487 #define COM20 4
00488 #define WGM21 3
00489 #define CS22 2
00490 #define CS21 1
00491 #define CS20 0
00492
00493
00494
00495
00496
00497 #define AS2 3
00498 #define TCON2UB 2
00499 #define OCR2UB 1
00500 #define TCR2UB 0
00501
00502
00503
00504
00505
00506 #define WDCE 4
00507 #define WDE 3
00508 #define WDP2 2
00509 #define WDP1 1
00510 #define WDP0 0
00511
00512
00513
00514
00515
00516 #define URSEL0 7
00517 #define UBRR011 3
00518 #define UBRR010 2
00519 #define UBRR09 1
00520 #define UBRR08 0
00521
00522
00523
00524
00525
00526 #define URSEL0 7
00527 #define UMSEL0 6
00528 #define UPM01 5
00529 #define UPM00 4
00530 #define USBS0 3
00531 #define UCSZ01 2
00532 #define UCSZ00 1
00533 #define UCPOL0 0
00534
00535
00536
00537
00538
00539 #define EEAR8 0
00540
00541
00542
00543
00544
00545 #define EERIE 3
00546 #define EEMWE 2
00547 #define EEWE 1
00548 #define EERE 0
00549
00550
00551
00552
00553
00554 #define PA7 7
00555 #define PA6 6
00556 #define PA5 5
00557 #define PA4 4
00558 #define PA3 3
00559 #define PA2 2
00560 #define PA1 1
00561 #define PA0 0
00562
00563
00564
00565
00566
00567 #define DDA7 7
00568 #define DDA6 6
00569 #define DDA5 5
00570 #define DDA4 4
00571 #define DDA3 3
00572 #define DDA2 2
00573 #define DDA1 1
00574 #define DDA0 0
00575
00576
00577
00578
00579
00580 #define PINA7 7
00581 #define PINA6 6
00582 #define PINA5 5
00583 #define PINA4 4
00584 #define PINA3 3
00585 #define PINA2 2
00586 #define PINA1 1
00587 #define PINA0 0
00588
00589
00590
00591
00592 #define PB7 7
00593 #define PB6 6
00594 #define PB5 5
00595 #define PB4 4
00596 #define PB3 3
00597 #define PB2 2
00598 #define PB1 1
00599 #define PB0 0
00600
00601
00602
00603
00604
00605 #define DDB7 7
00606 #define DDB6 6
00607 #define DDB5 5
00608 #define DDB4 4
00609 #define DDB3 3
00610 #define DDB2 2
00611 #define DDB1 1
00612 #define DDB0 0
00613
00614
00615
00616
00617
00618 #define PINB7 7
00619 #define PINB6 6
00620 #define PINB5 5
00621 #define PINB4 4
00622 #define PINB3 3
00623 #define PINB2 2
00624 #define PINB1 1
00625 #define PINB0 0
00626
00627
00628
00629
00630
00631 #define PC7 7
00632 #define PC6 6
00633 #define PC5 5
00634 #define PC4 4
00635 #define PC3 3
00636 #define PC2 2
00637 #define PC1 1
00638 #define PC0 0
00639
00640
00641
00642
00643
00644 #define DDC7 7
00645 #define DDC6 6
00646 #define DDC5 5
00647 #define DDC4 4
00648 #define DDC3 3
00649 #define DDC2 2
00650 #define DDC1 1
00651 #define DDC0 0
00652
00653
00654
00655
00656
00657 #define PINC7 7
00658 #define PINC6 6
00659 #define PINC5 5
00660 #define PINC4 4
00661 #define PINC3 3
00662 #define PINC2 2
00663 #define PINC1 1
00664 #define PINC0 0
00665
00666
00667
00668
00669
00670 #define PD7 7
00671 #define PD6 6
00672 #define PD5 5
00673 #define PD4 4
00674 #define PD3 3
00675 #define PD2 2
00676 #define PD1 1
00677 #define PD0 0
00678
00679
00680
00681
00682
00683 #define DDD7 7
00684 #define DDD6 6
00685 #define DDD5 5
00686 #define DDD4 4
00687 #define DDD3 3
00688 #define DDD2 2
00689 #define DDD1 1
00690 #define DDD0 0
00691
00692
00693
00694
00695
00696 #define PIND7 7
00697 #define PIND6 6
00698 #define PIND5 5
00699 #define PIND4 4
00700 #define PIND3 3
00701 #define PIND2 2
00702 #define PIND1 1
00703 #define PIND0 0
00704
00705
00706
00707
00708
00709 #define SPIF 7
00710 #define WCOL 6
00711 #define SPI2X 0
00712
00713
00714
00715
00716
00717 #define SPIE 7
00718 #define SPE 6
00719 #define DORD 5
00720 #define MSTR 4
00721 #define CPOL 3
00722 #define CPHA 2
00723 #define SPR1 1
00724 #define SPR0 0
00725
00726
00727
00728
00729
00730 #define RXC0 7
00731 #define TXC0 6
00732 #define UDRE0 5
00733 #define FE0 4
00734 #define DOR0 3
00735 #define PE0 2
00736 #define U2X0 1
00737 #define MPCM0 0
00738
00739
00740
00741
00742
00743 #define RXCIE0 7
00744 #define TXCIE0 6
00745 #define UDRIE0 5
00746 #define RXEN0 4
00747 #define TXEN0 3
00748 #define UCSZ02 2
00749 #define RXB80 1
00750 #define TXB80 0
00751
00752
00753
00754
00755
00756 #define ACD 7
00757 #define ACBG 6
00758 #define ACO 5
00759 #define ACI 4
00760 #define ACIE 3
00761 #define ACIC 2
00762 #define ACIS1 1
00763 #define ACIS0 0
00764
00765
00766
00767
00768
00769 #define PORTE2 2
00770 #define PORTE1 1
00771 #define PORTE0 0
00772
00773
00774
00775
00776
00777 #define DDE2 2
00778 #define DDE1 1
00779 #define DDE0 0
00780
00781
00782
00783
00784
00785 #define PINE2 2
00786 #define PINE1 1
00787 #define PINE0 0
00788
00789
00790
00791
00792
00793 #define RXC1 7
00794 #define TXC1 6
00795 #define UDRE1 5
00796 #define FE1 4
00797 #define DOR1 3
00798 #define PE1 2
00799 #define U2X1 1
00800 #define MPCM1 0
00801
00802
00803
00804
00805
00806 #define RXCIE1 7
00807 #define TXCIE1 6
00808 #define UDRIE1 5
00809 #define RXEN1 4
00810 #define TXEN1 3
00811 #define UCSZ12 2
00812 #define RXB81 1
00813 #define TXB81 0
00814
00815
00816
00817
00818 #define XL r26
00819 #define XH r27
00820 #define YL r28
00821 #define YH r29
00822 #define ZL r30
00823 #define ZH r31
00824
00825
00826
00827
00828 #define RAMEND 0x4FF
00829 #define XRAMEND 0xFFFF
00830 #define E2END 0x1FF
00831 #define FLASHEND 0x3FFF
00832
00833
00834 #endif