123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- /*
- * UserCan.h
- *
- * Created on: 2023年1月16日
- * Author: senco
- */
- #ifndef USERCAN_H_
- #define USERCAN_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- //#include "IQmathLib.h"
- #include "DSP2803x_Device.h" // DSP2803x Headerfile Include File
- //以下头文件修改了库文件 为了方便调用类型
- #define ID_DMC_DEBUG 0x111113FF
- #define ID_DMC_SET 0x11111333
- #define ID_DMC_CLEAR 0x11111334
- #define ID_DMC_SET1 0x11111335
- #define ID_DMC_SET2 0x11111336
- #define ID_DMC_SET3 0x11111337
- #define ID_DMC_SET4 0x11111338
- #define ID_DMC_SET5 0x11111339
- #define EXTFRAME 0x80000000
- #define ISR_FREQUENCY 40
- #ifndef TRUE
- #define FALSE 0
- #define TRUE 1
- #endif
- struct CANMBOX_USER_REGS
- {
- Uint16 MboxRxFlg;
- Uint16 MboxNum;
- Uint16 MboxDLC;
- Uint32 MboxID;
- int16 MboxWord1;
- int16 MboxWord2;
- int16 MboxWord3;
- int16 MboxWord4;
- };
- extern struct CANMBOX_USER_REGS CanMboxUserRegsR; //用户CAN接收数据结构体1
- extern struct CANMBOX_USER_REGS CanMboxUserRegsR2; //用户CAN接收数据结构体2
- extern struct CANMBOX_USER_REGS CanMboxUserRegsR3; //用户CAN接收数据结构体2
- extern interrupt void Ecan1ISR(void);
- extern interrupt void Ecan0ISR(void);
- extern void InitCan(void);
- extern void UserCANprocess(void);
- extern void CanMaster(void);
- extern void CanVar(void);
- extern void ECanMboxSend(struct CANMBOX_USER_REGS *pRegs);
- extern struct CANMBOX_USER_REGS ECanMboxRead(int16 MBXnbr);
- extern void DebugData2(int16 num,int16 data);
- extern void DebugData1(int16 num,int16 data);
- extern void carveData1();
- extern void CanCurve(void);
- #ifdef __cplusplus
- }
- #endif /* extern "C" */
- #endif /* USERCAN_H_ */
|