|
发表于 2011-4-23 14:36:36
|
显示全部楼层
enum最好了。
示例:
typedef enum {false = 0, true = 1} BOOLEAN;
typedef enum {CH = 0, EG = !CH} LANG_T;//language marks
typedef enum {DOC_NULL=1,DOC_SAVED,DOC_FULL} DOC_T;//doc marks
typedef enum {ERROR_CRC=1,ERROR_CALIB} ERROR_T;//operate status marks
typedef enum {ETRODE_REG=1,ETRODE_CLR} ETRODE_T;//electrode actions
typedef enum {TCNT_UP=1,TCNT_DOWN,TCNT_COMPLETE} TCNT_T;//timer counts models
typedef enum {AUTOFFMK_ON=1,AUTOFFMK_OFF=!AUTOFFMK_ON} AUTOFFMK_T;//control whether auto off
typedef enum {DA_MSUR=1,DA_REG,DA_STP} DAMODE_T;//da
typedef enum {ASC8=1,ASC16} DISPASC_T;
typedef enum {POWER_ON=0,POWER_OFF=!POWER_ON } POWER_T;
typedef enum {BLIGHT_ON=0,BLIGHT_OFF=!BLIGHT_ON } BLIGHT_T;
typedef enum {TIMR_ON=0,TIMR_OFF=!BLIGHT_ON } TIMR_T;
typedef enum {CALIB_NULL=1,CALIB_PT2=2,CALIB_PT3,CALIB_PT4} CALIB_T; //calibrate ponits,CALIB_NULL:no multiponits calibration
typedef enum {MODEL_MSRU=1,MODEL_CAL} MODEL_T; |
|