Uint16 WriteReqDataBlock(Uint08 *Buf)
{
Uint16 BlockLen,BlockLenBak;
SendCmdToCh376(WriteReqData);
BlockLenBak=BlockLen=GetCh376IntStatus();
if(BlockLen)
{
do
{
//SendOneByteToCh376(*Buf++);
SendOneByteToCh376('1');
}while(--BlockLen);
}
return(BlockLenBak);
}
void ByteWriteCh376(Uint08 *Buf,Uint32 Len)
{
Uint16 BlockLen;
SendCmdToCh376(Byte_Write);
SendOneByteToCh376((Uint08)Len);
SendOneByteToCh376((Uint08)(Len>>8));
while(1)
{
if(GetCh376IntStatus() == USB_DISK_WRITE)
{
BlockLen=WriteReqDataBlock(Buf);
SendCmdToCh376(Byte_Write_Go);
Buf = Buf + BlockLen;
}
else
{
CloseFile();
break;
}
}
}
如图
程序中写入的都是1,但是出现了不希望的字符,且每次请求都有不希望的字符出现。及时是新创建的文件,没有打开更没有写数据,也有一个不希望的字符。