#ifndef _Configfff_H_ #define _Configfff_H_ //-----宏定义----------------------------------------------------------------- //开关部分-------------------------------------------------------------- //支持平台: // ___XC164CM___ SSC工作于查询方式 // ___XC2765X___ SSC工作于查询方式 #define ___XC886CLM___ #define NumChipSw 2//定义MC33993芯片的数量 #define DF_SwInNum 1//定义采集芯片的数量 #define DF_SwOutNum 1//定义输出芯片的数量 #define Tog 2 #define On 1 #define Off 0 //#define N 6 //N为偶数 #define uchar unsigned char #define ulong unsigned long #define uint unsigned int //如果有CAN数据接收,需要定义___CANRX___ //#define ___CANRX___ //看门狗 //#define DF_WDT P1_OUT_P0 //定义 #define SwIn01 P1_2 // Output7 #define SwIn02 P1_3 // Output2 #define SwIn03 P1_4 // Output4 #define SwIn04 P1_5 // Output3 #define SwIn05 P3_6 // Output5 #define SwIn06 P4_3 // Output6 #define SwIn07 P3_0 #define SwIn08 P2_6 #define SwOut01 P3_2 #define SwOut02 P3_4 #define SwOut03 P4_0 #define SwOut04 P0_7 #define SwOut05 P0_0 #define SwOut06 P0_1 #define SwOut07 P2_3 #define SwOut08 P2_5 #define SwOut09 P0_3 #define SwOut10 P4_1 #define SwOut11 P3_5 #define SwOut12 P3_3 #define SwOut13 P1_4 #define SwOut14 P1_2 #define SwOut15 P0_2 #define SwOut16 P1_7 //LED输出数据结构 typedef union _SwOut { struct { // ubyte Arr[DF_SwOutNum][4]; //芯片数量改变需修改 ubyte Arr[DF_SwOutNum][4]; //芯片数量改变需修改 }ArrData; struct { //-------输出芯片1------------------------------- unsigned int S21 : 1;//FLGSP0 unsigned int S22 : 1;//FLGSP1 unsigned int S23 : 1;//FLGSP2 unsigned int S24 : 1;//FLGSP3 unsigned int S34 : 1;//FLGSP4 unsigned int S33 : 1;//FLGSP5 unsigned int S32 : 1;//FLGSP6 unsigned int S31 : 1;//FLGSP7 unsigned int S25 : 1;//FLGSG0 unsigned int S26 : 1;//FLGSG1 unsigned int S27 : 1;//FLGSG2 unsigned int S28 : 1;//FLGSG3 unsigned int S30 : 1;//FLGSG4 unsigned int S29 : 1;//FLGSG5 unsigned int S43 : 1;//FLGSG6 unsigned int S35 : 1;//FLGSG7 unsigned int S36 : 1;//FLGSG8 unsigned int S37 : 1;//FLGSG9 unsigned int S38 : 1;//FLGSG10 unsigned int S40 : 1;//FLGSG11 unsigned int S39 : 1;//FLGSG12 unsigned int S44 : 1;//FLGSG13 unsigned int : 1; unsigned int : 1; unsigned int : 8; //------------------------------------------------- }BitData; }UnSwOut,*pUnSwOut; //CAN部分-------------------------------------------------------------- #define NumTxCan 1 #define NumRxCan 1//15 #define NumTxCanMoS 16 //发送消息存放的消息对象起始 #define NumRxCanMoS 0 //接收消息存放的消息对象起始 #define ___CANRX___ //CAN信息结构 typedef union _InfCan { struct { ubyte Arr[1][8]; ubyte ArrRX[2][8]; }ArrData; struct { //----------发送0-0x14000001 ------------------------------------------- unsigned int Sta09 : 1 ; //FlgSp1 unsigned int Sta10 : 1 ; //FlgSp0 unsigned int Sta11 : 1 ; //FlgSp7 unsigned int Sta12 : 1 ; //FlgSp6 unsigned int Sta13 : 1 ; //FlgSp5 unsigned int Sta14 : 1 ; //FlgSp4 unsigned int Sta15 : 1 ; //FlgSg7 unsigned int Sta16 : 1 ; //FlgSg8 unsigned int Sta01 : 1 ; //FlgSg4 unsigned int Sta02 : 1 ; //FlgSg5 unsigned int Sta03 : 1 ; //FlgSg3 unsigned int Sta04 : 1 ; //FlgSg2 unsigned int Sta05 : 1 ; //FlgSg1 unsigned int Sta06 : 1 ; //FlgSg0 unsigned int Sta07 : 1 ; //FlgSp3 unsigned int Sta08 : 1 ; //FlgSp2 unsigned int CanTx3 : 8 ; //// unsigned int Dia01 : 1 ; //FlgSg4 unsigned int Dia02 : 1 ; //FlgSg5 unsigned int Dia03 : 1 ; //FlgSg3 unsigned int Dia04 : 1 ; //FlgSg2 unsigned int Dia05 : 1 ; //FlgSg1 unsigned int Dia06 : 1 ; //FlgSg0 unsigned int Dia07 : 1 ; //FlgSp3 unsigned int Dia08 : 1 ; //FlgSp2 unsigned int CanTx5 : 8 ; //// unsigned int CanTx4 : 8 ; //// unsigned int CanTx7 : 8 ; //// unsigned int CanTx6 : 8 ; //// //----------接收0x14000002 -------------------------------------------- unsigned int D29 : 1 ; //FlgSp1 unsigned int D30 : 1 ; //FlgSp0 unsigned int D31 : 1 ; //FlgSp7 unsigned int D32 : 1 ; //FlgSp6 unsigned int D33 : 1 ; //FlgSp5 unsigned int D34 : 1 ; //FlgSp4 unsigned int D35 : 1 ; //FlgSg7 unsigned int D36 : 1 ; //FlgSg8 unsigned int D21 : 1 ; //FlgSg4 unsigned int D22 : 1 ; //FlgSg5 unsigned int D23 : 1 ; //FlgSg3 unsigned int D24 : 1 ; //FlgSg2 unsigned int D25 : 1 ; //FlgSg1 unsigned int D26 : 1 ; //FlgSg0 unsigned int D27 : 1 ; //FlgSp3 unsigned int D28 : 1 ; //FlgSp2 unsigned int CanRx3 : 8 ; //// unsigned int CanRx2 : 8 ; //// unsigned int CanRx5 : 8 ; //// unsigned int CanRx4 : 8 ; //// unsigned int CanRx7 : 8 ; //// unsigned int CanRx6 : 8 ; //// //----------接收0x14000003 -------------------------------------------- unsigned int Pwm_01 : 4 ; //FlgSp1 unsigned int Pwm_02 : 4 ; //FlgSp0 unsigned int Pwm_03 : 4 ; //FlgSp7 unsigned int Pwm_04 : 4 ; //FlgSp6 unsigned int Pwm_05 : 4 ; //FlgSp5 unsigned int Pwm_06 : 4 ; //FlgSp4 unsigned int Pwm_07 : 4 ; //FlgSg7 unsigned int Pwm_08 : 4 ; //FlgSg8 unsigned int Pwm_09 : 4 ; //FlgSg4 unsigned int Pwm_10 : 4 ; //FlgSg5 unsigned int Pwm_11 : 4 ; //FlgSg3 unsigned int Pwm_12 : 4 ; //FlgSg2 unsigned int Pwm_13 : 4 ; //FlgSg1 unsigned int Pwm_14 : 4 ; //FlgSg0 unsigned int Pwm_15 : 4 ; //FlgSp3 unsigned int Pwm_16 : 4 ; //FlgSp2 }BitData; }UnInfCan,*pInfCan; //-----文件包含---------------------------------------------- #include "user.H" #include "boot.H" #include "RTC.H" #include "temperature.H" #endif