/usr/lib/avr/include/avr/io90pwmx.h is in avr-libc 1:1.7.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 | /* Copyright (c) 2005, Andrey Pashchenko
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id: io90pwmx.h 1873 2009-02-11 17:53:39Z arcanum $ */
/* avr/io90pwmx.h - definitions for AT90PWM2(B) and AT90PWM3(B) */
#ifndef _AVR_IO90PWMX_H_
#define _AVR_IO90PWMX_H_ 1
/* This file should only be included from <avr/io.h>, never directly. */
#ifndef _AVR_IO_H_
# error "Include <avr/io.h> instead of this file."
#endif
#ifndef _AVR_IOXXX_H_
# define _AVR_IOXXX_H_ "io90pwmX.h"
#else
# error "Attempt to include more than one <avr/ioXXX.h> file."
#endif
/* I/O registers */
/* Port B Input Pins Address */
#define PINB _SFR_IO8(0x03)
/* PINB */
#define PINB7 7
#define PINB6 6
#define PINB5 5
#define PINB4 4
#define PINB3 3
#define PINB2 2
#define PINB1 1
#define PINB0 0
/* Port B Data Direction Register */
#define DDRB _SFR_IO8(0x04)
/* DDRB */
#define DDB7 7
#define DDB6 6
#define DDB5 5
#define DDB4 4
#define DDB3 3
#define DDB2 2
#define DDB1 1
#define DDB0 0
/* Port B Data Register */
#define PORTB _SFR_IO8(0x05)
/* PORTB */
#define PB7 7
#define PB6 6
#define PB5 5
#define PB4 4
#define PB3 3
#define PB2 2
#define PB1 1
#define PB0 0
/* Port C Input Pins Address */
#define PINC _SFR_IO8(0x06)
/* PINC */
#define PINC7 7
#define PINC6 6
#define PINC5 5
#define PINC4 4
#define PINC3 3
#define PINC2 2
#define PINC1 1
#define PINC0 0
/* Port C Data Direction Register */
#define DDRC _SFR_IO8(0x07)
/* DDRC */
#define DDC7 7
#define DDC6 6
#define DDC5 5
#define DDC4 4
#define DDC3 3
#define DDC2 2
#define DDC1 1
#define DDC0 0
/* Port C Data Register */
#define PORTC _SFR_IO8(0x08)
/* PORTC */
#define PC7 7
#define PC6 6
#define PC5 5
#define PC4 4
#define PC3 3
#define PC2 2
#define PC1 1
#define PC0 0
/* Port D Input Pins Address */
#define PIND _SFR_IO8(0x09)
/* PIND */
#define PIND7 7
#define PIND6 6
#define PIND5 5
#define PIND4 4
#define PIND3 3
#define PIND2 2
#define PIND1 1
#define PIND0 0
/* Port D Data Direction Register */
#define DDRD _SFR_IO8(0x0A)
/* DDRD */
#define DDD7 7
#define DDD6 6
#define DDD5 5
#define DDD4 4
#define DDD3 3
#define DDD2 2
#define DDD1 1
#define DDD0 0
/* Port D Data Register */
#define PORTD _SFR_IO8(0x0B)
/* PORTD */
#define PD7 7
#define PD6 6
#define PD5 5
#define PD4 4
#define PD3 3
#define PD2 2
#define PD1 1
#define PD0 0
/* Port E Input Pins Address */
#define PINE _SFR_IO8(0x0C)
/* PINE */
#define PINE2 2
#define PINE1 1
#define PINE0 0
/* Port E Data Direction Register */
#define DDRE _SFR_IO8(0x0D)
/* DDRE */
#define DDE2 2
#define DDE1 1
#define DDE0 0
/* Port E Data Register */
#define PORTE _SFR_IO8(0x0E)
/* PORTE */
#define PE2 2
#define PE1 1
#define PE0 0
/* Timer/Counter 0 Interrupt Flag Register */
#define TIFR0 _SFR_IO8(0x15)
/* TIFR0 */
#define OCF0B 2 /* Output Compare Flag 0B */
#define OCF0A 1 /* Output Compare Flag 0A */
#define TOV0 0 /* Overflow Flag */
/* Timer/Counter1 Interrupt Flag Register */
#define TIFR1 _SFR_IO8(0x16)
/* TIFR1 */
#define ICF1 5 /* Input Capture Flag 1 */
#define OCF1B 2 /* Output Compare Flag 1B*/
#define OCF1A 1 /* Output Compare Flag 1A*/
#define TOV1 0 /* Overflow Flag */
/* General Purpose I/O Register 1 */
#define GPIOR1 _SFR_IO8(0x19)
/* GPIOR1 */
#define GPIOR17 7
#define GPIOR16 6
#define GPIOR15 5
#define GPIOR14 4
#define GPIOR13 3
#define GPIOR12 2
#define GPIOR11 1
#define GPIOR10 0
/* General Purpose I/O Register 2 */
#define GPIOR2 _SFR_IO8(0x1A)
/* GPIOR2 */
#define GPIOR27 7
#define GPIOR26 6
#define GPIOR25 5
#define GPIOR24 4
#define GPIOR23 3
#define GPIOR22 2
#define GPIOR21 1
#define GPIOR20 0
/* General Purpose I/O Register 3 */
#define GPIOR3 _SFR_IO8(0x1B)
/* GPIOR3 */
#define GPIOR37 7
#define GPIOR36 6
#define GPIOR35 5
#define GPIOR34 4
#define GPIOR33 3
#define GPIOR32 2
#define GPIOR31 1
#define GPIOR30 0
/* External Interrupt Flag Register */
#define EIFR _SFR_IO8(0x1C)
/* EIFR */
#define INTF3 3
#define INTF2 2
#define INTF1 1
#define INTF0 0
/* External Interrupt Mask Register */
#define EIMSK _SFR_IO8(0x1D)
/* EIMSK */
#define INT3 3 /* External Interrupt Request 3 Enable */
#define INT2 2 /* External Interrupt Request 2 Enable */
#define INT1 1 /* External Interrupt Request 1 Enable */
#define INT0 0 /* External Interrupt Request 0 Enable */
/* General Purpose I/O Register 0 */
#define GPIOR0 _SFR_IO8(0x1E)
/* GPIOR0 */
#define GPIOR07 7
#define GPIOR06 6
#define GPIOR05 5
#define GPIOR04 4
#define GPIOR03 3
#define GPIOR02 2
#define GPIOR01 1
#define GPIOR00 0
/* EEPROM Control Register */
#define EECR _SFR_IO8(0x1F)
/* EECR */
#define EERIE 3 /* EEPROM Ready Interrupt Enable */
#define EEMWE 2 /* EEPROM Master Write Enable */
#define EEWE 1 /* EEPROM Write Enable */
#define EERE 0 /* EEPROM Read Enable */
/* EEPROM Data Register */
#define EEDR _SFR_IO8(0x20)
/* EEDR */
#define EEDR7 7
#define EEDR6 6
#define EEDR5 5
#define EEDR4 4
#define EEDR3 3
#define EEDR2 2
#define EEDR1 1
#define EEDR0 0
/* The EEPROM Address Registers */
#define EEAR _SFR_IO16(0x21)
#define EEARL _SFR_IO8(0x21)
#define EEARH _SFR_IO8(0x22)
/* EEARH */
#define EEAR11 3
#define EEAR10 2
#define EEAR9 1
#define EEAR8 0
/* EEARL */
#define EEAR7 7
#define EEAR6 6
#define EEAR5 5
#define EEAR4 4
#define EEAR3 3
#define EEAR2 2
#define EEAR1 1
#define EEAR0 0
/* 6-char sequence denoting where to find the EEPROM registers in memory space.
Adresses denoted in hex syntax with uppercase letters. Used by the EEPROM
subroutines.
First two letters: EECR address.
Second two letters: EEDR address.
Last two letters: EEAR address. */
#define __EEPROM_REG_LOCATIONS__ 1F2021
/* General Timer/Counter Control Register */
#define GTCCR _SFR_IO8(0x23)
/* GTCCR */
#define TSM 7 /* Timer/Counter Synchronization Mode */
#define ICPSEL1 6 /* Timer1 Input Capture Selection Bit */
#define PSR10 0 /* Prescaler Reset Timer/Counter1 and Timer/Counter0 */
/* Timer/Counter Control Register A */
#define TCCR0A _SFR_IO8(0x24)
/* TCCR0A */
#define COM0A1 7 /* Compare Output Mode, Phase Correct PWM Mode */
#define COM0A0 6 /* Compare Output Mode, Phase Correct PWM Mode */
#define COM0B1 5 /* Compare Output Mode, Fast PWm */
#define COM0B0 4 /* Compare Output Mode, Fast PWm */
#define WGM01 1 /* Waveform Generation Mode */
#define WGM00 0 /* Waveform Generation Mode */
/* Timer/Counter Control Register B */
#define TCCR0B _SFR_IO8(0x25)
/* TCCR0B */
#define FOC0A 7 /* Force Output Compare A */
#define FOC0B 6 /* Force Output Compare B */
#define WGM02 3 /* Waveform Generation Mode */
#define CS02 2 /* Clock Select */
#define CS01 1 /* Clock Select */
#define CS00 0 /* Clock Select */
/* Timer/Counter0 Register */
#define TCNT0 _SFR_IO8(0x26)
/* TCNT0 */
#define TCNT07 7
#define TCNT06 6
#define TCNT05 5
#define TCNT04 4
#define TCNT03 3
#define TCNT02 2
#define TCNT01 1
#define TCNT00 0
/* Timer/Counter0 Output Compare Register A */
#define OCR0A _SFR_IO8(0x27)
/* OCR0A */
#define OCR0A7 7
#define OCR0A6 6
#define OCR0A5 5
#define OCR0A4 4
#define OCR0A3 3
#define OCR0A2 2
#define OCR0A1 1
#define OCR0A0 0
/* Timer/Counter0 Output Compare Register B */
#define OCR0B _SFR_IO8(0x28)
/* OCR0B */
#define OCR0B7 7
#define OCR0B6 6
#define OCR0B5 5
#define OCR0B4 4
#define OCR0B3 3
#define OCR0B2 2
#define OCR0B1 1
#define OCR0B0 0
/* PLL Control and Status Register */
#define PLLCSR _SFR_IO8(0x29)
/* PLLCSR */
#define PCKE 2 /* PCK Enable */
/* Bit 2 has been renamed in later versions of the datasheet. */
#define PLLF 2 /* PLL Factor */
#define PLLE 1 /* PLL Enable */
#define PLOCK 0 /* PLL Lock Detector */
/* SPI Control Register */
#define SPCR _SFR_IO8(0x2C)
/* SPCR */
#define SPIE 7 /* SPI Interrupt Enable */
#define SPE 6 /* SPI Enable */
#define DORD 5 /* Data Order */
#define MSTR 4 /* Master/Slave Select */
#define CPOL 3 /* Clock polarity */
#define CPHA 2 /* Clock Phase */
#define SPR1 1 /* SPI Clock Rate Select 1 */
#define SPR0 0 /* SPI Clock Rate Select 0 */
/* SPI Status Register */
#define SPSR _SFR_IO8(0x2D)
/* SPSR */
#define SPIF 7 /* SPI Interrupt Flag */
#define WCOL 6 /* Write Collision Flag */
#define SPI2X 0 /* Double SPI Speed Bit */
/* SPI Data Register */
#define SPDR _SFR_IO8(0x2E)
/* SPDR */
#define SPD7 7
#define SPD6 6
#define SPD5 5
#define SPD4 4
#define SPD3 3
#define SPD2 2
#define SPD1 1
#define SPD0 0
/* Analog Comparator Status Register */
#define ACSR _SFR_IO8(0x30)
/* ACSR */
#define ACCKDIV 7 /* Analog Comparator Clock Divider */
#define AC2IF 6 /* Analog Comparator 2 Interrupt Flag Bit */
#define AC1IF 5 /* Analog Comparator 1 Interrupt Flag Bit */
#define AC0IF 4 /* Analog Comparator 0 Interrupt Flag Bit */
#define AC2O 2 /* Analog Comparator 2 Output Bit */
#define AC1O 1 /* Analog Comparator 1 Output Bit */
#define AC0O 0 /* Analog Comparator 0 Output Bit */
/* Monitor Data Register */
#define MONDR _SFR_IO8(0x31)
/* Monitor Stop Mode Control Register */
#define MSMCR _SFR_IO8(0x32)
/* Sleep Mode Control Register */
#define SMCR _SFR_IO8(0x33)
/* SMCR */
#define SM2 3 /* Sleep Mode Select bit2 */
#define SM1 2 /* Sleep Mode Select bit1 */
#define SM0 1 /* Sleep Mode Select bit0 */
#define SE 0 /* Sleep Enable */
/* MCU Status Register */
#define MCUSR _SFR_IO8(0x34)
/* MCUSR */
#define WDRF 3 /* Watchdog Reset Flag */
#define BORF 2 /* Brown-out Reset Flag */
#define EXTRF 1 /* External Reset Flag */
#define PORF 0 /* Power-on reset flag */
/* MCU Control Register */
#define MCUCR _SFR_IO8(0x35)
/* MCUCR */
#define SPIPS 7 /* SPI Pin Select */
#define PUD 4 /* Pull-up disable */
#define IVSEL 1 /* Interrupt Vector Select */
#define IVCE 0 /* Interrupt Vector Change Enable */
/* Store Program Memory Control Register */
#define SPMCSR _SFR_IO8(0x37)
/* SPMCSR */
#define SPMIE 7 /* SPM Interrupt Enable */
#define RWWSB 6 /* Read While Write Section Busy */
#define RWWSRE 4 /* Read While Write section read enable */
#define BLBSET 3 /* Boot Lock Bit Set */
#define PGWRT 2 /* Page Write */
#define PGERS 1 /* Page Erase */
#define SPMEN 0 /* Store Program Memory Enable */
/* 0x3D..0x3E SP [defined in <avr/io.h>] */
/* 0x3F SREG [defined in <avr/io.h>] */
/* Watchdog Timer Control Register */
#define WDTCSR _SFR_MEM8(0x60)
/* WDTCSR */
#define WDIF 7 /* Watchdog Timeout Interrupt Flag */
#define WDIE 6 /* Watchdog Timeout Interrupt Enable */
#define WDP3 5 /* Watchdog Timer Prescaler bit3 */
#define WDCE 4 /* Watchdog Change Enable */
#define WDE 3 /* Watchdog Enable */
#define WDP2 2 /* Watchdog Timer Prescaler bit2 */
#define WDP1 1 /* Watchdog Timer Prescaler bit1 */
#define WDP0 0 /* Watchdog Timer Prescaler bit0 */
/* Clock Prescaler Register */
#define CLKPR _SFR_MEM8(0x61)
/* CLKPR */
#define CLKPCE 7 /* Clock Prescaler Change Enable */
#define CLKPS3 3 /* Clock Prescaler Select bit3 */
#define CLKPS2 2 /* Clock Prescaler Select bit2 */
#define CLKPS1 1 /* Clock Prescaler Select bit1 */
#define CLKPS0 0 /* Clock Prescaler Select bit0 */
/* Power Reduction Register */
#define PRR _SFR_MEM8(0x64)
/* PRR */
#define PRPSC2 7 /* Power Reduction PSC2 */
#define PRPSC1 6 /* Power Reduction PSC1 */
#define PRPSC0 5 /* Power Reduction PSC0 */
#define PRTIM1 4 /* Power Reduction Timer/Counter1 */
#define PRTIM0 3 /* Power Reduction Timer/Counter0 */
#define PRSPI 2 /* Power Reduction Serial Peripheral Interface */
#define PRUSART 1 /* Power Reduction USART */
#define PRADC 0 /* Power Reduction ADC */
/* Oscillator Calibration Value */
#define OSCCAL _SFR_MEM8(0x66)
/* OSCCAL */
#define CAL6 6
#define CAL5 5
#define CAL4 4
#define CAL3 3
#define CAL2 2
#define CAL1 1
#define CAL0 0
/* External Interrupt Control Register A */
#define EICRA _SFR_MEM8(0x69)
/* EICRA */
#define ISC31 7
#define ISC30 6
#define ISC21 5
#define ISC20 4
#define ISC11 3
#define ISC10 2
#define ISC01 1
#define ISC00 0
/* Timer/Counter0 Interrupt Mask Register */
#define TIMSK0 _SFR_MEM8(0x6E)
/* TIMSK0 */
#define OCIE0B 2 /* Output Compare Match B Interrupt Enable */
#define OCIE0A 1 /* Output Compare Match A Interrupt Enable */
#define TOIE0 0 /* Overflow Interrupt Enable */
/* Timer/Counter1 Interrupt Mask Register */
#define TIMSK1 _SFR_MEM8(0x6F)
/* TIMSK1 */
#define ICIE1 5 /* Input Capture Interrupt Enable */
#define OCIE1B 2 /* Output Compare Match B Interrupt Enable */
#define OCIE1A 1 /* Output Compare Match A Interrupt Enable */
#define TOIE1 0 /* Overflow Interrupt Enable */
/* Amplifier 0 Control and Status register */
#define AMP0CSR _SFR_MEM8(0x76)
#define AMP0EN 7
#define AMP0IS 6
#define AMP0G1 5
#define AMP0G0 4
#define AMP0TS1 1
#define AMP0TS0 0
/* Amplifier 1 Control and Status register */
#define AMP1CSR _SFR_MEM8(0x77)
#define AMP1EN 7
#define AMP1IS 6
#define AMP1G1 5
#define AMP1G0 4
#define AMP1TS1 1
#define AMP1TS0 0
/* ADC Result Data Register */
#ifndef __ASSEMBLER__
#define ADC _SFR_MEM16(0x78)
#endif
#define ADCW _SFR_MEM16(0x78)
#define ADCL _SFR_MEM8(0x78)
#define ADCH _SFR_MEM8(0x79)
/* ADC Control and Status Register A */
#define ADCSRA _SFR_MEM8(0x7A)
/* ADCSRA */
#define ADEN 7 /* ADC Enable */
#define ADSC 6 /* ADC Start Conversion */
#define ADATE 5 /* ADC Auto Trigger Enable */
#define ADIF 4 /* ADC Interrupt Flag */
#define ADIE 3 /* ADC Interrupt Enable */
#define ADPS2 2 /* ADC Prescaler Select bit2 */
#define ADPS1 1 /* ADC Prescaler Select bit1 */
#define ADPS0 0 /* ADC Prescaler Select bit0 */
/* ADC Control and Status Register B */
#define ADCSRB _SFR_MEM8(0x7B)
/* ADCSRB */
#define ADHSM 7 /* ADC High Speed Mode */
#define ADASCR 4
#define ADTS3 3 /* ADC Auto Trigger Source 3 */
#define ADTS2 2 /* ADC Auto Trigger Source 2 */
#define ADTS1 1 /* ADC Auto Trigger Source 1 */
#define ADTS0 0 /* ADC Auto Trigger Source 0 */
/* ADC multiplexer Selection Register */
#define ADMUX _SFR_MEM8(0x7C)
/* ADMUX */
#define REFS1 7 /* Reference Selection bit1 */
#define REFS0 6 /* Reference Selection bit0 */
#define ADLAR 5 /* Left Adjust Result */
#define MUX3 3 /* Analog Channel and Gain Selection bit3 */
#define MUX2 2 /* Analog Channel and Gain Selection bit2 */
#define MUX1 1 /* Analog Channel and Gain Selection bit1 */
#define MUX0 0 /* Analog Channel and Gain Selection bit0 */
/* Digital Input Disable Register 0 */
#define DIDR0 _SFR_MEM8(0x7E)
/* DIDR0 */
#define ADC7D 7 /* ADC7 Digital input Disable */
#define ADC6D 6 /* ADC6 Digital input Disable */
#define ADC5D 5 /* ADC5 Digital input Disable */
#define ADC4D 4 /* ADC4 Digital input Disable */
#define ADC3D 3 /* ADC3 Digital input Disable */
#define ADC2D 2 /* ADC2 Digital input Disable */
#define ADC1D 1 /* ADC1 Digital input Disable */
#define ADC0D 0 /* ADC0 Digital input Disable */
/* Digital Input Disable Register 1 */
#define DIDR1 _SFR_MEM8(0x7F)
/* DIDR1 */
#define ACMP0D 5
#define AMP0PD 4
#define AMP0ND 3
#define ADC10D 2 /* ADC10 Digital input Disable */
#define ADC9D 1 /* ADC9 Digital input Disable */
#define ADC8D 0 /* ADC8 Digital input Disable */
/* Timer/Counter1 Control Register A */
#define TCCR1A _SFR_MEM8(0x80)
/* TCCR1A */
#define COM1A1 7 /* Comparet Ouput Mode 1A, bit 1 */
#define COM1A0 6 /* Comparet Ouput Mode 1A, bit 0 */
#define COM1B1 5 /* Compare Output Mode 1B, bit 1 */
#define COM1B0 4 /* Compare Output Mode 1B, bit 0 */
#define WGM11 1 /* Waveform Generation Mode */
#define WGM10 0 /* Waveform Generation Mode */
/* Timer/Counter1 Control Register B */
#define TCCR1B _SFR_MEM8(0x81)
/* TCCR1B */
#define ICNC1 7 /* Input Capture 1 Noise Canceler */
#define ICES1 6 /* Input Capture 1 Edge Select */
#define WGM13 4 /* Waveform Generation Mode */
#define WGM12 3 /* Waveform Generation Mode */
#define CS12 2 /* Prescaler source of Timer/Counter 1 */
#define CS11 1 /* Prescaler source of Timer/Counter 1 */
#define CS10 0 /* Prescaler source of Timer/Counter 1 */
/* Timer/Counter1 Control Register C */
#define TCCR1C _SFR_MEM8(0x82)
/* TCCR1C */
#define FOC1A 7 /* Force Output Compare for Channel A */
#define FOC1B 6 /* Force Output Compare for Channel B */
/* Timer/Counter1 */
#define TCNT1 _SFR_MEM16(0x84)
#define TCNT1L _SFR_MEM8(0x84)
#define TCNT1H _SFR_MEM8(0x85)
/* TCNT1H */
#define TCNT115 7
#define TCNT114 6
#define TCNT113 5
#define TCNT112 4
#define TCNT111 3
#define TCNT110 2
#define TCNT19 1
#define TCNT18 0
/* TCNT1L */
#define TCNT17 7
#define TCNT16 6
#define TCNT15 5
#define TCNT14 4
#define TCNT13 3
#define TCNT12 2
#define TCNT11 1
#define TCNT10 0
/* Input Capture Register 1 */
#define ICR1 _SFR_MEM16(0x86)
#define ICR1L _SFR_MEM8(0x86)
#define ICR1H _SFR_MEM8(0x87)
/* ICR1H */
#define ICR115 7
#define ICR114 6
#define ICR113 5
#define ICR112 4
#define ICR111 3
#define ICR110 2
#define ICR19 1
#define ICR18 0
/* ICR1L */
#define ICR17 7
#define ICR16 6
#define ICR15 5
#define ICR14 4
#define ICR13 3
#define ICR12 2
#define ICR11 1
#define ICR10 0
/* Output Compare Register 1 A */
#define OCR1A _SFR_MEM16(0x88)
#define OCR1AL _SFR_MEM8(0x88)
#define OCR1AH _SFR_MEM8(0x89)
/* OCR1AH */
#define OCR1A15 7
#define OCR1A14 6
#define OCR1A13 5
#define OCR1A12 4
#define OCR1A11 3
#define OCR1A10 2
#define OCR1A9 1
#define OCR1A8 0
/* OCR1AL */
#define OCR1A7 7
#define OCR1A6 6
#define OCR1A5 5
#define OCR1A4 4
#define OCR1A3 3
#define OCR1A2 2
#define OCR1A1 1
#define OCR1A0 0
/* Output Compare Register 1 B */
#define OCR1B _SFR_MEM16(0x8A)
#define OCR1BL _SFR_MEM8(0x8A)
#define OCR1BH _SFR_MEM8(0x8B)
/* OCR1BH */
#define OCR1B15 7
#define OCR1B14 6
#define OCR1B13 5
#define OCR1B12 4
#define OCR1B11 3
#define OCR1B10 2
#define OCR1B9 1
#define OCR1B8 0
/* OCR1BL */
#define OCR1B7 7
#define OCR1B6 6
#define OCR1B5 5
#define OCR1B4 4
#define OCR1B3 3
#define OCR1B2 2
#define OCR1B1 1
#define OCR1B0 0
/* PSC0 Interrupt Flag Register */
#define PIFR0 _SFR_MEM8(0xA0)
/* PIFR0 */
#define POAC0B 7 /* PSC0 Output B Activity */
#define POAC0A 6 /* PSC0 Output A Activity */
#define PSEI0 5 /* PSC0 Synchro Error Interrupt */
#define PEV0B 4 /* PSC0 External Event B Interrupt */
#define PEV0A 3 /* PSC0 External Event A Interrupt */
#define PRN01 2 /* PSC0 Ramp Number bit1 */
#define PRN00 1 /* PSC0 Ramp Number bit0 */
#define PEOP0 0 /* End Of PSC0 Interrupt */
/* PSC0 Interrupt Mask Register */
#define PIM0 _SFR_MEM8(0xA1)
/* PIM0 */
#define PSEIE0 5 /* PSC0 Synchro Error Interrupt Enable */
#define PEVE0B 4 /* PSC0 External Event B Interrupt Enable */
#define PEVE0A 3 /* PSC0 External Event A Interrupt Enable */
#define PEOPE0 0 /* PSC0 End Of Cycle Interrupt Enable */
/* PSC1 Interrupt Flag Register */
#define PIFR1 _SFR_MEM8(0xA2)
/* PIFR1 */
#define POAC1B 7 /* PSC1 Output B Activity */
#define POAC1A 6 /* PSC1 Output A Activity */
#define PSEI1 5 /* PSC1 Synchro Error Interrupt */
#define PEV1B 4 /* PSC1 External Event B Interrupt */
#define PEV1A 3 /* PSC1 External Event A Interrupt */
#define PRN11 2 /* PSC1 Ramp Number bit1 */
#define PRN10 1 /* PSC1 Ramp Number bit0 */
#define PEOP1 0 /* End Of PSC1 Interrupt */
/* PSC1 Interrupt Mask Register */
#define PIM1 _SFR_MEM8(0xA3)
/* PIM1 */
#define PSEIE1 5 /* PSC1 Synchro Error Interrupt Enable */
#define PEVE1B 4 /* PSC1 External Event B Interrupt Enable */
#define PEVE1A 3 /* PSC1 External Event A Interrupt Enable */
#define PEOPE1 0 /* PSC1 End Of Cycle Interrupt Enable */
/* PSC2 Interrupt Flag Register */
#define PIFR2 _SFR_MEM8(0xA4)
/* PIFR2 */
#define POAC2B 7 /* PSC2 Output B Activity */
#define POAC2A 6 /* PSC2 Output A Activity */
#define PSEI2 5 /* PSC2 Synchro Error Interrupt */
#define PEV2B 4 /* PSC2 External Event B Interrupt */
#define PEV2A 3 /* PSC2 External Event A Interrupt */
#define PRN21 2 /* PSC2 Ramp Number bit1 */
#define PRN20 1 /* PSC2 Ramp Number bit0 */
#define PEOP2 0 /* End Of PSC2 Interrupt */
/* PSC2 Interrupt Mask Register */
#define PIM2 _SFR_MEM8(0xA5)
/* PIM2 */
#define PSEIE2 5 /* PSC2 Synchro Error Interrupt Enable */
#define PEVE2B 4 /* PSC2 External Event B Interrupt Enable */
#define PEVE2A 3 /* PSC2 External Event A Interrupt Enable */
#define PEOPE2 0 /* PSC2 End Of Cycle Interrupt Enable */
/* Digital to Analog Conversion Control Register */
#define DACON _SFR_MEM8(0xAA)
/* DACON */
#define DAATE 7 /* DAC Auto Trigger Enable bit */
#define DATS2 6 /* DAC Trigger Selection bit2 */
#define DATS1 5 /* DAC Trigger Selection bit1 */
#define DATS0 4 /* DAC Trigger Selection bit0 */
#define DALA 2 /* Digital to Analog Left Adjust */
#define DAOE 1 /* Digital to Analog Output Enable bit */
#define DAEN 0 /* Digital to Analog Enable bit */
/* Digital to Analog Converter input Register */
#define DAC _SFR_MEM16(0xAB)
#define DACL _SFR_MEM8(0xAB)
#define DACH _SFR_MEM8(0xAC)
/* Analog Comparator 0 Control Register */
#define AC0CON _SFR_MEM8(0xAD)
/* AC0CON */
#define AC0EN 7 /* Analog Comparator 0 Enable Bit */
#define AC0IE 6 /* Analog Comparator 0 Interrupt Enable bit */
#define AC0IS1 5 /* Analog Comparator 0 Interrupt Select bit1 */
#define AC0IS0 4 /* Analog Comparator 0 Interrupt Select bit0 */
#define AC0M2 2 /* Analog Comparator 0 Multiplexer register bit2 */
#define AC0M1 1 /* Analog Comparator 0 Multiplexer register bit1 */
#define AC0M0 0 /* Analog Comparator 0 Multiplexer register bit0 */
/* Analog Comparator 1 Control Register */
#define AC1CON _SFR_MEM8(0xAE)
/* AC1CON */
#define AC1EN 7 /* Analog Comparator 1 Enable Bit */
#define AC1IE 6 /* Analog Comparator 1 Interrupt Enable bit */
#define AC1IS1 5 /* Analog Comparator 1 Interrupt Select bit1 */
#define AC1IS0 4 /* Analog Comparator 1 Interrupt Select bit0 */
#define AC1ICE 3 /* Analog Comparator 1 Interrupt Capture Enable bit */
#define AC1M2 2 /* Analog Comparator 1 Multiplexer register bit2 */
#define AC1M1 1 /* Analog Comparator 1 Multiplexer register bit1 */
#define AC1M0 0 /* Analog Comparator 1 Multiplexer register bit0 */
/* Analog Comparator 2 Control Register */
#define AC2CON _SFR_MEM8(0xAF)
/* AC2CON */
#define AC2EN 7 /* Analog Comparator 2 Enable Bit */
#define AC2IE 6 /* Analog Comparator 2 Interrupt Enable bit */
#define AC2IS1 5 /* Analog Comparator 2 Interrupt Select bit1 */
#define AC2IS0 4 /* Analog Comparator 2 Interrupt Select bit0 */
#define AC2M2 2 /* Analog Comparator 2 Multiplexer register bit2 */
#define AC2M1 1 /* Analog Comparator 2 Multiplexer register bit1 */
#define AC2M0 0 /* Analog Comparator 2 Multiplexer register bit0 */
/* USART Control and Status Register A */
#define UCSRA _SFR_MEM8(0xC0)
/* UCSRA */
#define RXC 7 /* USART Receive Complete */
#define TXC 6 /* USART Transmit Complete */
#define UDRE 5 /* USART Data Register Empty */
#define FE 4 /* Frame Error */
#define DOR 3 /* Data OverRun */
#define UPE 2 /* USART Parity Error */
#define U2X 1 /* Double the USART Transmission Speed */
#define MPCM 0 /* Multi-processor Communication Mode */
/* USART Control and Status Register B */
#define UCSRB _SFR_MEM8(0xC1)
/* UCSRB */
#define RXCIE 7 /* RX Complete Interrupt Enable */
#define TXCIE 6 /* TX Complete Interrupt Enable */
#define UDRIE 5 /* USART Data Register Empty Interrupt Enable */
#define RXEN 4 /* Receiver Enable */
#define TXEN 3 /* Transmitter Enable */
#define UCSZ2 2 /* Character Size */
#define RXB8 1 /* Receive Data Bit 8 */
#define TXB8 0 /* Transmit Data Bit 8 */
/* USART Control and Status Register C */
#define UCSRC _SFR_MEM8(0xC2)
/* UCSRC */
#define UMSEL 6 /* USART Mode Select */
#define UPM1 5 /* Parity Mode bit1 */
#define UPM0 4 /* Parity Mode bit0 */
#define USBS 3 /* Stop Bit Select */
#define UCSZ1 2 /* Character Size bit1 */
#define UCSZ0 1 /* Character Size bit0 */
#define UCPOL 0 /* Clock Polarity */
/* USART Baud Rate Register */
#define UBRR _SFR_MEM16(0xC4)
#define UBRRL _SFR_MEM8(0xC4)
#define UBRRH _SFR_MEM8(0xC5)
/* USART I/O Data Register */
#define UDR _SFR_MEM8(0xC6)
/* EUSART Control and Status Register A */
#define EUCSRA _SFR_MEM8(0xC8)
/* EUCSRA */
#define UTxS3 7 /* EUSART Transmit Character Size bit3 */
#define UTxS2 6 /* EUSART Transmit Character Size bit2 */
#define UTxS1 5 /* EUSART Transmit Character Size bit1 */
#define UTxS0 4 /* EUSART Transmit Character Size bit0 */
#define URxS3 3 /* EUSART Receive Character Size bit3 */
#define URxS2 2 /* EUSART Receive Character Size bit2 */
#define URxS1 1 /* EUSART Receive Character Size bit1 */
#define URxS0 0 /* EUSART Receive Character Size bit0 */
/* EUSART Control and Status Register B */
#define EUCSRB _SFR_MEM8(0xC9)
/* EUCSRB */
#define EUSART 4 /* EUSART Enable Bit */
#define EUSBS 3 /* EUSBS Enable Bit */
#define EMCH 1 /* Manchester mode */
#define BODR 0 /* Bit Order */
/* EUSART Control and Status Register C */
#define EUCSRC _SFR_MEM8(0xCA)
/* EUCSRC */
#define FEM 3 /* Frame Error Manchester */
#define F1617 2
#define STP1 1 /* Stop bits values bit1 */
#define STP0 0 /* Stop bits values bit0 */
/* Manchester receiver Baud Rate Registers */
#define MUBRR _SFR_MEM16(0xCC)
#define MUBRRL _SFR_MEM8(0xCC)
#define MUBRRH _SFR_MEM8(0xCD)
/* EUSART I/O Data Register */
#define EUDR _SFR_MEM8(0xCE)
/* PSC 0 Synchro and Output Configuration */
#define PSOC0 _SFR_MEM8(0xD0)
/* PSOC0 */
#define PSYNC01 5 /* Synchronization Out for ADC Selection bit1 */
#define PSYNC00 4 /* Synchronization Out for ADC Selection bit0 */
#define POEN0B 2 /* PSC 0 OUT Part B Output Enable */
#define POEN0A 0 /* PSC 0 OUT Part A Output Enable */
/* Output Compare SA Registers */
#define OCR0SA _SFR_MEM16(0xD2)
#define OCR0SAL _SFR_MEM8(0xD2)
#define OCR0SAH _SFR_MEM8(0xD3)
/* Output Compare RA Registers */
#define OCR0RA _SFR_MEM16(0xD4)
#define OCR0RAL _SFR_MEM8(0xD4)
#define OCR0RAH _SFR_MEM8(0xD5)
/* Output Compare SB Registers */
#define OCR0SB _SFR_MEM16(0xD6)
#define OCR0SBL _SFR_MEM8(0xD6)
#define OCR0SBH _SFR_MEM8(0xD7)
/* Output Compare RB Registers */
#define OCR0RB _SFR_MEM16(0xD8)
#define OCR0RBL _SFR_MEM8(0xD8)
#define OCR0RBH _SFR_MEM8(0xD9)
/* PSC 0 Configuration Register */
#define PCNF0 _SFR_MEM8(0xDA)
/* PCNF0 */
#define PFIFTY0 7 /* PSC 0 Fifty */
#define PALOCK0 6 /* PSC 0 Autolock */
#define PLOCK0 5 /* PSC 0 Lock */
#define PMODE01 4 /* PSC 0 Mode bit1 */
#define PMODE00 3 /* PSC 0 Mode bit0 */
#define POP0 2 /* PSC 0 Output Polarity */
#define PCLKSEL0 1 /* PSC 0 Input Clock Select */
/* PSC 0 Control Register */
#define PCTL0 _SFR_MEM8(0xDB)
/* PCTL0 */
#define PPRE01 7 /* PSC 0 Prescaler Select bit1 */
#define PPRE00 6 /* PSC 0 Prescaler Select bit0 */
#define PBFM0 5 /* Balance Flank Width Modulation */
#define PAOC0B 4 /* PSC 0 Asynchronous Output Control B */
#define PAOC0A 3 /* PSC 0 Asynchronous Output Control A */
#define PARUN0 2 /* PSC 0 Autorun */
#define PCCYC0 1 /* PSC 0 Complete Cycle */
#define PRUN0 0 /* PSC 0 Run */
/* PSC 0 Input A Control Register */
#define PFRC0A _SFR_MEM8(0xDC)
/* PFRC0A */
#define PCAE0A 7 /* PSC 0 Capture Enable Input Part A */
#define PISEL0A 6 /* PSC 0 Input Select for Part A */
#define PELEV0A 5 /* PSC 0 Edge Level Selector of Input Part A */
#define PFLTE0A 4 /* PSC 0 Filter Enable on Input Part A */
#define PRFM0A3 3 /* PSC 0 Fault Mode bit3 */
#define PRFM0A2 2 /* PSC 0 Fault Mode bit2 */
#define PRFM0A1 1 /* PSC 0 Fault Mode bit1 */
#define PRFM0A0 0 /* PSC 0 Fault Mode bit0 */
/* PSC 0 Input B Control Register */
#define PFRC0B _SFR_MEM8(0xDD)
/* PFRC0B */
#define PCAE0B 7 /* PSC 0 Capture Enable Input Part B */
#define PISEL0B 6 /* PSC 0 Input Select for Part B */
#define PELEV0B 5 /* PSC 0 Edge Level Selector of Input Part B */
#define PFLTE0B 4 /* PSC 0 Filter Enable on Input Part B */
#define PRFM0B3 3 /* PSC 0 Fault Mode bit3 */
#define PRFM0B2 2 /* PSC 0 Fault Mode bit2 */
#define PRFM0B1 1 /* PSC 0 Fault Mode bit1 */
#define PRFM0B0 0 /* PSC 0 Fault Mode bit0 */
/* PSC 0 Input Capture Registers */
#define PICR0 _SFR_MEM16(0xDE)
#define PICR0L _SFR_MEM8(0xDE)
#define PICR0H _SFR_MEM8(0xDF)
#define PCST0 7 /* PSC Capture Software Trig bit */
/* not implemented on AT90PWM2/AT90PWM3 */
/* PSC 1 Synchro and Output Configuration */
#define PSOC1 _SFR_MEM8(0xE0)
/* PSOC1 */
#define PSYNC11 5 /* Synchronization Out for ADC Selection bit1 */
#define PSYNC10 4 /* Synchronization Out for ADC Selection bit0 */
#define POEN1B 2 /* PSC 1 OUT Part B Output Enable */
#define POEN1A 0 /* PSC 1 OUT Part A Output Enable */
/* Output Compare SA Registers */
#define OCR1SA _SFR_MEM16(0xE2)
#define OCR1SAL _SFR_MEM8(0xE2)
#define OCR1SAH _SFR_MEM8(0xE3)
/* Output Compare RA Registers */
#define OCR1RA _SFR_MEM16(0xE4)
#define OCR1RAL _SFR_MEM8(0xE4)
#define OCR1RAH _SFR_MEM8(0xE5)
/* Output Compare SB Registers */
#define OCR1SB _SFR_MEM16(0xE6)
#define OCR1SBL _SFR_MEM8(0xE6)
#define OCR1SBH _SFR_MEM8(0xE7)
/* Output Compare RB Registers */
#define OCR1RB _SFR_MEM16(0xE8)
#define OCR1RBL _SFR_MEM8(0xE8)
#define OCR1RBH _SFR_MEM8(0xE9)
/* PSC 1 Configuration Register */
#define PCNF1 _SFR_MEM8(0xEA)
/* PCNF1 */
#define PFIFTY1 7 /* PSC 1 Fifty */
#define PALOCK1 6 /* PSC 1 Autolock */
#define PLOCK1 5 /* PSC 1 Lock */
#define PMODE11 4 /* PSC 1 Mode bit1 */
#define PMODE10 3 /* PSC 1 Mode bit0 */
#define POP1 2 /* PSC 1 Output Polarity */
#define PCLKSEL1 1 /* PSC 1 Input Clock Select */
/* PSC 1 Control Register */
#define PCTL1 _SFR_MEM8(0xEB)
/* PCTL1 */
#define PPRE11 7 /* PSC 1 Prescaler Select bit1 */
#define PPRE10 6 /* PSC 1 Prescaler Select bit0 */
#define PBFM1 5 /* Balance Flank Width Modulation */
#define PAOC1B 4 /* PSC 1 Asynchronous Output Control B */
#define PAOC1A 3 /* PSC 1 Asynchronous Output Control A */
#define PARUN1 2 /* PSC 1 Autorun */
#define PCCYC1 1 /* PSC 1 Complete Cycle */
#define PRUN1 0 /* PSC 1 Run */
/* PSC 1 Input A Control Register */
#define PFRC1A _SFR_MEM8(0xEC)
/* PFRC1A */
#define PCAE1A 7 /* PSC 1 Capture Enable Input Part A */
#define PISEL1A 6 /* PSC 1 Input Select for Part A */
#define PELEV1A 5 /* PSC 1 Edge Level Selector of Input Part A */
#define PFLTE1A 4 /* PSC 1 Filter Enable on Input Part A */
#define PRFM1A3 3 /* PSC 1 Fault Mode bit3 */
#define PRFM1A2 2 /* PSC 1 Fault Mode bit2 */
#define PRFM1A1 1 /* PSC 1 Fault Mode bit1 */
#define PRFM1A0 0 /* PSC 1 Fault Mode bit0 */
/* PSC 1 Input B Control Register */
#define PFRC1B _SFR_MEM8(0xED)
/* PFRC1B */
#define PCAE1B 7 /* PSC 1 Capture Enable Input Part B */
#define PISEL1B 6 /* PSC 1 Input Select for Part B */
#define PELEV1B 5 /* PSC 1 Edge Level Selector of Input Part B */
#define PFLTE1B 4 /* PSC 1 Filter Enable on Input Part B */
#define PRFM1B3 3 /* PSC 1 Fault Mode bit3 */
#define PRFM1B2 2 /* PSC 1 Fault Mode bit2 */
#define PRFM1B1 1 /* PSC 1 Fault Mode bit1 */
#define PRFM1B0 0 /* PSC 1 Fault Mode bit0 */
/* PSC 1 Input Capture Registers */
#define PICR1 _SFR_MEM16(0xEE)
#define PICR1L _SFR_MEM8(0xEE)
#define PICR1H _SFR_MEM8(0xEF)
#define PCST1 7 /* PSC Capture Software Trig bit */
/* not implemented on AT90PWM2/AT90PWM3 */
/* PSC 2 Synchro and Output Configuration */
#define PSOC2 _SFR_MEM8(0xF0)
/* PSOC2 */
#define POS23 7 /* PSCOUT23 Selection */
#define POS22 6 /* PSCOUT22 Selection */
#define PSYNC21 5 /* Synchronization Out for ADC Selection bit1 */
#define PSYNC20 4 /* Synchronization Out for ADC Selection bit0 */
#define POEN2D 3 /* PSCOUT23 Output Enable */
#define POEN2B 2 /* PSC 2 OUT Part B Output Enable */
#define POEN2C 1 /* PSCOUT22 Output Enable */
#define POEN2A 0 /* PSC 2 OUT Part A Output Enable */
/* PSC 2 Output Matrix */
#define POM2 _SFR_MEM8(0xF1)
/* POM2 */
#define POMV2B3 7 /* Output Matrix Output B Ramp 3 */
#define POMV2B2 6 /* Output Matrix Output B Ramp 2 */
#define POMV2B1 5 /* Output Matrix Output B Ramp 1 */
#define POMV2B0 4 /* Output Matrix Output B Ramp 0 */
#define POMV2A3 3 /* Output Matrix Output A Ramp 3 */
#define POMV2A2 2 /* Output Matrix Output A Ramp 2 */
#define POMV2A1 1 /* Output Matrix Output A Ramp 1 */
#define POMV2A0 0 /* Output Matrix Output A Ramp 0 */
/* Output Compare SA Registers */
#define OCR2SA _SFR_MEM16(0xF2)
#define OCR2SAL _SFR_MEM8(0xF2)
#define OCR2SAH _SFR_MEM8(0xF3)
/* Output Compare RA Registers */
#define OCR2RA _SFR_MEM16(0xF4)
#define OCR2RAL _SFR_MEM8(0xF4)
#define OCR2RAH _SFR_MEM8(0xF5)
/* Output Compare SB Registers */
#define OCR2SB _SFR_MEM16(0xF6)
#define OCR2SBL _SFR_MEM8(0xF6)
#define OCR2SBH _SFR_MEM8(0xF7)
/* Output Compare RB Registers */
#define OCR2RB _SFR_MEM16(0xF8)
#define OCR2RBL _SFR_MEM8(0xF8)
#define OCR2RBH _SFR_MEM8(0xF9)
/* PSC 2 Configuration Register */
#define PCNF2 _SFR_MEM8(0xFA)
/* PCNF2 */
#define PFIFTY2 7 /* PSC 2 Fifty */
#define PALOCK2 6 /* PSC 2 Autolock */
#define PLOCK2 5 /* PSC 2 Lock */
#define PMODE21 4 /* PSC 2 Mode bit1 */
#define PMODE20 3 /* PSC 2 Mode bit0 */
#define POP2 2 /* PSC 2 Output Polarity */
#define PCLKSEL2 1 /* PSC 2 Input Clock Select */
#define POME2 0 /* PSC 2 Output Matrix Enable */
/* PSC 2 Control Register */
#define PCTL2 _SFR_MEM8(0xFB)
/* PCTL2 */
#define PPRE21 7 /* PSC 2 Prescaler Select bit1 */
#define PPRE20 6 /* PSC 2 Prescaler Select bit0 */
#define PBFM2 5 /* Balance Flank Width Modulation */
#define PAOC2B 4 /* PSC 2 Asynchronous Output Control B */
#define PAOC2A 3 /* PSC 2 Asynchronous Output Control A */
#define PARUN2 2 /* PSC 2 Autorun */
#define PCCYC2 1 /* PSC 2 Complete Cycle */
#define PRUN2 0 /* PSC 2 Run */
/* PSC 2 Input A Control Register */
#define PFRC2A _SFR_MEM8(0xFC)
/* PFRC2A */
#define PCAE2A 7 /* PSC 2 Capture Enable Input Part A */
#define PISEL2A 6 /* PSC 2 Input Select for Part A */
#define PELEV2A 5 /* PSC 2 Edge Level Selector of Input Part A */
#define PFLTE2A 4 /* PSC 2 Filter Enable on Input Part A */
#define PRFM2A3 3 /* PSC 2 Fault Mode bit3 */
#define PRFM2A2 2 /* PSC 2 Fault Mode bit2 */
#define PRFM2A1 1 /* PSC 2 Fault Mode bit1 */
#define PRFM2A0 0 /* PSC 2 Fault Mode bit0 */
/* PSC 2 Input B Control Register */
#define PFRC2B _SFR_MEM8(0xFD)
/* PFRC2B */
#define PCAE2B 7 /* PSC 2 Capture Enable Input Part B */
#define PISEL2B 6 /* PSC 2 Input Select for Part B */
#define PELEV2B 5 /* PSC 2 Edge Level Selector of Input Part B */
#define PFLTE2B 4 /* PSC 2 Filter Enable on Input Part B */
#define PRFM2B3 3 /* PSC 2 Fault Mode bit3 */
#define PRFM2B2 2 /* PSC 2 Fault Mode bit2 */
#define PRFM2B1 1 /* PSC 2 Fault Mode bit1 */
#define PRFM2B0 0 /* PSC 2 Fault Mode bit0 */
/* PSC 2 Input Capture Registers */
#define PICR2 _SFR_MEM16(0xFE)
#define PICR2L _SFR_MEM8(0xFE)
#define PICR2H _SFR_MEM8(0xFF)
#define PCST2 7 /* PSC Capture Software Trig bit */
/* not implemented on AT90PWM2/AT90PWM3 */
/* Interrupt vectors */
/* PSC2 Capture Event */
#define PSC2_CAPT_vect _VECTOR(1)
#define SIG_PSC2_CAPTURE _VECTOR(1)
/* PSC2 End Cycle */
#define PSC2_EC_vect _VECTOR(2)
#define SIG_PSC2_END_CYCLE _VECTOR(2)
/* PSC1 Capture Event */
#define PSC1_CAPT_vect _VECTOR(3)
#define SIG_PSC1_CAPTURE _VECTOR(3)
/* PSC1 End Cycle */
#define PSC1_EC_vect _VECTOR(4)
#define SIG_PSC1_END_CYCLE _VECTOR(4)
/* PSC0 Capture Event */
#define PSC0_CAPT_vect _VECTOR(5)
#define SIG_PSC0_CAPTURE _VECTOR(5)
/* PSC0 End Cycle */
#define PSC0_EC_vect _VECTOR(6)
#define SIG_PSC0_END_CYCLE _VECTOR(6)
/* Analog Comparator 0 */
#define ANALOG_COMP_0_vect _VECTOR(7)
#define SIG_COMPARATOR0 _VECTOR(7)
/* Analog Comparator 1 */
#define ANALOG_COMP_1_vect _VECTOR(8)
#define SIG_COMPARATOR1 _VECTOR(8)
/* Analog Comparator 2 */
#define ANALOG_COMP_2_vect _VECTOR(9)
#define SIG_COMPARATOR2 _VECTOR(9)
/* External Interrupt Request 0 */
#define INT0_vect _VECTOR(10)
#define SIG_INTERRUPT0 _VECTOR(10)
/* Timer/Counter1 Capture Event */
#define TIMER1_CAPT_vect _VECTOR(11)
#define SIG_INPUT_CAPTURE1 _VECTOR(11)
/* Timer/Counter1 Compare Match A */
#define TIMER1_COMPA_vect _VECTOR(12)
#define SIG_OUTPUT_COMPARE1A _VECTOR(12)
#define SIG_OUTPUT_COMPARE1_A _VECTOR(12)
/* Timer/Counter Compare Match B */
#define TIMER1_COMPB_vect _VECTOR(13)
#define SIG_OUTPUT_COMPARE1B _VECTOR(13)
#define SIG_OUTPUT_COMPARE1_B _VECTOR(13)
/* Timer/Counter1 Overflow */
#define TIMER1_OVF_vect _VECTOR(15)
#define SIG_OVERFLOW1 _VECTOR(15)
/* Timer/Counter0 Compare Match A */
#define TIMER0_COMP_A_vect _VECTOR(16)
#define SIG_OUTPUT_COMPARE0A _VECTOR(16)
#define SIG_OUTPUT_COMPARE0_A _VECTOR(16)
/* Timer/Counter0 Overflow */
#define TIMER0_OVF_vect _VECTOR(17)
#define SIG_OVERFLOW0 _VECTOR(17)
/* ADC Conversion Complete */
#define ADC_vect _VECTOR(18)
#define SIG_ADC _VECTOR(18)
/* External Interrupt Request 1 */
#define INT1_vect _VECTOR(19)
#define SIG_INTERRUPT1 _VECTOR(19)
/* SPI Serial Transfer Complete */
#define SPI_STC_vect _VECTOR(20)
#define SIG_SPI _VECTOR(20)
/* USART, Rx Complete */
#define USART_RX_vect _VECTOR(21)
#define SIG_USART_RECV _VECTOR(21)
#define SIG_UART_RECV _VECTOR(21)
/* USART Data Register Empty */
#define USART_UDRE_vect _VECTOR(22)
#define SIG_USART_DATA _VECTOR(22)
#define SIG_UART_DATA _VECTOR(22)
/* USART, Tx Complete */
#define USART_TX_vect _VECTOR(23)
#define SIG_USART_TRANS _VECTOR(23)
#define SIG_UART_TRANS _VECTOR(23)
/* External Interrupt Request 2 */
#define INT2_vect _VECTOR(24)
#define SIG_INTERRUPT2 _VECTOR(24)
/* Watchdog Timeout Interrupt */
#define WDT_vect _VECTOR(25)
#define SIG_WDT _VECTOR(25)
#define SIG_WATCHDOG_TIMEOUT _VECTOR(25)
/* EEPROM Ready */
#define EE_READY_vect _VECTOR(26)
#define SIG_EEPROM_READY _VECTOR(26)
/* Timer Counter 0 Compare Match B */
#define TIMER0_COMPB_vect _VECTOR(27)
#define SIG_OUTPUT_COMPARE0B _VECTOR(27)
#define SIG_OUTPUT_COMPARE0_B _VECTOR(27)
/* External Interrupt Request 3 */
#define INT3_vect _VECTOR(28)
#define SIG_INTERRUPT3 _VECTOR(28)
/* Store Program Memory Read */
#define SPM_READY_vect _VECTOR(31)
#define SIG_SPM_READY _VECTOR(31)
#define _VECTORS_SIZE 64
/* Constants */
#define SPM_PAGESIZE 64
#define RAMEND 0x02FF
#define XRAMEND RAMEND
#define E2END 0x01FF
#define E2PAGESIZE 4
#define FLASHEND 0x0FFF
/* Fuse Information */
#define FUSE_MEMORY_SIZE 3
/* Low Fuse Byte */
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator output option */
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
/* High Fuse Byte */
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
#define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External Reset Diasble */
#define HFUSE_DEFAULT (FUSE_SPIEN)
/* Extended Fuse Byte */
#define FUSE_BOOTRST (unsigned char)~_BV(0)
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
#define FUSE_PSCRV (unsigned char)~_BV(4)
#define FUSE_PSC0RB (unsigned char)~_BV(5)
#define FUSE_PSC1RB (unsigned char)~_BV(6)
#define FUSE_PSC2RB (unsigned char)~_BV(7)
#define EFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1)
/* Lock Bits */
#define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST
#endif /* _AVR_IO90PWMX_H_ */
|