stm32f107 读u盘 并且创建文件 写入数据
if (file_fopen(&file,&efs.myFs,"HOSTDEMO.TXT",'w')==0)
{
/* Write buffer to file */
file_write(&file, 50, textFileBuffer);
LCD_DisplayStringLine(200,\
"-----------------------------------------");
LCD_DisplayStringLine(210, \
"HostDemo.TXT successfully created ");
/*close file and filesystem*/
file_fclose(&file);
fs_umount(&efs.myFs);
} |