本帖最后由 ddtx 于 2010-8-9 09:25 编辑
写了个头文件,编译的时候总是提示unknown preprocessor command,但是我前边根本就没有用预编译指令,头文件如下。
extern UCHAR PG_RUN;
extern UINT target_speed; //目标全局风速定义
extern UINT measure_speed; //测量得到风速
extern UCHAR measure_speed_finish; //风速测量结束标志
extern UINT PG_counter; //电机中断检测
extern UINT PG_TBT_counter; //测速在TBT中的计数中转量
extern UINT PG_TBT_timer_num; //TBT中断计时数
extern UINT PG_TBT_COUNTER; //TBT脉冲宽度计时
//#define PG_MOTOR_PULSE P01 //PG电机驱动输出端口P01
extern UCHAR TC4_FLAG;
extern UCHAR SH_TC4_NUM ; //各个风级TC4赋值,只需8位即可
extern UCHAR HI_TC4_NUM ;
extern UCHAR ME_TC4_NUM ;
extern UCHAR LO_TC4_NUM ;
extern UCHAR VL_TC4_NUM ;
extern UCHAR SL_TC4_NUM ;
//#define SH 1300
//#define HI 1200
//#define ME 1000
//#define LO 900
//#define VL 700
//#define SL 600
//#define PULSE_WIDTH 4 //PG驱动脉冲宽度,0.256MS计数1
void PG_driver(void);
void PG_speed_check(void);
void PG_speed_change(void);
void PG_init(void); //PG电机驱初始化函数
编译过后,就是提示头文件的第一行 unknown preprocessor command,我以为有空格,但是删除了还是不行。 |