void write_data_to_usb(u8* data_buffer, u8 data_len)
{
u8 res=1;
UINT bw;
fsrc =(FIL*)mymalloc(SRAMIN,sizeof(FIL));
res = f_open(fsrc, "2:/test.csv" , 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);
}
一周热门 更多>