📄 p30f4012.h
字号:
unsigned PPRE :2;
unsigned SPRE :3;
unsigned MSTEN :1;
unsigned CKP :1;
unsigned SSEN :1;
unsigned CKE :1;
unsigned SMP :1;
unsigned MODE16 :1;
unsigned DISSDO :1;
unsigned :1;
unsigned SPIFSD:1;
unsigned FRMEN :1;
unsigned :1;
} SPIxCONBITS;
/* SPI1STAT: SPI1 Status Register */
extern volatile unsigned int SPI1STAT __attribute__((__near__));
extern volatile SPIxSTATBITS SPI1STATbits __attribute__((__near__));
/* SPI1CON: SPI1 Control Register */
extern volatile unsigned int SPI1CON __attribute__((__near__));
extern volatile SPIxCONBITS SPI1CONbits __attribute__((__near__));
/* SPI1BUF: SPI1 Buffer */
extern volatile unsigned int SPI1BUF __attribute__((__near__));
/* ------------------------------------------------------------------ */
/* 10-bit (500 ksps) Analog-to-Digital Converter register definitions */
/* ------------------------------------------------------------------ */
/* ADC Buffers 0-F */
extern volatile unsigned int ADCBUF0 __attribute__((__near__));
extern volatile unsigned int ADCBUF1 __attribute__((__near__));
extern volatile unsigned int ADCBUF2 __attribute__((__near__));
extern volatile unsigned int ADCBUF3 __attribute__((__near__));
extern volatile unsigned int ADCBUF4 __attribute__((__near__));
extern volatile unsigned int ADCBUF5 __attribute__((__near__));
extern volatile unsigned int ADCBUF6 __attribute__((__near__));
extern volatile unsigned int ADCBUF7 __attribute__((__near__));
extern volatile unsigned int ADCBUF8 __attribute__((__near__));
extern volatile unsigned int ADCBUF9 __attribute__((__near__));
extern volatile unsigned int ADCBUFA __attribute__((__near__));
extern volatile unsigned int ADCBUFB __attribute__((__near__));
extern volatile unsigned int ADCBUFC __attribute__((__near__));
extern volatile unsigned int ADCBUFD __attribute__((__near__));
extern volatile unsigned int ADCBUFE __attribute__((__near__));
extern volatile unsigned int ADCBUFF __attribute__((__near__));
/* ADCON1: ADC Control Register 1 */
extern volatile unsigned int ADCON1 __attribute__((__near__));
typedef struct tagADCON1BITS {
unsigned DONE :1;
unsigned SAMP :1;
unsigned ASAM :1;
unsigned SIMSAM :1;
unsigned :1;
unsigned SSRC :3;
unsigned FORM :2;
unsigned :3;
unsigned ADSIDL :1;
unsigned :1;
unsigned ADON :1;
} ADCON1BITS;
extern volatile ADCON1BITS ADCON1bits __attribute__((__near__));
/* ADCON2: ADC Control Register 2 */
extern volatile unsigned int ADCON2 __attribute__((__near__));
typedef struct tagADCON2BITS {
unsigned ALTS :1;
unsigned BUFM :1;
unsigned SMPI :4;
unsigned :1;
unsigned BUFS :1;
unsigned CHPS :2;
unsigned CSCNA :1;
unsigned :2;
unsigned VCFG :3;
} ADCON2BITS;
extern volatile ADCON2BITS ADCON2bits __attribute__((__near__));
/* ADCON3: ADC Control Register 3 */
extern volatile unsigned int ADCON3 __attribute__((__near__));
typedef struct tagADCON3BITS {
unsigned ADCS :6;
unsigned :1;
unsigned ADRC :1;
unsigned SAMC :5;
unsigned :3;
} ADCON3BITS;
extern volatile ADCON3BITS ADCON3bits __attribute__((__near__));
/* ADCHS: ADC Input Channel Select Register */
extern volatile unsigned int ADCHS __attribute__((__near__));
typedef struct tagADCHSBITS {
unsigned CH0SA :4;
unsigned CH0NA :1;
unsigned CH123SA:1;
unsigned CH123NA:2;
unsigned CH0SB :4;
unsigned CH0NB :1;
unsigned CH123SB:1;
unsigned CH123NB:2;
} ADCHSBITS;
extern volatile ADCHSBITS ADCHSbits __attribute__((__near__));
/* ADPCFG: ADC Port Configuration Register */
extern volatile unsigned int ADPCFG __attribute__((__near__));
typedef struct tagADPCFGBITS {
unsigned PCFG0 :1;
unsigned PCFG1 :1;
unsigned PCFG2 :1;
unsigned PCFG3 :1;
unsigned PCFG4 :1;
unsigned PCFG5 :1;
unsigned :10;
} ADPCFGBITS;
extern volatile ADPCFGBITS ADPCFGbits __attribute__((__near__));
/* ADCSSL: ADC Input Scan Select Register */
extern volatile unsigned int ADCSSL __attribute__((__near__));
typedef struct tagADCSSLBITS {
unsigned CSSL0 :1;
unsigned CSSL1 :1;
unsigned CSSL2 :1;
unsigned CSSL3 :1;
unsigned CSSL4 :1;
unsigned CSSL5 :1;
unsigned :10;
} ADCSSLBITS;
extern volatile ADCSSLBITS ADCSSLbits __attribute__((__near__));
/* ------------------------------ */
/* I/O Ports register definitions */
/* ------------------------------ */
/* TRISB: Port B Direction Control Register */
extern volatile unsigned int TRISB __attribute__((__near__));
typedef struct tagTRISBBITS {
unsigned TRISB0 :1;
unsigned TRISB1 :1;
unsigned TRISB2 :1;
unsigned TRISB3 :1;
unsigned TRISB4 :1;
unsigned TRISB5 :1;
unsigned :10;
} TRISBBITS;
extern volatile TRISBBITS TRISBbits __attribute__((__near__));
/* PORTB: Port B Pin Register */
extern volatile unsigned int PORTB __attribute__((__near__));
typedef struct tagPORTBBITS {
unsigned RB0 :1;
unsigned RB1 :1;
unsigned RB2 :1;
unsigned RB3 :1;
unsigned RB4 :1;
unsigned RB5 :1;
unsigned :10;
} PORTBBITS;
extern volatile PORTBBITS PORTBbits __attribute__((__near__));
/* LATB: Port B Latch Register */
extern volatile unsigned int LATB __attribute__((__near__));
typedef struct tagLATBBITS {
unsigned LATB0 :1;
unsigned LATB1 :1;
unsigned LATB2 :1;
unsigned LATB3 :1;
unsigned LATB4 :1;
unsigned LATB5 :1;
unsigned :10;
} LATBBITS;
extern volatile LATBBITS LATBbits __attribute__((__near__));
/* TRISC: Port C Direction Control Register */
extern volatile unsigned int TRISC __attribute__((__near__));
typedef struct tagTRISCBITS {
unsigned :13;
unsigned TRISC13:1;
unsigned TRISC14:1;
unsigned TRISC15:1;
} TRISCBITS;
extern volatile TRISCBITS TRISCbits __attribute__((__near__));
/* PORTC: Port C Pin Register */
extern volatile unsigned int PORTC __attribute__((__near__));
typedef struct tagPORTCBITS {
unsigned :13;
unsigned RC13 :1;
unsigned RC14 :1;
unsigned RC15 :1;
} PORTCBITS;
extern volatile PORTCBITS PORTCbits __attribute__((__near__));
/* LATC: Port C Latch Register */
extern volatile unsigned int LATC __attribute__((__near__));
typedef struct tagLATCBITS {
unsigned :13;
unsigned LATC13 :1;
unsigned LATC14 :1;
unsigned LATC15 :1;
} LATCBITS;
extern volatile LATCBITS LATCbits __attribute__((__near__));
/* TRISD: Port D Direction Control Register */
extern volatile unsigned int TRISD __attribute__((__near__));
typedef struct tagTRISDBITS {
unsigned TRISD0 :1;
unsigned TRISD1 :1;
unsigned :14;
} TRISDBITS;
extern volatile TRISDBITS TRISDbits __attribute__((__near__));
/* PORTD: Port D Pin Register */
extern volatile unsigned int PORTD __attribute__((__near__));
typedef struct tagPORTDBITS {
unsigned RD0 :1;
unsigned RD1 :1;
unsigned :14;
} PORTDBITS;
extern volatile PORTDBITS PORTDbits __attribute__((__near__));
/* LATD: Port D Latch Register */
extern volatile unsigned int LATD __attribute__((__near__));
typedef struct tagLATDBITS {
unsigned LATD0 :1;
unsigned LATD1 :1;
unsigned :14;
} LATDBITS;
extern volatile LATDBITS LATDbits __attribute__((__near__));
/* TRISE: Port E Direction Control Register */
extern volatile unsigned int TRISE __attribute__((__near__));
typedef struct tagTRISEBITS {
unsigned TRISE0 :1;
unsigned TRISE1 :1;
unsigned TRISE2 :1;
unsigned TRISE3 :1;
unsigned TRISE4 :1;
unsigned TRISE5 :1;
unsigned :2;
unsigned TRISE8 :1;
unsigned :7;
} TRISEBITS;
extern volatile TRISEBITS TRISEbits __attribute__((__near__));
/* PORTE: Port E Pin Register */
extern volatile unsigned int PORTE __attribute__((__near__));
typedef struct tagPORTEBITS {
unsigned RE0 :1;
unsigned RE1 :1;
unsigned RE2 :1;
unsigned RE3 :1;
unsigned RE4 :1;
unsigned RE5 :1;
unsigned :2;
unsigned RE8 :1;
unsigned :7;
} PORTEBITS;
extern volatile PORTEBITS PORTEbits __attribute__((__near__));
/* LATE: Port E Latch Register */
extern volatile unsigned int LATE __attribute__((__near__));
typedef struct tagLATEBITS {
unsigned LATE0 :1;
unsigned LATE1 :1;
unsigned LATE2 :1;
unsigned LATE3 :1;
unsigned LATE4 :1;
unsigned LATE5 :1;
unsigned :2;
unsigned LATE8 :1;
unsigned :7;
} LATEBITS;
extern volatile LATEBITS LATEbits __attribute__((__near__));
/* TRISF: Port F Direction Control Register */
extern volatile unsigned int TRISF __attribute__((__near__));
typedef struct tagTRISFBITS {
unsigned :2;
unsigned TRISF2 :1;
unsigned TRISF3 :1;
unsigned :12;
} TRISFBITS;
extern volatile TRISFBITS TRISFbits __attribute__((__near__));
/* PORTF: Port F Pin Register */
extern volatile unsigned int PORTF __attribute__((__near__));
typedef struct tagPORTFBITS {
unsigned :2;
unsigned RF2 :1;
unsigned RF3 :1;
unsigned :12;
} PORTFBITS;
extern volatile PORTFBITS PORTFbits __attribute__((__near__));
/* LATF: Port F Latch Register */
extern volatile unsigned int LATF __attribute__((__near__));
typedef struct tagLATFBITS {
unsigned :2;
unsigned LATF2 :1;
unsigned LATF3 :1;
unsigned :12;
} LATFBITS;
extern volatile LATFBITS LATFbits __attribute__((__near__));
/* ------------------------- */
/* CAN1 register definitions */
/* ------------------------- */
/* Generic structure of entire SFR area for each CAN module */
typedef struct tagCAN {
unsigned int cxrxf0sid;
unsigned int cxrxf0eidh;
unsigned int cxrxf0eidl;
unsigned int reserved0;
unsigned int cxrxf1sid;
unsigned int cxrxf1eidh;
unsigned int cxrxf1eidl;
unsigned int reserved1;
unsigned int cxrxf2sid;
unsigned int cxrxf2eidh;
unsigned int cxrxf2eidl;
unsigned int reserved2;
unsigned int cxrxf3sid;
unsigned int cxrxf3eidh;
unsigned int cxrxf3eidl;
unsigned int reserved3;
unsigned int cxrxf4sid;
unsigned int cxrxf4eidh;
unsigned int cxrxf4eidl;
unsigned int reserved4;
unsigned int cxrxf5sid;
unsigned int cxrxf5eidh;
unsigned int cxrxf5eidl;
unsigned int reserved5;
unsigned int cxrxm0sid;
unsigned int cxrxm0eidh;
unsigned int cxrxm0eidl;
unsigned int reserved6;
unsigned int cxrxm1sid;
unsigned int cxrxm1eidh;
unsigned int cxrxm1eidl;
unsigned int reserved7;
unsigned int cxtx2sid;
unsigned int cxtx2eid;
unsigned int cxtx2dlc;
unsigned int cxtx2b1;
unsigned int cxtx2b2;
unsigned int cxtx2b3;
unsigned int cxtx2b4;
unsigned int cxtx2con;
unsigned int cxtx1sid;
unsigned int cxtx1eid;
unsigned int cxtx1dlc;
unsigned int cxtx1b1;
unsigned int cxtx1b2;
unsigned int cxtx1b3;
unsigned int cxtx1b4;
unsigned int cxtx1con;
unsigned int cxtx0sid;
unsigned int cxtx0eid;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -