用ch376主機模式下讀取U盤中的文件,超出buf的部分一直讀不到,既不能循環(huán)讀取大文件 uchar RW_File(uchar *ScrFileName,uchar *TarFileName,uchar *buf) { uchar TotalCount=128,s; UINT16 ThisLen; UINT32 ByteCount=0,FileSize; s=CH376FileCreate(TarFileName); if(s!=USB_INT_SUCCESS) return s; do { s=CH376FileOpen(ScrFileName); Delayms( 10 ); if(s!=USB_INT_SUCCESS) { return s; } if(ByteCount==0) { FileSize=CH376GetFileSize(); } else { s=CH376ByteLocate(ByteCount); if(s!=USB_INT_SUCCESS) return s; } s=CH376ByteRead(buf,TotalCount,&ThisLen); Delayms( 10 ); if(s!=USB_INT_SUCCESS) { return s; } s=CH376FileClose(TRUE); if(s!=USB_INT_SUCCESS) return s; s=CH376FileOpen(TarFileName); if(s!=USB_INT_SUCCESS) return s; if(ByteCount!=0) { s=CH376ByteLocate(ByteCount); if(s!=USB_INT_SUCCESS) return s; } s=CH376ByteWrite(buf,TotalCount,NULL); if(s!=USB_INT_SUCCESS) return s; s=CH376FileClose(TRUE); if(s!=USB_INT_SUCCESS) return s; ByteCount +=ThisLen; if(ThisLen { if(ByteCount!=FileSize) break; } }while(ByteCount return USB_INT_SUCCESS; } 這是我的操作函數(shù),請各位大大抽空看下,找找錯誤、、、調(diào)了好久還是不通,這個單步到第二次就會出錯,監(jiān)測不到中斷,全速的時候也只能讀寫一次(只有一個buf的大?。?。。。拜求指導(dǎo)