📄 p30f6012a.h
字号:
extern volatile unsigned int IPC1 __attribute__((__near__));
typedef struct tagIPC1BITS {
unsigned IC2IP :3;
unsigned :1;
unsigned OC2IP :3;
unsigned :1;
unsigned T2IP :3;
unsigned :1;
unsigned T3IP :3;
unsigned :1;
} IPC1BITS;
extern volatile IPC1BITS IPC1bits __attribute__((__near__));
/* IPC2: Interrupt Priority Control Register 2 */
extern volatile unsigned int IPC2 __attribute__((__near__));
typedef struct tagIPC2BITS {
unsigned SPI1IP :3;
unsigned :1;
unsigned U1RXIP :3;
unsigned :1;
unsigned U1TXIP :3;
unsigned :1;
unsigned ADIP :3;
unsigned :1;
} IPC2BITS;
extern volatile IPC2BITS IPC2bits __attribute__((__near__));
/* IPC3: Interrupt Priority Control Register 3 */
extern volatile unsigned int IPC3 __attribute__((__near__));
typedef struct tagIPC3BITS {
unsigned NVMIP :3;
unsigned :1;
unsigned SI2CIP :3;
unsigned :1;
unsigned MI2CIP :3;
unsigned :1;
unsigned CNIP :3;
unsigned :1;
} IPC3BITS;
extern volatile IPC3BITS IPC3bits __attribute__((__near__));
/* IPC4: Interrupt Priority Control Register 4 */
extern volatile unsigned int IPC4 __attribute__((__near__));
typedef struct tagIPC4BITS {
unsigned INT1IP :3;
unsigned :1;
unsigned IC7IP :3;
unsigned :1;
unsigned IC8IP :3;
unsigned :1;
unsigned OC3IP :3;
unsigned :1;
} IPC4BITS;
extern volatile IPC4BITS IPC4bits __attribute__((__near__));
/* IPC5: Interrupt Priority Control Register 5 */
extern volatile unsigned int IPC5 __attribute__((__near__));
typedef struct tagIPC5BITS {
unsigned OC4IP :3;
unsigned :1;
unsigned T4IP :3;
unsigned :1;
unsigned T5IP :3;
unsigned :1;
unsigned INT2IP :3;
unsigned :1;
} IPC5BITS;
extern volatile IPC5BITS IPC5bits __attribute__((__near__));
/* IPC6: Interrupt Priority Control Register 6 */
extern volatile unsigned int IPC6 __attribute__((__near__));
typedef struct tagIPC6BITS {
unsigned U2RXIP :3;
unsigned :1;
unsigned U2TXIP :3;
unsigned :1;
unsigned SPI2IP :3;
unsigned :1;
unsigned C1IP :3;
unsigned :1;
} IPC6BITS;
extern volatile IPC6BITS IPC6bits __attribute__((__near__));
/* IPC7: Interrupt Priority Control Register 7 */
extern volatile unsigned int IPC7 __attribute__((__near__));
typedef struct tagIPC7BITS {
unsigned IC3IP :3;
unsigned :1;
unsigned IC4IP :3;
unsigned :1;
unsigned IC5IP :3;
unsigned :1;
unsigned IC6IP :3;
unsigned :1;
} IPC7BITS;
extern volatile IPC7BITS IPC7bits __attribute__((__near__));
/* IPC8: Interrupt Priority Control Register 8 */
extern volatile unsigned int IPC8 __attribute__((__near__));
typedef struct tagIPC8BITS {
unsigned OC5IP :3;
unsigned :1;
unsigned OC6IP :3;
unsigned :1;
unsigned OC7IP :3;
unsigned :1;
unsigned OC8IP :3;
unsigned :1;
} IPC8BITS;
extern volatile IPC8BITS IPC8bits __attribute__((__near__));
/* IPC9: Interrupt Priority Control Register 9 */
extern volatile unsigned int IPC9 __attribute__((__near__));
typedef struct tagIPC9BITS {
unsigned INT3IP :3;
unsigned :1;
unsigned INT4IP :3;
unsigned :1;
unsigned C2IP :3;
unsigned :5;
} IPC9BITS;
extern volatile IPC9BITS IPC9bits __attribute__((__near__));
/* IPC10: Interrupt Priority Control Register 10 */
extern volatile unsigned int IPC10 __attribute__((__near__));
typedef struct tagIPC10BITS {
unsigned :4;
unsigned DCIIP :3;
unsigned :1;
unsigned LVDIP :3;
unsigned :5;
} IPC10BITS;
extern volatile IPC10BITS IPC10bits __attribute__((__near__));
/* ---------------------------------------------- */
/* Input Change Notification register definitions */
/* ---------------------------------------------- */
/* CNEN1: Input Change Notification Interrupt Enable Register 1 */
extern volatile unsigned int CNEN1 __attribute__((__near__));
typedef struct tagCNEN1BITS {
unsigned CN0IE :1;
unsigned CN1IE :1;
unsigned CN2IE :1;
unsigned CN3IE :1;
unsigned CN4IE :1;
unsigned CN5IE :1;
unsigned CN6IE :1;
unsigned CN7IE :1;
unsigned CN8IE :1;
unsigned CN9IE :1;
unsigned CN10IE :1;
unsigned CN11IE :1;
unsigned CN12IE :1;
unsigned CN13IE :1;
unsigned CN14IE :1;
unsigned CN15IE :1;
} CNEN1BITS;
extern volatile CNEN1BITS CNEN1bits __attribute__((__near__));
/* CNEN2: Input Change Notification Interrupt Enable Register 2 */
extern volatile unsigned int CNEN2 __attribute__((__near__));
typedef struct tagCNEN2BITS {
unsigned CN16IE :1;
unsigned CN17IE :1;
unsigned CN18IE :1;
unsigned :13;
} CNEN2BITS;
extern volatile CNEN2BITS CNEN2bits __attribute__((__near__));
/* CNPU1: Input Change Notification Pullup Enable Register 1 */
extern volatile unsigned int CNPU1 __attribute__((__near__));
typedef struct tagCNPU1BITS {
unsigned CN0PUE :1;
unsigned CN1PUE :1;
unsigned CN2PUE :1;
unsigned CN3PUE :1;
unsigned CN4PUE :1;
unsigned CN5PUE :1;
unsigned CN6PUE :1;
unsigned CN7PUE :1;
unsigned CN8PUE :1;
unsigned CN9PUE :1;
unsigned CN10PUE:1;
unsigned CN11PUE:1;
unsigned CN12PUE:1;
unsigned CN13PUE:1;
unsigned CN14PUE:1;
unsigned CN15PUE:1;
} CNPU1BITS;
extern volatile CNPU1BITS CNPU1bits __attribute__((__near__));
/* CNPU2: Input Change Notification Pullup Enable Register 2 */
extern volatile unsigned int CNPU2 __attribute__((__near__));
typedef struct tagCNPU2BITS {
unsigned CN16PUE:1;
unsigned CN17PUE:1;
unsigned CN18PUE:1;
unsigned :13;
} CNPU2BITS;
extern volatile CNPU2BITS CNPU2bits __attribute__((__near__));
/* --------------------------- */
/* Timer1 register definitions */
/* --------------------------- */
/* Generic structure for Timer 1 Control Register */
typedef struct tagTCON_16BIT {
unsigned :1;
unsigned TCS :1;
unsigned TSYNC :1;
unsigned :1;
unsigned TCKPS :2;
unsigned TGATE :1;
unsigned :6;
unsigned TSIDL :1;
unsigned :1;
unsigned TON :1;
} TCON_16BIT;
/* TMR1: Timer 1 Count Register */
extern volatile unsigned int TMR1 __attribute__((__near__));
/* PR1: Timer 1 Period Register */
extern volatile unsigned int PR1 __attribute__((__near__));
/* T1CON: Timer 1 Control Register */
extern volatile unsigned int T1CON __attribute__((__near__));
extern volatile TCON_16BIT T1CONbits __attribute__((__near__));
/* ----------------------------- */
/* Timer2/3 register definitions */
/* ----------------------------- */
/* Generic structure for Timer 2 and Timer 4 Control Registers */
typedef struct tagTCON_EVEN {
unsigned :1;
unsigned TCS :1;
unsigned :1;
unsigned T32 :1;
unsigned TCKPS :2;
unsigned TGATE :1;
unsigned :6;
unsigned TSIDL :1;
unsigned :1;
unsigned TON :1;
} TCON_EVEN;
/* Generic structure for Timer 3 and Timer 5 Control Registers */
typedef struct tagTCON_ODD {
unsigned :1;
unsigned TCS :1;
unsigned :2;
unsigned TCKPS :2;
unsigned TGATE :1;
unsigned :6;
unsigned TSIDL :1;
unsigned :1;
unsigned TON :1;
} TCON_ODD;
/* TMR2: Timer 2 Count Register */
extern volatile unsigned int TMR2 __attribute__((__near__));
/* TMR3HLD: Timer 3 Holding Register */
extern volatile unsigned int TMR3HLD __attribute__((__near__));
/* TMR3: Timer 3 Count Register */
extern volatile unsigned int TMR3 __attribute__((__near__));
/* PR2: Timer 2 Period Register */
extern volatile unsigned int PR2 __attribute__((__near__));
/* PR3: Timer 3 Period Register */
extern volatile unsigned int PR3 __attribute__((__near__));
/* T2CON: Timer 2 Control Register */
extern volatile unsigned int T2CON __attribute__((__near__));
extern volatile TCON_EVEN T2CONbits __attribute__((__near__));
/* T3CON: Timer 3 Control Register */
extern volatile unsigned int T3CON __attribute__((__near__));
extern volatile TCON_ODD T3CONbits __attribute__((__near__));
/* ----------------------------- */
/* Timer4/5 register definitions */
/* ----------------------------- */
/* TMR4: Timer 4 Count Register */
extern volatile unsigned int TMR4 __attribute__((__near__));
/* TMR5HLD: Timer 5 Holding Register */
extern volatile unsigned int TMR5HLD __attribute__((__near__));
/* TMR5: Timer 5 Count Register */
extern volatile unsigned int TMR5 __attribute__((__near__));
/* PR4: Timer 4 Period Register */
extern volatile unsigned int PR4 __attribute__((__near__));
/* PR5: Timer 5 Period Register */
extern volatile unsigned int PR5 __attribute__((__near__));
/* T4CON: Timer 4 Control Register */
extern volatile unsigned int T4CON __attribute__((__near__));
extern volatile TCON_EVEN T4CONbits __attribute__((__near__));
/* T5CON: Timer 5 Control Register */
extern volatile unsigned int T5CON __attribute__((__near__));
extern volatile TCON_ODD T5CONbits __attribute__((__near__));
/* ---------------------------------- */
/* Input Capture register definitions */
/* ---------------------------------- */
/* Generic structure of entire SFR area for each Input Capture module */
typedef struct tagIC {
unsigned int icxbuf;
unsigned int icxcon;
} IC, *PIC;
/* SFR blocks for each Input Capture module */
extern volatile IC IC1 __attribute__((__near__));
extern volatile IC IC2 __attribute__((__near__));
extern volatile IC IC3 __attribute__((__near__));
extern volatile IC IC4 __attribute__((__near__));
extern volatile IC IC5 __attribute__((__near__));
extern volatile IC IC6 __attribute__((__near__));
extern volatile IC IC7 __attribute__((__near__));
extern volatile IC IC8 __attribute__((__near__));
/* Generic structure for Input Capture Control Registers */
typedef struct tagICxCONBITS {
unsigned ICM :3;
unsigned ICBNE :1;
unsigned ICOV :1;
unsigned ICI :2;
unsigned ICTMR :1;
unsigned :5;
unsigned ICSIDL :1;
unsigned :2;
} ICxCONBITS;
/* IC1BUF: Input Capture 1 Buffer */
extern volatile unsigned int IC1BUF __attribute__((__near__));
/* IC1CON: Input Capture 1 Control Register */
extern volatile unsigned int IC1CON __attribute__((__near__));
extern volatile ICxCONBITS IC1CONbits __attribute__((__near__));
/* IC2BUF: Input Capture 2 Buffer */
extern volatile unsigned int IC2BUF __attribute__((__near__));
/* IC2CON: Input Capture 2 Control Register */
extern volatile unsigned int IC2CON __attribute__((__near__));
extern volatile ICxCONBITS IC2CONbits __attribute__((__near__));
/* IC3BUF: Input Capture 3 Buffer */
extern volatile unsigned int IC3BUF __attribute__((__near__));
/* IC3CON: Input Capture 3 Control Register */
extern volatile unsigned int IC3CON __attribute__((__near__));
extern volatile ICxCONBITS IC3CONbits __attribute__((__near__));
/* IC4BUF: Input Capture 4 Buffer */
extern volatile unsigned int IC4BUF __attribute__((__near__));
/* IC4CON: Input Capture 4 Control Register */
extern volatile unsigned int IC4CON __attribute__((__near__));
extern volatile ICxCONBITS IC4CONbits __attribute__((__near__));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -