void EXTI0_IRQHandler(void)
{
char distance_str[59];
FIL file;
FRESULT res;
if(key==KEY_RemenberK)
{key=0;
{
sprintf(distance_str, "%6d %6.2f %6d %6d %6d %6d %6d %6.2f\r\n", LineN,startdistance,riverD,relativeD,nowdeep,countN,crossT,V);
res=f_open(&file,"/count.txt",FA_OPEN_ALWAYS);
if(res==FR_OK)
{
f_open(&file, "/count.txt", FA_READ | FA_WRITE | FA_OPEN_ALWAYS);
f_lseek(&file,f_size(&file));
res=f_write(&file, distance_str, sizeof(distance_str)-1,&bw);
f_close(&file);
}
}
EXTI_ClearITPendingBit(EXTI_Line0);
}
}
这是把一组数据用字符串存到sd卡, 但是我现在想把他读出来 并显示在LCD上, 有哪位做个类似的吗? |