用CH375生成单个文件的时候,莫名的多出来10多个文件夹和文件,乱码的文件名字。不知道为什么?谁有这方面的经验介绍介绍啊,我真的是不知道为什么了,
strcpy((uchar *)mCmdParam.Open.mPathName,"/AAA/AAA0000.BIN"); mCmdParam.Open.mPathName[11]=Head_Rote[0]; mCmdParam.Open.mPathName[12]=Head_Rote[1]; mCmdParam.Open.mPathName[13]=Head_Rote[2]; mCmdParam.Open.mPathName[14]=Head_Rote[3]; i = CH375FileOpen( ); if(i==ERR_SUCCESS) { i=CH375FileClose(); } else if ( i == ERR_MISS_FILE ) { for(Ct=0;Ct strcpy((uchar *)mCmdParam.Open.mPathName,"/AAA/AAA0000.BIN"); mCmdParam.Open.mPathName[11]=Head_Rote[0]; mCmdParam.Open.mPathName[12]=Head_Rote[1]; mCmdParam.Open.mPathName[13]=Head_Rote[2]; mCmdParam.Open.mPathName[14]=Head_Rote[3]; i = CH375FileCreate(); mCmdParam.Modify.mFileSize = 0xFFFFFFFF; mCmdParam.Modify.mFileAttr = 0xff; /* 输入参数: 新的文件属性,为0FFH则不修改 */ mCmdParam.Modify.mFileTime = MAKE_FILE_TIME(bcd_sec(Rtime[2]),bcd_sec(Rtime[1]),bcd_sec(Rtime[0])); mCmdParam.Modify.mFileDate = MAKE_FILE_DATE(bcd_sec(Rtime[6])+2000,bcd_sec(Rtime[5]),bcd_sec(Rtime[4])); i = CH375FileModify( ); /* 修改当前文件的信息,修改文件长度 */ i=CH375FileClose(); if(i!=ERR_SUCCESS) DispUsbErro(i); //initial file for(Ct=0;Ct strcpy((uchar *)mCmdParam.Open.mPathName,"/AAA/AAA0000.BIN"); mCmdParam.Open.mPathName[11]=Head_Rote[0]; mCmdParam.Open.mPathName[12]=Head_Rote[1]; mCmdParam.Open.mPathName[13]=Head_Rote[2]; mCmdParam.Open.mPathName[14]=Head_Rote[3];
i = CH375FileOpen( ); for(i=0;i<4;i++) FILE_DATA_BUF[File_Data+i]=0; FILE_DATA_BUF[4] =Rtime[6]; // 写入年月日 FILE_DATA_BUF[5]=Rtime[5]; FILE_DATA_BUF[6]=Rtime[4]; FILE_DATA_BUF[7]=Rtime[2]; // 写入时分 FILE_DATA_BUF[8]=Rtime[1]; mCmdParam.Locate.mSectorOffset=0; CH375FileLocate(); mCmdParam.WriteX.mDataBuffer=&FILE_DATA_BUF[0]; mCmdParam.WriteX.mSectorCount=1; CH375FileWriteX(); i=CH375FileClose(); }
你好,这个问题已在邮件中回复。