/usr/share/sdcc/include/pic/pic16f684.h is in sdcc-libraries 2.9.0-5.
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 | //
// Register Declarations for Microchip 16F684 Processor
//
//
// This header file was automatically generated by:
//
// inc2h.pl V4783
//
// Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
//
// SDCC is licensed under the GNU Public license (GPL) v2. Note that
// this license covers the code to the compiler and other executables,
// but explicitly does not cover any code or objects generated by sdcc.
// We have not yet decided on a license for the run time libraries, but
// it will not put any requirements on code linked against it. See:
//
// http://www.gnu.org/copyleft/gpl/html
//
// See http://sdcc.sourceforge.net/ for the latest information on sdcc.
//
//
#ifndef P16F684_H
#define P16F684_H
//
// Register addresses.
//
#define INDF_ADDR 0x0000
#define TMR0_ADDR 0x0001
#define PCL_ADDR 0x0002
#define STATUS_ADDR 0x0003
#define FSR_ADDR 0x0004
#define PORTA_ADDR 0x0005
#define PORTC_ADDR 0x0007
#define PCLATH_ADDR 0x000A
#define INTCON_ADDR 0x000B
#define PIR1_ADDR 0x000C
#define TMR1L_ADDR 0x000E
#define TMR1H_ADDR 0x000F
#define T1CON_ADDR 0x0010
#define TMR2_ADDR 0x0011
#define T2CON_ADDR 0x0012
#define CCPR1L_ADDR 0x0013
#define CCPR1H_ADDR 0x0014
#define CCP1CON_ADDR 0x0015
#define PWM1CON_ADDR 0x0016
#define ECCPAS_ADDR 0x0017
#define WDTCON_ADDR 0x0018
#define CMCON0_ADDR 0x0019
#define CMCON1_ADDR 0x001A
#define ADRESH_ADDR 0x001E
#define ADCON0_ADDR 0x001F
#define OPTION_REG_ADDR 0x0081
#define TRISA_ADDR 0x0085
#define TRISC_ADDR 0x0087
#define PIE1_ADDR 0x008C
#define PCON_ADDR 0x008E
#define OSCCON_ADDR 0x008F
#define OSCTUNE_ADDR 0x0090
#define ANSEL_ADDR 0x0091
#define PR2_ADDR 0x0092
#define WPU_ADDR 0x0095
#define WPUA_ADDR 0x0095
#define IOC_ADDR 0x0096
#define IOCA_ADDR 0x0096
#define VRCON_ADDR 0x0099
#define EEDAT_ADDR 0x009A
#define EEDATA_ADDR 0x009A
#define EEADR_ADDR 0x009B
#define EECON1_ADDR 0x009C
#define EECON2_ADDR 0x009D
#define ADRESL_ADDR 0x009E
#define ADCON1_ADDR 0x009F
//
// Memory organization.
//
// LIST
// P16F684.INC Standard Header File, Version 1.03 Microchip Technology, Inc.
// NOLIST
// This header file defines configurations, registers, and other useful bits of
// information for the PIC16F684 microcontroller. These names are taken to match
// the data sheets as closely as possible.
// Note that the processor must be selected before this file is
// included. The processor may be selected the following ways:
// 1. Command line switch:
// C:\ MPASM MYFILE.ASM /PIC16F684
// 2. LIST directive in the source file
// LIST P=PIC16F684
// 3. Processor Type entry in the MPASM full-screen interface
//==========================================================================
//
// Revision History
//
//==========================================================================
//1.00 03/20/03 Original
//1.01 08/04/03 Updated CMCON1 address
//1.02 08/05/03 Updated names to match datasheet
//1.03 08/11/03 Updated ULPWUE bit name to match datasheet
//==========================================================================
//
// Verify Processor
//
//==========================================================================
// IFNDEF __16F684
// MESSG "Processor-header file mismatch. Verify selected processor."
// ENDIF
//==========================================================================
//
// Register Definitions
//
//==========================================================================
#define W 0x0000
#define F 0x0001
//----- Register Files------------------------------------------------------
extern __sfr __at (INDF_ADDR) INDF;
extern __sfr __at (TMR0_ADDR) TMR0;
extern __sfr __at (PCL_ADDR) PCL;
extern __sfr __at (STATUS_ADDR) STATUS;
extern __sfr __at (FSR_ADDR) FSR;
extern __sfr __at (PORTA_ADDR) PORTA;
extern __sfr __at (PORTC_ADDR) PORTC;
extern __sfr __at (PCLATH_ADDR) PCLATH;
extern __sfr __at (INTCON_ADDR) INTCON;
extern __sfr __at (PIR1_ADDR) PIR1;
extern __sfr __at (TMR1L_ADDR) TMR1L;
extern __sfr __at (TMR1H_ADDR) TMR1H;
extern __sfr __at (T1CON_ADDR) T1CON;
extern __sfr __at (TMR2_ADDR) TMR2;
extern __sfr __at (T2CON_ADDR) T2CON;
extern __sfr __at (CCPR1L_ADDR) CCPR1L;
extern __sfr __at (CCPR1H_ADDR) CCPR1H;
extern __sfr __at (CCP1CON_ADDR) CCP1CON;
extern __sfr __at (PWM1CON_ADDR) PWM1CON;
extern __sfr __at (ECCPAS_ADDR) ECCPAS;
extern __sfr __at (WDTCON_ADDR) WDTCON;
extern __sfr __at (CMCON0_ADDR) CMCON0;
extern __sfr __at (CMCON1_ADDR) CMCON1;
extern __sfr __at (ADRESH_ADDR) ADRESH;
extern __sfr __at (ADCON0_ADDR) ADCON0;
extern __sfr __at (OPTION_REG_ADDR) OPTION_REG;
extern __sfr __at (TRISA_ADDR) TRISA;
extern __sfr __at (TRISC_ADDR) TRISC;
extern __sfr __at (PIE1_ADDR) PIE1;
extern __sfr __at (PCON_ADDR) PCON;
extern __sfr __at (OSCCON_ADDR) OSCCON;
extern __sfr __at (OSCTUNE_ADDR) OSCTUNE;
extern __sfr __at (ANSEL_ADDR) ANSEL;
extern __sfr __at (PR2_ADDR) PR2;
extern __sfr __at (WPU_ADDR) WPU;
extern __sfr __at (WPUA_ADDR) WPUA;
extern __sfr __at (IOC_ADDR) IOC;
extern __sfr __at (IOCA_ADDR) IOCA;
extern __sfr __at (VRCON_ADDR) VRCON;
extern __sfr __at (EEDAT_ADDR) EEDAT;
extern __sfr __at (EEDATA_ADDR) EEDATA;
extern __sfr __at (EEADR_ADDR) EEADR;
extern __sfr __at (EECON1_ADDR) EECON1;
extern __sfr __at (EECON2_ADDR) EECON2;
extern __sfr __at (ADRESL_ADDR) ADRESL;
extern __sfr __at (ADCON1_ADDR) ADCON1;
//----- STATUS Bits --------------------------------------------------------
//----- INTCON Bits --------------------------------------------------------
//----- PIR1 Bits ----------------------------------------------------------
//----- T1CON Bits ---------------------------------------------------------
//----- T2CON Bits ---------------------------------------------------------
//----- CCP1CON Bits -------------------------------------------------------
//----- PWM1CON Bits -------------------------------------------------------
//----- ECCPAS Bits --------------------------------------------------------
//----- WDTCON Bits --------------------------------------------------------
//----- COMCON0 Bits -------------------------------------------------------
//----- COMCON1 Bits -------------------------------------------------------
//----- ADCON0 Bits --------------------------------------------------------
//----- OPTION Bits --------------------------------------------------------
//----- PIE1 Bits ----------------------------------------------------------
//----- PCON Bits ----------------------------------------------------------
//----- OSCCON Bits --------------------------------------------------------
//----- OSCTUNE Bits -------------------------------------------------------
//----- ANSEL --------------------------------------------------------------
//----- IOC --------------------------------------------------------------
//----- IOCA --------------------------------------------------------------
//----- VRCON Bits ---------------------------------------------------------
//----- EECON1 -------------------------------------------------------------
//----- ADCON1 -------------------------------------------------------------
//==========================================================================
//
// RAM Definition
//
//==========================================================================
// __MAXRAM H'FF'
// __BADRAM H'06', H'08'-H'09', H'0D', H'1B'-H'1D'
// __BADRAM H'86', H'88'-H'89', H'8D', H'93'-H'94', H'97'-H'98', H'C0'-H'EF'
//==========================================================================
//
// Configuration Bits
//
//==========================================================================
#define _FCMEN_ON 0x3FFF
#define _FCMEN_OFF 0x37FF
#define _IESO_ON 0x3FFF
#define _IESO_OFF 0x3BFF
#define _BOD_ON 0x3FFF
#define _BOD_NSLEEP 0x3EFF
#define _BOD_SBODEN 0x3DFF
#define _BOD_OFF 0x3CFF
#define _CPD_ON 0x3F7F
#define _CPD_OFF 0x3FFF
#define _CP_ON 0x3FBF
#define _CP_OFF 0x3FFF
#define _MCLRE_ON 0x3FFF
#define _MCLRE_OFF 0x3FDF
#define _PWRTE_OFF 0x3FFF
#define _PWRTE_ON 0x3FEF
#define _WDT_ON 0x3FFF
#define _WDT_OFF 0x3FF7
#define _LP_OSC 0x3FF8
#define _XT_OSC 0x3FF9
#define _HS_OSC 0x3FFA
#define _EC_OSC 0x3FFB
#define _INTRC_OSC_NOCLKOUT 0x3FFC
#define _INTRC_OSC_CLKOUT 0x3FFD
#define _EXTRC_OSC_NOCLKOUT 0x3FFE
#define _EXTRC_OSC_CLKOUT 0x3FFF
#define _INTOSCIO 0x3FFC
#define _INTOSC 0x3FFD
#define _EXTRCIO 0x3FFE
#define _EXTRC 0x3FFF
// LIST
// ----- ADCON0 bits --------------------
typedef union {
struct {
unsigned char ADON:1;
unsigned char GO:1;
unsigned char CHS0:1;
unsigned char CHS1:1;
unsigned char CHS2:1;
unsigned char :1;
unsigned char VCFG:1;
unsigned char ADFM:1;
};
struct {
unsigned char :1;
unsigned char NOT_DONE:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
struct {
unsigned char :1;
unsigned char GO_DONE:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __ADCON0_bits_t;
extern volatile __ADCON0_bits_t __at(ADCON0_ADDR) ADCON0_bits;
#ifndef NO_BIT_DEFINES
#define ADON ADCON0_bits.ADON
#define GO ADCON0_bits.GO
#define NOT_DONE ADCON0_bits.NOT_DONE
#define GO_DONE ADCON0_bits.GO_DONE
#define CHS0 ADCON0_bits.CHS0
#define CHS1 ADCON0_bits.CHS1
#define CHS2 ADCON0_bits.CHS2
#define VCFG ADCON0_bits.VCFG
#define ADFM ADCON0_bits.ADFM
#endif /* NO_BIT_DEFINES */
// ----- ADCON1 bits --------------------
typedef union {
struct {
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char ADCS0:1;
unsigned char ADCS1:1;
unsigned char ADCS2:1;
unsigned char :1;
};
} __ADCON1_bits_t;
extern volatile __ADCON1_bits_t __at(ADCON1_ADDR) ADCON1_bits;
#ifndef NO_BIT_DEFINES
#define ADCS0 ADCON1_bits.ADCS0
#define ADCS1 ADCON1_bits.ADCS1
#define ADCS2 ADCON1_bits.ADCS2
#endif /* NO_BIT_DEFINES */
// ----- ANSEL bits --------------------
typedef union {
struct {
unsigned char ANS0:1;
unsigned char ANS1:1;
unsigned char ANS2:1;
unsigned char ANS3:1;
unsigned char ANS4:1;
unsigned char ANS5:1;
unsigned char ANS6:1;
unsigned char ANS7:1;
};
} __ANSEL_bits_t;
extern volatile __ANSEL_bits_t __at(ANSEL_ADDR) ANSEL_bits;
#ifndef NO_BIT_DEFINES
#define ANS0 ANSEL_bits.ANS0
#define ANS1 ANSEL_bits.ANS1
#define ANS2 ANSEL_bits.ANS2
#define ANS3 ANSEL_bits.ANS3
#define ANS4 ANSEL_bits.ANS4
#define ANS5 ANSEL_bits.ANS5
#define ANS6 ANSEL_bits.ANS6
#define ANS7 ANSEL_bits.ANS7
#endif /* NO_BIT_DEFINES */
// ----- CCP1CON bits --------------------
typedef union {
struct {
unsigned char CCP1M0:1;
unsigned char CCP1M1:1;
unsigned char CCP1M2:1;
unsigned char CCP1M3:1;
unsigned char DC1B0:1;
unsigned char DC1B1:1;
unsigned char P1M0:1;
unsigned char P1M1:1;
};
} __CCP1CON_bits_t;
extern volatile __CCP1CON_bits_t __at(CCP1CON_ADDR) CCP1CON_bits;
#ifndef NO_BIT_DEFINES
#define CCP1M0 CCP1CON_bits.CCP1M0
#define CCP1M1 CCP1CON_bits.CCP1M1
#define CCP1M2 CCP1CON_bits.CCP1M2
#define CCP1M3 CCP1CON_bits.CCP1M3
#define DC1B0 CCP1CON_bits.DC1B0
#define DC1B1 CCP1CON_bits.DC1B1
#define P1M0 CCP1CON_bits.P1M0
#define P1M1 CCP1CON_bits.P1M1
#endif /* NO_BIT_DEFINES */
// ----- CMCON0 bits --------------------
typedef union {
struct {
unsigned char CM0:1;
unsigned char CM1:1;
unsigned char CM2:1;
unsigned char CIS:1;
unsigned char C1INV:1;
unsigned char C2INV:1;
unsigned char C1OUT:1;
unsigned char C2OUT:1;
};
} __CMCON0_bits_t;
extern volatile __CMCON0_bits_t __at(CMCON0_ADDR) CMCON0_bits;
#ifndef NO_BIT_DEFINES
#define CM0 CMCON0_bits.CM0
#define CM1 CMCON0_bits.CM1
#define CM2 CMCON0_bits.CM2
#define CIS CMCON0_bits.CIS
#define C1INV CMCON0_bits.C1INV
#define C2INV CMCON0_bits.C2INV
#define C1OUT CMCON0_bits.C1OUT
#define C2OUT CMCON0_bits.C2OUT
#endif /* NO_BIT_DEFINES */
// ----- CMCON1 bits --------------------
typedef union {
struct {
unsigned char C2SYNC:1;
unsigned char T1GSS:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __CMCON1_bits_t;
extern volatile __CMCON1_bits_t __at(CMCON1_ADDR) CMCON1_bits;
#ifndef NO_BIT_DEFINES
#define C2SYNC CMCON1_bits.C2SYNC
#define T1GSS CMCON1_bits.T1GSS
#endif /* NO_BIT_DEFINES */
// ----- ECCPAS bits --------------------
typedef union {
struct {
unsigned char PSSBD0:1;
unsigned char PSSBD1:1;
unsigned char PSSAC0:1;
unsigned char PSSAC1:1;
unsigned char ECCPAS0:1;
unsigned char ECCPAS1:1;
unsigned char ECCPAS2:1;
unsigned char ECCPASE:1;
};
} __ECCPAS_bits_t;
extern volatile __ECCPAS_bits_t __at(ECCPAS_ADDR) ECCPAS_bits;
#ifndef NO_BIT_DEFINES
#define PSSBD0 ECCPAS_bits.PSSBD0
#define PSSBD1 ECCPAS_bits.PSSBD1
#define PSSAC0 ECCPAS_bits.PSSAC0
#define PSSAC1 ECCPAS_bits.PSSAC1
#define ECCPAS0 ECCPAS_bits.ECCPAS0
#define ECCPAS1 ECCPAS_bits.ECCPAS1
#define ECCPAS2 ECCPAS_bits.ECCPAS2
#define ECCPASE ECCPAS_bits.ECCPASE
#endif /* NO_BIT_DEFINES */
// ----- EECON1 bits --------------------
typedef union {
struct {
unsigned char RD:1;
unsigned char WR:1;
unsigned char WREN:1;
unsigned char WRERR:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __EECON1_bits_t;
extern volatile __EECON1_bits_t __at(EECON1_ADDR) EECON1_bits;
#ifndef NO_BIT_DEFINES
#define RD EECON1_bits.RD
#define WR EECON1_bits.WR
#define WREN EECON1_bits.WREN
#define WRERR EECON1_bits.WRERR
#endif /* NO_BIT_DEFINES */
// ----- INTCON bits --------------------
typedef union {
struct {
unsigned char RAIF:1;
unsigned char INTF:1;
unsigned char T0IF:1;
unsigned char RAIE:1;
unsigned char INTE:1;
unsigned char T0IE:1;
unsigned char PEIE:1;
unsigned char GIE:1;
};
} __INTCON_bits_t;
extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
#ifndef NO_BIT_DEFINES
#define RAIF INTCON_bits.RAIF
#define INTF INTCON_bits.INTF
#define T0IF INTCON_bits.T0IF
#define RAIE INTCON_bits.RAIE
#define INTE INTCON_bits.INTE
#define T0IE INTCON_bits.T0IE
#define PEIE INTCON_bits.PEIE
#define GIE INTCON_bits.GIE
#endif /* NO_BIT_DEFINES */
// ----- IOC bits --------------------
typedef union {
struct {
unsigned char IOC0:1;
unsigned char IOC1:1;
unsigned char IOC2:1;
unsigned char IOC3:1;
unsigned char IOC4:1;
unsigned char IOC5:1;
unsigned char :1;
unsigned char :1;
};
} __IOC_bits_t;
extern volatile __IOC_bits_t __at(IOC_ADDR) IOC_bits;
#ifndef NO_BIT_DEFINES
#define IOC0 IOC_bits.IOC0
#define IOC1 IOC_bits.IOC1
#define IOC2 IOC_bits.IOC2
#define IOC3 IOC_bits.IOC3
#define IOC4 IOC_bits.IOC4
#define IOC5 IOC_bits.IOC5
#endif /* NO_BIT_DEFINES */
// ----- IOCA bits --------------------
typedef union {
struct {
unsigned char IOCA0:1;
unsigned char IOCA1:1;
unsigned char IOCA2:1;
unsigned char IOCA3:1;
unsigned char IOCA4:1;
unsigned char IOCA5:1;
unsigned char :1;
unsigned char :1;
};
} __IOCA_bits_t;
extern volatile __IOCA_bits_t __at(IOCA_ADDR) IOCA_bits;
#ifndef NO_BIT_DEFINES
#define IOCA0 IOCA_bits.IOCA0
#define IOCA1 IOCA_bits.IOCA1
#define IOCA2 IOCA_bits.IOCA2
#define IOCA3 IOCA_bits.IOCA3
#define IOCA4 IOCA_bits.IOCA4
#define IOCA5 IOCA_bits.IOCA5
#endif /* NO_BIT_DEFINES */
// ----- OPTION_REG bits --------------------
typedef union {
struct {
unsigned char PS0:1;
unsigned char PS1:1;
unsigned char PS2:1;
unsigned char PSA:1;
unsigned char T0SE:1;
unsigned char T0CS:1;
unsigned char INTEDG:1;
unsigned char NOT_RAPU:1;
};
} __OPTION_REG_bits_t;
extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
#ifndef NO_BIT_DEFINES
#define PS0 OPTION_REG_bits.PS0
#define PS1 OPTION_REG_bits.PS1
#define PS2 OPTION_REG_bits.PS2
#define PSA OPTION_REG_bits.PSA
#define T0SE OPTION_REG_bits.T0SE
#define T0CS OPTION_REG_bits.T0CS
#define INTEDG OPTION_REG_bits.INTEDG
#define NOT_RAPU OPTION_REG_bits.NOT_RAPU
#endif /* NO_BIT_DEFINES */
// ----- OSCCON bits --------------------
typedef union {
struct {
unsigned char SCS:1;
unsigned char LTS:1;
unsigned char HTS:1;
unsigned char OSTS:1;
unsigned char IRCF0:1;
unsigned char IRCF1:1;
unsigned char IRCF2:1;
unsigned char :1;
};
} __OSCCON_bits_t;
extern volatile __OSCCON_bits_t __at(OSCCON_ADDR) OSCCON_bits;
#ifndef NO_BIT_DEFINES
#define SCS OSCCON_bits.SCS
#define LTS OSCCON_bits.LTS
#define HTS OSCCON_bits.HTS
#define OSTS OSCCON_bits.OSTS
#define IRCF0 OSCCON_bits.IRCF0
#define IRCF1 OSCCON_bits.IRCF1
#define IRCF2 OSCCON_bits.IRCF2
#endif /* NO_BIT_DEFINES */
// ----- OSCTUNE bits --------------------
typedef union {
struct {
unsigned char TUN0:1;
unsigned char TUN1:1;
unsigned char TUN2:1;
unsigned char TUN3:1;
unsigned char TUN4:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __OSCTUNE_bits_t;
extern volatile __OSCTUNE_bits_t __at(OSCTUNE_ADDR) OSCTUNE_bits;
#ifndef NO_BIT_DEFINES
#define TUN0 OSCTUNE_bits.TUN0
#define TUN1 OSCTUNE_bits.TUN1
#define TUN2 OSCTUNE_bits.TUN2
#define TUN3 OSCTUNE_bits.TUN3
#define TUN4 OSCTUNE_bits.TUN4
#endif /* NO_BIT_DEFINES */
// ----- PCON bits --------------------
typedef union {
struct {
unsigned char NOT_BOD:1;
unsigned char NOT_POR:1;
unsigned char :1;
unsigned char :1;
unsigned char SBODEN:1;
unsigned char ULPWUE:1;
unsigned char :1;
unsigned char :1;
};
} __PCON_bits_t;
extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits;
#ifndef NO_BIT_DEFINES
#define NOT_BOD PCON_bits.NOT_BOD
#define NOT_POR PCON_bits.NOT_POR
#define SBODEN PCON_bits.SBODEN
#define ULPWUE PCON_bits.ULPWUE
#endif /* NO_BIT_DEFINES */
// ----- PIE1 bits --------------------
typedef union {
struct {
unsigned char T1IE:1;
unsigned char T2IE:1;
unsigned char OSFIE:1;
unsigned char C1IE:1;
unsigned char C2IE:1;
unsigned char CCP1IE:1;
unsigned char ADIE:1;
unsigned char EEIE:1;
};
struct {
unsigned char TMR1IE:1;
unsigned char TMR2IE:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __PIE1_bits_t;
extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits;
#ifndef NO_BIT_DEFINES
#define T1IE PIE1_bits.T1IE
#define TMR1IE PIE1_bits.TMR1IE
#define T2IE PIE1_bits.T2IE
#define TMR2IE PIE1_bits.TMR2IE
#define OSFIE PIE1_bits.OSFIE
#define C1IE PIE1_bits.C1IE
#define C2IE PIE1_bits.C2IE
#define CCP1IE PIE1_bits.CCP1IE
#define ADIE PIE1_bits.ADIE
#define EEIE PIE1_bits.EEIE
#endif /* NO_BIT_DEFINES */
// ----- PIR1 bits --------------------
typedef union {
struct {
unsigned char T1IF:1;
unsigned char T2IF:1;
unsigned char OSFIF:1;
unsigned char C1IF:1;
unsigned char C2IF:1;
unsigned char CCP1IF:1;
unsigned char ADIF:1;
unsigned char EEIF:1;
};
struct {
unsigned char TMR1IF:1;
unsigned char TMR2IF:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __PIR1_bits_t;
extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits;
#ifndef NO_BIT_DEFINES
#define T1IF PIR1_bits.T1IF
#define TMR1IF PIR1_bits.TMR1IF
#define T2IF PIR1_bits.T2IF
#define TMR2IF PIR1_bits.TMR2IF
#define OSFIF PIR1_bits.OSFIF
#define C1IF PIR1_bits.C1IF
#define C2IF PIR1_bits.C2IF
#define CCP1IF PIR1_bits.CCP1IF
#define ADIF PIR1_bits.ADIF
#define EEIF PIR1_bits.EEIF
#endif /* NO_BIT_DEFINES */
// ----- PORTA bits --------------------
typedef union {
struct {
unsigned char RA0:1;
unsigned char RA1:1;
unsigned char RA2:1;
unsigned char RA3:1;
unsigned char RA4:1;
unsigned char RA5:1;
unsigned char :1;
unsigned char :1;
};
} __PORTA_bits_t;
extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
#ifndef NO_BIT_DEFINES
#define RA0 PORTA_bits.RA0
#define RA1 PORTA_bits.RA1
#define RA2 PORTA_bits.RA2
#define RA3 PORTA_bits.RA3
#define RA4 PORTA_bits.RA4
#define RA5 PORTA_bits.RA5
#endif /* NO_BIT_DEFINES */
// ----- PORTC bits --------------------
typedef union {
struct {
unsigned char RC0:1;
unsigned char RC1:1;
unsigned char RC2:1;
unsigned char RC3:1;
unsigned char RC4:1;
unsigned char RC5:1;
unsigned char RC6:1;
unsigned char RC7:1;
};
} __PORTC_bits_t;
extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits;
#ifndef NO_BIT_DEFINES
#define RC0 PORTC_bits.RC0
#define RC1 PORTC_bits.RC1
#define RC2 PORTC_bits.RC2
#define RC3 PORTC_bits.RC3
#define RC4 PORTC_bits.RC4
#define RC5 PORTC_bits.RC5
#define RC6 PORTC_bits.RC6
#define RC7 PORTC_bits.RC7
#endif /* NO_BIT_DEFINES */
// ----- PWM1CON bits --------------------
typedef union {
struct {
unsigned char PDC0:1;
unsigned char PDC1:1;
unsigned char PDC2:1;
unsigned char PDC3:1;
unsigned char PDC4:1;
unsigned char PDC5:1;
unsigned char PDC6:1;
unsigned char PRSEN:1;
};
} __PWM1CON_bits_t;
extern volatile __PWM1CON_bits_t __at(PWM1CON_ADDR) PWM1CON_bits;
#ifndef NO_BIT_DEFINES
#define PDC0 PWM1CON_bits.PDC0
#define PDC1 PWM1CON_bits.PDC1
#define PDC2 PWM1CON_bits.PDC2
#define PDC3 PWM1CON_bits.PDC3
#define PDC4 PWM1CON_bits.PDC4
#define PDC5 PWM1CON_bits.PDC5
#define PDC6 PWM1CON_bits.PDC6
#define PRSEN PWM1CON_bits.PRSEN
#endif /* NO_BIT_DEFINES */
// ----- STATUS bits --------------------
typedef union {
struct {
unsigned char C:1;
unsigned char DC:1;
unsigned char Z:1;
unsigned char NOT_PD:1;
unsigned char NOT_TO:1;
unsigned char RP0:1;
unsigned char RP1:1;
unsigned char IRP:1;
};
} __STATUS_bits_t;
extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
#ifndef NO_BIT_DEFINES
#define C STATUS_bits.C
#define DC STATUS_bits.DC
#define Z STATUS_bits.Z
#define NOT_PD STATUS_bits.NOT_PD
#define NOT_TO STATUS_bits.NOT_TO
#define RP0 STATUS_bits.RP0
#define RP1 STATUS_bits.RP1
#define IRP STATUS_bits.IRP
#endif /* NO_BIT_DEFINES */
// ----- T1CON bits --------------------
typedef union {
struct {
unsigned char TMR1ON:1;
unsigned char TMR1CS:1;
unsigned char NOT_T1SYNC:1;
unsigned char T1OSCEN:1;
unsigned char T1CKPS0:1;
unsigned char T1CKPS1:1;
unsigned char TMR1GE:1;
unsigned char T1GINV:1;
};
} __T1CON_bits_t;
extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits;
#ifndef NO_BIT_DEFINES
#define TMR1ON T1CON_bits.TMR1ON
#define TMR1CS T1CON_bits.TMR1CS
#define NOT_T1SYNC T1CON_bits.NOT_T1SYNC
#define T1OSCEN T1CON_bits.T1OSCEN
#define T1CKPS0 T1CON_bits.T1CKPS0
#define T1CKPS1 T1CON_bits.T1CKPS1
#define TMR1GE T1CON_bits.TMR1GE
#define T1GINV T1CON_bits.T1GINV
#endif /* NO_BIT_DEFINES */
// ----- T2CON bits --------------------
typedef union {
struct {
unsigned char T2CKPS0:1;
unsigned char T2CKPS1:1;
unsigned char TMR2ON:1;
unsigned char TOUTPS0:1;
unsigned char TOUTPS1:1;
unsigned char TOUTPS2:1;
unsigned char TOUTPS3:1;
unsigned char :1;
};
} __T2CON_bits_t;
extern volatile __T2CON_bits_t __at(T2CON_ADDR) T2CON_bits;
#ifndef NO_BIT_DEFINES
#define T2CKPS0 T2CON_bits.T2CKPS0
#define T2CKPS1 T2CON_bits.T2CKPS1
#define TMR2ON T2CON_bits.TMR2ON
#define TOUTPS0 T2CON_bits.TOUTPS0
#define TOUTPS1 T2CON_bits.TOUTPS1
#define TOUTPS2 T2CON_bits.TOUTPS2
#define TOUTPS3 T2CON_bits.TOUTPS3
#endif /* NO_BIT_DEFINES */
// ----- TRISA bits --------------------
typedef union {
struct {
unsigned char TRISA0:1;
unsigned char TRISA1:1;
unsigned char TRISA2:1;
unsigned char TRISA3:1;
unsigned char TRISA4:1;
unsigned char TRISA5:1;
unsigned char :1;
unsigned char :1;
};
} __TRISA_bits_t;
extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
#ifndef NO_BIT_DEFINES
#define TRISA0 TRISA_bits.TRISA0
#define TRISA1 TRISA_bits.TRISA1
#define TRISA2 TRISA_bits.TRISA2
#define TRISA3 TRISA_bits.TRISA3
#define TRISA4 TRISA_bits.TRISA4
#define TRISA5 TRISA_bits.TRISA5
#endif /* NO_BIT_DEFINES */
// ----- TRISC bits --------------------
typedef union {
struct {
unsigned char TRISC0:1;
unsigned char TRISC1:1;
unsigned char TRISC2:1;
unsigned char TRISC3:1;
unsigned char TRISC4:1;
unsigned char TRISC5:1;
unsigned char TRISC6:1;
unsigned char TRISC7:1;
};
} __TRISC_bits_t;
extern volatile __TRISC_bits_t __at(TRISC_ADDR) TRISC_bits;
#ifndef NO_BIT_DEFINES
#define TRISC0 TRISC_bits.TRISC0
#define TRISC1 TRISC_bits.TRISC1
#define TRISC2 TRISC_bits.TRISC2
#define TRISC3 TRISC_bits.TRISC3
#define TRISC4 TRISC_bits.TRISC4
#define TRISC5 TRISC_bits.TRISC5
#define TRISC6 TRISC_bits.TRISC6
#define TRISC7 TRISC_bits.TRISC7
#endif /* NO_BIT_DEFINES */
// ----- VRCON bits --------------------
typedef union {
struct {
unsigned char VR0:1;
unsigned char VR1:1;
unsigned char VR2:1;
unsigned char VR3:1;
unsigned char :1;
unsigned char VRR:1;
unsigned char :1;
unsigned char VREN:1;
};
} __VRCON_bits_t;
extern volatile __VRCON_bits_t __at(VRCON_ADDR) VRCON_bits;
#ifndef NO_BIT_DEFINES
#define VR0 VRCON_bits.VR0
#define VR1 VRCON_bits.VR1
#define VR2 VRCON_bits.VR2
#define VR3 VRCON_bits.VR3
#define VRR VRCON_bits.VRR
#define VREN VRCON_bits.VREN
#endif /* NO_BIT_DEFINES */
// ----- WDTCON bits --------------------
typedef union {
struct {
unsigned char SWDTEN:1;
unsigned char WDTPS0:1;
unsigned char WDTPS1:1;
unsigned char WDTPS2:1;
unsigned char WDTPS3:1;
unsigned char :1;
unsigned char :1;
unsigned char :1;
};
} __WDTCON_bits_t;
extern volatile __WDTCON_bits_t __at(WDTCON_ADDR) WDTCON_bits;
#ifndef NO_BIT_DEFINES
#define SWDTEN WDTCON_bits.SWDTEN
#define WDTPS0 WDTCON_bits.WDTPS0
#define WDTPS1 WDTCON_bits.WDTPS1
#define WDTPS2 WDTCON_bits.WDTPS2
#define WDTPS3 WDTCON_bits.WDTPS3
#endif /* NO_BIT_DEFINES */
#endif
|