我用lpc2214控制ch375讀u盤(pán),搜索并打開(kāi)文件,然后讀文件到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(); } .......................... /*此省略將讀出的數(shù)據(jù)塊傳送出去的程序,每次傳32字節(jié)*/ .......................... } }
麻煩幫我看看這個(gè)程序問(wèn)題在哪,我運(yùn)行到i=CH375ByteRead();這一步時(shí)i值為0xb4(文件已關(guān)閉),這是為什么呢?