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

📄 p30f4011.h

📁 PID算法的介绍和应用,在很多场合需要,详细的事例说明
💻 H
📖 第 1 页 / 共 5 页
字号:
        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 TRISF0 :1;
        unsigned TRISF1 :1;
        unsigned TRISF2 :1;
        unsigned TRISF3 :1;
        unsigned TRISF4 :1;
        unsigned TRISF5 :1;
        unsigned TRISF6 :1;
        unsigned        :9;
} TRISFBITS;
extern volatile TRISFBITS TRISFbits __attribute__((__near__));

/* PORTF: Port F Pin Register */
extern volatile unsigned int PORTF __attribute__((__near__));
typedef struct tagPORTFBITS {
        unsigned RF0    :1;
        unsigned RF1    :1;
        unsigned RF2    :1;
        unsigned RF3    :1;
        unsigned RF4    :1;
        unsigned RF5    :1;
        unsigned RF6    :1;
        unsigned        :9;
} PORTFBITS;
extern volatile PORTFBITS PORTFbits __attribute__((__near__));

/* LATF: Port F Latch Register */
extern volatile unsigned int LATF __attribute__((__near__));
typedef struct tagLATFBITS {
        unsigned LATF0  :1;
        unsigned LATF1  :1;
        unsigned LATF2  :1;
        unsigned LATF3  :1;
        unsigned LATF4  :1;
        unsigned LATF5  :1;
        unsigned LATF6  :1;
        unsigned        :9;
} 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;
        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;

⌨️ 快捷键说明

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