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盘初始化部分略,执行函数CH376_Test(1),写如数据成功12345,紧接着执行函数CH376_Test(2),数组text中0~28均为0x1D。求大侠解围