求大神帮看下代码,哪里出问题了?
res = f_open(&fs, "0:1.jpg",FA_OPEN_EXISTING | FA_READ );
res = f_open(&fs1, "0:2.jpg",FA_CREATE_ALWAYS | FA_WRITE );
if(res == 0)
{
LED_GREEN;
while(res == 0)
{
res = f_read(&fs,readbuff, sizeof(readbuff), &br);
if(res||br==0)break;
res = f_write(&fs1,readbuff,sizeof(readbuff),&br1);
if(res||br1<br)break;
}
}
f_close(&fs);
f_close(&fs1);
f_mount(NULL,"0:",1);
}
我昨天用还是好好的,但今天不知怎么就用不了了,我把整个wihie屏蔽或只留
res = f_read(&fs,readbuff, sizeof(readbuff), &fnum);
res = f_write(&fs1,readbuff, sizeof(readbuff),&fnum1);
这两行时,就可以用,但只能写 sizeof(readbuff)个字节,是while这个部分出什么问题了吗?
下求大神帮看下!!!!!!!!!!!
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>