寻求基于CH375主机模式的c源代码

谁能发一份基于CH375主机模式的c源代码给我吗?我急用,需要底层的库文件,沁恒只给出了简单的文件级系统,没有给出USB底层读写源程序

主要是下列程序的源代码: extern UINT8 CH375GetVer( void ); /* 获取当前子程序库的版本号 */ extern void CH375Reset( void ); /* 复位CH375 */ extern UINT8 CH375Init( void ); /* 初始化CH375 */ extern UINT8 CH375DiskConnect( void ); /* 检查磁盘是否连接 */ extern UINT8 CH375DiskReady( void ); /* 查询磁盘是否准备好 */ extern void CH375DirtyBuffer( void ); /* 清除磁盘缓冲区 */ extern UINT8 CH375FileOpen( void ); /* 打开文件或者枚举文件 */ extern UINT8 CH375FileClose( void ); /* 关闭当前文件 */ #ifdef EN_DISK_WRITE extern UINT8 CH375FileErase( void ); /* 删除文件并关闭 */ extern UINT8 CH375FileCreate( void ); /* 新建文件并打开,如果文件已经存在则先删除后再新建 */ #endif extern UINT8 CH375FileModify( void ); /* 查询或者修改当前文件的信息 */ extern UINT8 CH375FileLocate( void ); /* 移动当前文件指针 */ extern UINT8 CH375FileReadX( void ); /* 从当前文件读取数据到指定缓冲区 */ #ifdef EN_DISK_WRITE extern UINT8 CH375FileWriteX( void ); /* 向当前文件写入指定缓冲区的数据 */ #endif #ifdef EN_BYTE_ACCESS extern UINT8 CH375ByteLocate( void ); /* 以字节为单位移动当前文件指针 */ extern UINT8 CH375ByteRead( void ); /* 以字节为单位从当前位置读取数据块 */ #ifdef EN_DISK_WRITE extern UINT8 CH375ByteWrite( void ); /* 以字节为单位向当前位置写入数据块 */ #endif #endif extern UINT8 CH375DiskSize( void ); /* 查询磁盘容量 */ extern UINT8 CH375DiskQuery( void ); /* 查询磁盘信息 */ #ifdef EN_SAVE_VARIABLE extern void CH375SaveVariable( void ); /* 备份/保存/恢复子程序库的变量,用于子程序库在多个CH375芯片之间进行切换 */ #endif extern UINT8 CH375BulkOnlyCmd( void ); /* 执行基于BulkOnly协议的命令 */ extern UINT8 CH375sDiskReady( void ); /* 查询磁盘是否准备好,支持CH375S */ 希望有的支持一下


底层的读写程序,也就是扇区读写。 下载CH375EVT.ZIP,参考CH375EVT\PUB\MCS51C\MISCELL下的示例,可免费提供的,也就这么多。 另,我司有另外一份CH375文件系统源码CH375SR2(与公版的库源码不同),如有需要请致电销售:025-52638355/77/88/99


需要最关键的两个函数: extern UINT8 CH375FileReadX( void ); extern UINT8 CH375FileClose( void );


这两个函数的源码是不会提供的 (1)CH375FileReadX也就是调用底层的读扇区,示例中也有读扇区的过程 (2)CH375FileClose主要是更新了文件长度,即把文件长度写入目录项


我买了两片CH375的芯片,是沁恒公司的,但是沁恒没有给出底层代码,让我的工作做起来很难,不知道你是那个公司的,如果不行,我只好自己做底层了


用下载的代码写出的文件级程序运行不了,能不能提示一下,怎么做才能让CH375读写U盘?


我是指如果下载的程序可以完成读写的话,希望你能指点一下,如果下载的程序就是个框架,那在不批量购买CH375的时候,底层是不是只能购买?


用我们的子程序库就可以了,应该能满足您的要求.不知道您用的MCU是什么型号的?低层的程序我们封装起来了,您看不到代码.


用的是宏晶的89C52RC,程序编译后大体上有如下的警告,不知道是为什么?请指点一下 Build target 'Target 1' compiling test5.c... TEST5.C(149): warning C206: 'CH375FileWrite': missing function-prototype TEST5.C(162): warning C206: 'LED_OUT_INIT': missing function-prototype TEST5.C(211): warning C206: 'CH375FileRead': missing function-prototype TEST5.C(241): warning C206: 'get_adc_data': missing function-prototype assembling STARTUP.A51... linking... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CH375FILEENUMER?TEST5 *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?CH375FILEQUERY?TEST5 *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?XDELAY100US?TEST5 *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?XDELAYAFTERWRITE?TEST5 *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?XFILENAMEENUMER?TEST5 *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECREATE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILELOCATE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEWRITEX MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEMODIFY MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375LIBCONFIG MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECLOSE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEREAD MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKREADY MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEWRITE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INIT MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKSTATUS MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEOPEN MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: LED_OUT_INIT MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: GET_ADC_DATA MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKSIZE MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: PDISK_BASE_BUF MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375GETVER MODULE: test5.obj (TEST5) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: test5.obj (TEST5) ADDRESS: 09AEH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEMODIFY MODULE: test5.obj (TEST5) ADDRESS: 099EH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08D6H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08D9H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08DEH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08E4H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08E6H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08EBH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08EFH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: test5.obj (TEST5) ADDRESS: 08F4H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375LIBCONFIG MODULE: test5.obj (TEST5) ADDRESS: 0929H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375GETVER MODULE: test5.obj (TEST5) ADDRESS: 092CH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: test5.obj (TEST5) ADDRESS: 0938H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: test5.obj (TEST5) ADDRESS: 093BH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INIT MODULE: test5.obj (TEST5) ADDRESS: 093EH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEWRITEX MODULE: test5.obj (TEST5) ADDRESS: 0729H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 0745H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 0748H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 074EH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 0750H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 0760H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 0763H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 0768H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 076DH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 0789H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 078CH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 078FH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: test5.obj (TEST5) ADDRESS: 0792H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEMODIFY MODULE: test5.obj (TEST5) ADDRESS: 07B2H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILELOCATE MODULE: test5.obj (TEST5) ADDRESS: 07C3H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEWRITE MODULE: test5.obj (TEST5) ADDRESS: 07D8H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 07EFH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 07F2H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 07F8H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: FILE_DATA_BUF MODULE: test5.obj (TEST5) ADDRESS: 07FAH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: LED_OUT_INIT MODULE: test5.obj (TEST5) ADDRESS: 0360H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL


52单片机的资源不够. 出现上述错误和警告,可能是库连接不正确,请参考: /bbs/View.asp?S=101&I=1511


出一下警告是为什么?我连接的没什么错误啊。资料n 多,看的我眼花缭乱

*** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 0023H *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 002FH *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 0033H *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 0048H *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 00FFH *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 2584H *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 20FFH *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: MCMDPARAM MODULE: E:\U盘\MCS51\FILELIB5\CH375HF5.LIB (CH375MAI) ADDRESS: 2125H


不能发图片,如果你们能看到图片也许更能明白问题在那


TEST5.C(149): warning C206: 'CH375FileWrite': missing function-prototype TEST5.C(162): warning C206: 'LED_OUT_INIT': missing function-prototype TEST5.C(211): warning C206: 'CH375FileRead': missing function-prototype TEST5.C(241): warning C206: 'get_adc_data': missing function-prototype

这些么有写程序


做了个例子请参考:UploadImages/200810201515456.rar


非常感谢版主的帮助,我们准备把CH375用在油田钻井测量设备的数据采集上,U盘做好就一切OK了


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