void write_data_to_usb(u8* data_buffer, u8 data_len)
{
u8 res=1;
UINT bw;
res = f_open(fsrc, "2:/test.txt" , FA_OPEN_ALWAYS|FA_READ|FA_WRITE);
if(res == 0)
{
f_lseek (fsrc, (fsrc->fsize)+1);
f_write(fsrc, data_buffer , data_len, &bw);
delay_ms(500);
}
myfree(SRAMIN, fsrc);
f_close(fsrc);
}
有帮助给个回复哈,谢谢。 |