求助ch375的问题

我用WinAVR进行编译时出现了,如下错误,请问该怎么修改啊?CH375_INT_WIRE这个是给的库里的ch375hfb.h里面的,它也没有定义,请问我该如何定义?该函数如下: void xQueryInterrupt( void ) /* 查询CH375中断并更新中断状态 */ { while ( CH375_INT_WIRE ); /* 如果CH375的中断引脚输出高电平则等待 */ xWriteCH375Cmd( CMD_GET_STATUS ); /* 获取当前中断状态,发出命令后至少延时2uS */ CH375IntStatus = xReadCH375Data( ); /* 获取中断状态 */ if ( CH375IntStatus == USB_INT_DISCONNECT ) CH375DiskStatus = DISK_DISCONNECT; /* 检测到USB设备断开事件 */ else if ( CH375IntStatus == USB_INT_CONNECT ) CH375DiskStatus = DISK_CONNECT; /* 检测到USB设备连接事件 */ }

> "make.exe" all

-------- begin -------- avr-gcc (GCC) 3.4.3 Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: CH375HFT.c avr-gcc -c -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=7.372800UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=CH375HFT.lst -std=gnu99 -MD -MP -MF .dep/CH375HFT.o.d CH375HFT.c -o CH375HFT.o In file included from CH375HFT.c:28: CH375HFB.h: In function `xQueryInterrupt': CH375HFB.h:675: error: `CH375_INT_WIRE' undeclared (first use in this function) CH375HFB.h:675: error: (Each undeclared identifier is reported only once CH375HFB.h:675: error: for each function it appears in.) CH375HFT.c: At top level: CH375HFT.c:53: warning: function declaration isn't a prototype CH375HFT.c:59: warning: function declaration isn't a prototype CH375HFT.c:141: warning: function declaration isn't a prototype CH375HFT.c:141: warning: return type of 'main' is not `int' make.exe: *** [CH375HFT.o] Error 1

> Process Exit Code: 2

还有 extern UINT8 CH375FileReadX( void );

...... UINT8 CH375FileRead( void ) /* 从当前文件读取数据 */ { mCmdParam.ReadX.mDataBuffer = &FILE_DATA_BUF[0]; /* 指向文件数据缓冲区 */ return( CH375FileReadX( ) ); } 可是仍然出现下面的错误 F:\BIYESHEJI\CH375LIB\AVR\FILELIBD\EXAM6/..\CH375HFD.H:675: undefined reference to `CH375FileReadX'

请问这是为什么?


有人在吗?帮我解决这个问题,不胜感激!


问题解决了,将原文件库链接进去就好了。


只有登录才能回复,可以选择微信账号登录