⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p30f4012.h

📁 数字信号处理器的基本代码的示例
💻 H
📖 第 1 页 / 共 5 页
字号:
        unsigned int cxtx0dlc; 
        unsigned int cxtx0b1;
        unsigned int cxtx0b2;
        unsigned int cxtx0b3;
        unsigned int cxtx0b4;
        unsigned int cxtx0con;
        unsigned int cxrx1sid;
        unsigned int cxrx1eid;
        unsigned int cxrx1dlc;
        unsigned int cxrx1b1;
        unsigned int cxrx1b2;
        unsigned int cxrx1b3;
        unsigned int cxrx1b4;
        unsigned int cxrx1con;
        unsigned int cxrx0sid;
        unsigned int cxrx0eid;
        unsigned int cxrx0dlc;
        unsigned int cxrx0b1;
        unsigned int cxrx0b2;
        unsigned int cxrx0b3;
        unsigned int cxrx0b4;
        unsigned int cxrx0con;
        unsigned int cxctrl;
        unsigned int cxcfg1;
        unsigned int cxcfg2;
        unsigned int cxintf;
        unsigned int cxinte;
        unsigned int cxec;
        unsigned int reserved8[50];
} CAN, *PCAN;

/* SFR blocks for each CAN module */
extern volatile CAN CAN1 __attribute__((__near__));

/* Generic structure for CAN Receive Filter Standard Identifier Register */
typedef struct tagCxRXFxSIDBITS {
        unsigned EXIDE  :1;
        unsigned        :1; 
        unsigned SID    :11;
        unsigned        :3;
} CxRXFxSIDBITS;

/* C1RXF0SID: CAN1 Receive Filter 0 SID Register */
extern volatile unsigned int C1RXF0SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF0SIDbits __attribute__((__near__));

/* C1RXF0EIDH: CAN1 Receive Filter 0 EIDH Register */
extern volatile unsigned int C1RXF0EIDH __attribute__((__near__));

/* C1RXF0EIDL: CAN1 Receive Filter 0 EIDL Register */
extern volatile unsigned int C1RXF0EIDL __attribute__((__near__));

/* C1RXF1SID: CAN1 Receive Filter 1 SID Register */
extern volatile unsigned int C1RXF1SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF1SIDbits __attribute__((__near__));

/* C1RXF1EIDH: CAN1 Receive Filter 1 EIDH Register */
extern volatile unsigned int C1RXF1EIDH __attribute__((__near__));

/* C1RXF1EIDL: CAN1 Receive Filter 1 EIDL Register */
extern volatile unsigned int C1RXF1EIDL __attribute__((__near__));

/* C1RXF2SID: CAN1 Receive Filter 2 SID Register */
extern volatile unsigned int C1RXF2SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF2SIDbits __attribute__((__near__));

/* C1RXF2EIDH: CAN1 Receive Filter 2 EIDH Register */
extern volatile unsigned int C1RXF2EIDH __attribute__((__near__));

/* C1RXF2EIDL: CAN1 Receive Filter 2 EIDL Register */
extern volatile unsigned int C1RXF2EIDL __attribute__((__near__));

/* C1RXF3SID: CAN1 Receive Filter 3 SID Register */
extern volatile unsigned int C1RXF3SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF3SIDbits __attribute__((__near__));

/* C1RXF3EIDH: CAN1 Receive Filter 3 EIDH Register */
extern volatile unsigned int C1RXF3EIDH __attribute__((__near__));

/* C1RXF3EIDL: CAN1 Receive Filter 3 EIDL Register */
extern volatile unsigned int C1RXF3EIDL __attribute__((__near__));

/* C1RXF4SID: CAN1 Receive Filter 4 SID Register */
extern volatile unsigned int C1RXF4SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF4SIDbits __attribute__((__near__));

/* C1RXF4EIDH: CAN1 Receive Filter 4 EIDH Register */
extern volatile unsigned int C1RXF4EIDH __attribute__((__near__));

/* C1RXF4EIDL: CAN1 Receive Filter 4 EIDL Register */
extern volatile unsigned int C1RXF4EIDL __attribute__((__near__));

/* C1RXF5SID: CAN1 Receive Filter 5 SID Register */
extern volatile unsigned int C1RXF5SID __attribute__((__near__));
extern volatile CxRXFxSIDBITS C1RXF5SIDbits __attribute__((__near__));

/* C1RXF5EIDH: CAN1 Receive Filter 5 EIDH Register */
extern volatile unsigned int C1RXF5EIDH __attribute__((__near__)); 

/* C1RXF5EIDL: CAN1 Receive Filter 5 EIDL Register */
extern volatile unsigned int C1RXF5EIDL __attribute__((__near__));

/* Generic structure for CAN Receive Mask Standard Identifier Register */
typedef struct tagCxRXMxSIDBITS {
        unsigned MIDE   :1;
        unsigned        :1; 
        unsigned SID    :11;
        unsigned        :3;
} CxRXMxSIDBITS;

/* C1RXM0SID: CAN1 Receive Mask 0 SID Register */
extern volatile unsigned int C1RXM0SID __attribute__((__near__));
extern volatile CxRXMxSIDBITS C1RXM0SIDbits __attribute__((__near__));

/* C1RXM0EIDH: CAN1 Receive Mask 0 EIDH Register */
extern volatile unsigned int C1RXM0EIDH __attribute__((__near__));

/* C1RXM0EIDL: CAN1 Receive Mask 0 EIDL Register */
extern volatile unsigned int C1RXM0EIDL __attribute__((__near__));

/* C1RXM1SID: CAN1 Receive Mask 1 SID Register */
extern volatile unsigned int C1RXM1SID __attribute__((__near__));
extern volatile CxRXMxSIDBITS C1RXM1SIDbits __attribute__((__near__));

/* C1RXM1EIDH: CAN1 Receive Mask 1 EIDH Register */
extern volatile unsigned int C1RXM1EIDH __attribute__((__near__));

/* C1RXM1EIDL: CAN1 Receive Mask 1 EIDL Register */
extern volatile unsigned int C1RXM1EIDL __attribute__((__near__));

/* Generic structure for CAN Transmit Standard Identifier Register */
typedef struct tagCxTXxSIDBITS {
        unsigned TXIDE  :1;
        unsigned SRR    :1;
        unsigned SID5_0 :6;
        unsigned        :3;
        unsigned SID10_6:5;
} CxTXxSIDBITS;

/* Generic structure for CAN Transmit Extended Identifier Register */
typedef struct tagCxTXxEIDBITS {
        unsigned EID13_6:8;
        unsigned        :4;
        unsigned EID17_14:4;
} CxTXxEIDBITS;

/* Generic structure for CAN Transmit Data Length Code Register */
typedef struct tagCxTXxDLCBITS {
        unsigned        :3;
        unsigned DLC    :4;
        unsigned TXRB0  :1;
        unsigned TXRB1  :1;
        unsigned TXRTR  :1;
        unsigned EID5_0 :6;
} CxTXxDLCBITS;

/* Generic structure for CAN Transmit Control Register */
typedef struct tagCxTXxCONBITS {
        unsigned TXPRI  :2;
        unsigned        :1;
        unsigned TXREQ  :1;
        unsigned TXERR  :1;
        unsigned TXLARB :1;
        unsigned TXABT  :1;
        unsigned        :9;
} CxTXxCONBITS;

/* C1TX2SID: CAN1 Transmit 2 SID Register */
extern volatile unsigned int C1TX2SID __attribute__((__near__));
extern volatile CxTXxSIDBITS C1TX2SIDbits __attribute__((__near__));

/* C1TX2EID: CAN1 Transmit 2 EID Register */
extern volatile unsigned int C1TX2EID __attribute__((__near__));
extern volatile CxTXxEIDBITS C1TX2EIDbits __attribute__((__near__));

/* C1TX2DLC: CAN1 Transmit 2 DLC Register */
extern volatile unsigned int C1TX2DLC __attribute__((__near__));
extern volatile CxTXxDLCBITS C1TX2DLCbits __attribute__((__near__));

/* C1TX2B1: CAN1 Transmit 2 Buffer Word 1 */
extern volatile unsigned int C1TX2B1 __attribute__((__near__));

/* C1TX2B2: CAN1 Transmit 2 Buffer Word 2 */
extern volatile unsigned int C1TX2B2 __attribute__((__near__));

/* C1TX2B3: CAN1 Transmit 2 Buffer Word 3 */
extern volatile unsigned int C1TX2B3 __attribute__((__near__));

/* C1TX2B4: CAN1 Transmit 2 Buffer Word 4 */
extern volatile unsigned int C1TX2B4 __attribute__((__near__));

/* C1TX2CON: CAN1 Transmit 2 Control Register */
extern volatile unsigned int C1TX2CON __attribute__((__near__));
extern volatile CxTXxCONBITS C1TX2CONbits __attribute__((__near__));

/* C1TX1SID: CAN1 Transmit 1 SID Register */
extern volatile unsigned int C1TX1SID __attribute__((__near__));
extern volatile CxTXxSIDBITS C1TX1SIDbits __attribute__((__near__));

/* C1TX1EID: CAN1 Transmit 1 EID Register */
extern volatile unsigned int C1TX1EID __attribute__((__near__));
extern volatile CxTXxEIDBITS C1TX1EIDbits __attribute__((__near__));

/* C1TX1DLC: CAN1 Transmit 1 DLC Register */
extern volatile unsigned int C1TX1DLC __attribute__((__near__));
extern volatile CxTXxDLCBITS C1TX1DLCbits __attribute__((__near__));

/* C1TX1B1: CAN1 Transmit 1 Buffer Word 1 */
extern volatile unsigned int C1TX1B1 __attribute__((__near__));

/* C1TX1B2: CAN1 Transmit 1 Buffer Word 2 */
extern volatile unsigned int C1TX1B2 __attribute__((__near__));

/* C1TX1B3: CAN1 Transmit 1 Buffer Word 3 */
extern volatile unsigned int C1TX1B3 __attribute__((__near__));

/* C1TX1B4: CAN1 Transmit 1 Buffer Word 4 */
extern volatile unsigned int C1TX1B4 __attribute__((__near__));

/* C1TX1CON: CAN1 Transmit 1 Control Register */
extern volatile unsigned int C1TX1CON __attribute__((__near__));
extern volatile CxTXxCONBITS C1TX1CONbits __attribute__((__near__));

/* C1TX0SID: CAN1 Transmit 0 SID Register */
extern volatile unsigned int C1TX0SID __attribute__((__near__));
extern volatile CxTXxSIDBITS C1TX0SIDbits __attribute__((__near__));

/* C1TX0EID: CAN1 Transmit 0 EID Register */
extern volatile unsigned int C1TX0EID __attribute__((__near__));
extern volatile CxTXxEIDBITS C1TX0EIDbits __attribute__((__near__));

/* C1TX0DLC: CAN1 Transmit 0 DLC Register */
extern volatile unsigned int C1TX0DLC __attribute__((__near__));
extern volatile CxTXxDLCBITS C1TX0DLCbits __attribute__((__near__));

/* C1TX0B1: CAN1 Transmit 0 Buffer Word 1 */
extern volatile unsigned int C1TX0B1 __attribute__((__near__));

/* C1TX0B2: CAN1 Transmit 0 Buffer Word 2 */
extern volatile unsigned int C1TX0B2 __attribute__((__near__));

/* C1TX0B3: CAN1 Transmit 0 Buffer Word 3 */
extern volatile unsigned int C1TX0B3 __attribute__((__near__));

/* C1TX0B4: CAN1 Transmit 0 Buffer Word 4 */
extern volatile unsigned int C1TX0B4 __attribute__((__near__));

/* C1TX0CON: CAN1 Transmit 0 Control Register */
extern volatile unsigned int C1TX0CON __attribute__((__near__));
extern volatile CxTXxCONBITS C1TX0CONbits __attribute__((__near__));

/* Generic structure for CAN Receive Standard Identifier Register */
typedef struct tagCxRXxSIDBITS {
        unsigned RXIDE  :1;
        unsigned SRR    :1;
        unsigned SID    :11;
        unsigned        :3;
} CxRXxSIDBITS;

/* Generic structure for CAN Receive Data Length Code Register */
typedef struct tagCxRXxDLCBITS {
        unsigned DLC    :4;
        unsigned RXRB0  :1;
        unsigned        :3;
        unsigned RXRB1  :1;
        unsigned RXRTR  :1;
        unsigned EID5_0 :6;
} CxRXxDLCBITS;

/* Generic structure for CAN Receive 1 Control Register */
typedef struct tagCxRX1CONBITS {
        unsigned FILHIT :3;
        unsigned RXRTRRO:1;
        unsigned        :3;
        unsigned RXFUL  :1;
        unsigned        :8;
} CxRX1CONBITS;

/* C1RX1SID: CAN1 Receive 1 SID Register */
extern volatile unsigned int C1RX1SID __attribute__((__near__));
extern volatile CxRXxSIDBITS C1RX1SIDbits __attribute__((__near__));

/* C1RX1EID: CAN1 Receive 1 EID Register */
extern volatile unsigned int C1RX1EID __attribute__((__near__));

/* C1RX1DLC: CAN1 Receive 1 DLC Register */
extern volatile unsigned int C1RX1DLC __attribute__((__near__));
extern volatile CxRXxDLCBITS C1RX1DLCbits __attribute__((__near__));

/* C1RX1B1: CAN1 Receive 1 Buffer Word 1 */
extern volatile unsigned int C1RX1B1 __attribute__((__near__));

/* C1RX1B2: CAN1 Receive 1 Buffer Word 2 */
extern volatile unsigned int C1RX1B2 __attribute__((__near__));

/* C1RX1B3: CAN1 Receive 1 Buffer Word 3 */
extern volatile unsigned int C1RX1B3 __attribute__((__near__));

/* C1RX1B4: CAN1 Receive 1 Buffer Word 4 */
extern volatile unsigned int C1RX1B4 __attribute__((__near__));

/* C1RX1CON: CAN1 Receive 1 Control Register */
extern volatile unsigned int C1RX1CON __attribute__((__near__));
extern volatile CxRX1CONBITS C1RX1CONbits __attribute__((__near__));

/* Generic structure for CAN Receive 0 Control Register */
typedef struct tagCxRX0CONBITS {
        unsigned FILHIT0:1;
        unsigned JTOFF  :1;
        unsigned DBEN   :1;
        unsigned RXRTRRO:1;
        unsigned        :3;
        unsigned RXFUL  :1;
        unsigned        :8;
} CxRX0CONBITS;

/* C1RX0SID: CAN1 Receive 0 SID Register */
extern volatile unsigned int C1RX0SID __attribute__((__near__));
extern volatile CxRXxSIDBITS C1RX0SIDbits __attribute__((__near__));

/* C1RX0EID: CAN1 Receive 0 EID Register */
extern volatile unsigned int C1RX0EID __attribute__((__near__));

/* C1RX0DLC: CAN1 Receive 0 DLC Register */
extern volatile unsigned int C1RX0DLC __attribute__((__near__));
extern volatile CxRXxDLCBITS C1RX0DLCbits __attribute__((__near__));

/* C1RX0B1: CAN1 Receive 0 Buffer Word 1 */
extern volatile unsigned int C1RX0B1 __attribute__((__near__));

/* C1RX0B2: CAN1 Receive 0 Buffer Word 2 */
extern volatile unsigned int C1RX0B2 __attribute__((__near__));

/* C1RX0B3: CAN1 Receive 0 Buffer Word 3 */
extern volatile unsigned int C1RX0B3 __attribute__((__near__));

/* C1RX0B4: CAN1 Receive 0 Buffer Word 4 */
extern volatile unsigned int C1RX0B4 __attribute__((__near__));

/* C1RX0CON: CAN1 Receive 0 Control Register */
extern volatile unsigned int C1RX0CON __attribute__((__near__));
extern volatile CxRX0CONBITS C1RX0CONbits __attribute__((__near__));

/* C1CTRL: CAN1 Control Register */
extern volatile unsigned int C1CTRL __attribute__((__near__));
typedef struct tagCxCTRLBITS {
        unsigned        :1;
        unsigned ICODE  :3;
        unsigned        :1;
        unsigned OPMODE :3;
        unsigned REQOP  :3;
        unsigned CANCKS :1;
        unsigned ABAT   :1;
        unsigned CSIDL  :1;
        unsigned        :1;
        unsigned CANCAP :1;
} CxCTRLBITS;
extern volatile CxCTRLBITS C1CTRLbits __attribute__((__near__));

/* C1CFG1: CAN1 Baud Rate Control Register 1 */
extern volatile unsigned int C1CFG1 __attribute__((__near__));
typedef struct tagCxCFG1BITS {
        unsigned BRP    :6;
        unsigned 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -