CH376寫U盤成功,讀U盤時返回值全是0x1D,為什么

void CH376_Test(u8 Cmd)
{
?u8 name[10][60]={ /*0*/{"/KGTXCSY"},
????????????????????????????????? /*1*/{"/KGTXCSY/1-1000.TXT"},
????????? ????????????????????????/*2*/{"12345"},
????????? ??????????????????????? /*3*/{"1"},
?????????????????????????????????};

u8 text[30]={0};
?u16 i=0;
?switch(Cmd)
?{
??case 1:
????????????? CH376DirCreate(name[0]);??
????? ????????i=CH376FileOpenPath(name[1]);
????? ????????while(bbb!=USB_INT_SUCCESS)
????????????? {
?????????????????? i=CH376FileCreatePath(name[1]);
????????????? }
?????
????? ????????i=CH376ByteLocate(0xFFFFFFFF);
????? ????????i=CH376ByteWrite(name[2],8,NULL);
????? ????????i=CH376FileClose(1);
????????????? break;
??case 2:i=CH376FileOpenPath(name[1]);

????????????? i=CH376ByteLocate(0);
???????????? ?i=CH376ByteRead(text,8,NULL);
????????????? i=CH376FileClose(1);
????????????? ?break;
??default:break;
?}

U盤初始化部分略,執(zhí)行函數(shù)CH376_Test(1),寫如數(shù)據(jù)成功12345,緊接著執(zhí)行函數(shù)CH376_Test(2),數(shù)組text中0~28均為0x1D。求大俠解圍

這段代碼除了變量bbb需換成i之外沒有什么問題,可以查一下數(shù)組是否溢出等問題。


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频