初级会员

- 积分
- 62
- 金钱
- 62
- 注册时间
- 2015-6-9
- 在线时间
- 11 小时
|

楼主 |
发表于 2016-1-8 15:56:34
|
显示全部楼层
//写入的程序,通过串口能够显示写下的44*52数据,但我不清楚存储得是否正确
f_mount(0,&fs);
res_open = f_open(&file, "0:/file.txt",FA_OPEN_ALWAYS|FA_WRITE );
if (res_open==FR_OK)
{
printf("\r\n f_open() success .. \r\n");
res_w=f_write(&file, buffer_W,sizeof(buffer_W), &bw);
if(res_w==FR_OK)
{
printf(" \r\n f_write() success .. \r\n");
for(r=0;r<44;r++)
{
for(l=0;l<52;l++)
{
printf("%.1f ", buffer_W[r][l]);
}
printf("\r\n");
}
printf(" \r\n %d", bw);
}
f_close(&file);
} |
|