我用lpc2214控制ch375读u盘,搜索并打开文件,然后读文件到mbuffer,程序如下: for(c=0;c<255;c++) { sercpy((char *)mCmdParam.Enumer.mPathName,“/*”); for(i=0;mCmdParam.Enumer.mPathName[i]!=0;i++) mCmdParam.Enumer.mPathName[i]=c; i=CH375FileEnumer(); if(i==ERR_MISS_FILE)break; if(i==ERR_SUCCESS) { sercpy((char *)mCmdParam.Open.mPathName,(char *) mCmdParam.Enumer.mPathName); i=CH375FileOpen(); if(i==ERR_MISS_DIR|i==ERR_MISS_FILE)break; mCmdParam.ByteRead.mByteCount=32; while(mCmdParam.ByteRead.mByteCount=32; ) i=CH375ByteRead(); if(i!=ERR_SUCCESS) if(mCmdParam.ByteRead.mByteCount<32) { mCmdParam.ByteRead.mByteCount=(32-mCmdParam.ByteRead.mByteCount); CH375ByteRead(); } .......................... /*此省略将读出的数据块传送出去的程序,每次传32字节*/ .......................... } }
麻烦帮我看看这个程序问题在哪,我运行到i=CH375ByteRead();这一步时i值为0xb4(文件已关闭),这是为什么呢?