res=f_open (&fil,"0:/message.txt", FA_CREATE_ALWAYS|FA_WRITE);
f_write (&fil, "alientek test", 50, &bww);
f_close(&fil);
sprintf(buf2,"%.1f %.1f %.1f %.1f",temper[0],temper[1],temper[2],temper[3]);
res=f_open (&fil,"0:/message.txt", FA_CREATE_ALWAYS|FA_WRITE);
f_lseek(&fil,fil.fsize);
//f_write (&fil,buf2, sizeof(buf2)-1, &bww);
f_puts(buf2,&fil);
f_close(&fil);
res=f_open (&fil,"0:/message.txt", FA_READ);
f_read (&fil, buf,100,&bww);
f_close(&fil);
LCD_ShowString(10,210,230,16,16,(u8 *)buf);
/********************end***************************/
为什么已经调用了f_lseek函数,最后还是只会显示第二次存储的数据?
一周热门 更多>