老师,这个问题今天莫名其妙的自己就好了。。。现在又出现了其他问题,详见如下代码:
[mw_shl_code=c,true]//显示“数据存储中。。。”界面
//数据存储中...
LCD_Fill(15,205,300,238,BLUE); //画一个方块
Backcolor_flag = 1; //绘点背景色为蓝色
POINT_COLOR = RED; //设置画笔颜色为红色
LCD_ShowChinese(30,207,41,30,0); //数
LCD_ShowChinese(55,207,66,30,0); //据
LCD_ShowChinese(80,207,67,30,0); //存
LCD_ShowChinese(105,207,68,30,0);//储
LCD_ShowChinese(130,207,69,30,0);//中
LCD_ShowChinese(155,202,0,18,0); //.
LCD_ShowChinese(170,202,1,18,0); //.
LCD_ShowChinese(185,202,2,18,0); //.
POINT_COLOR = WHITE; //设置画笔颜色为白色
//获取当前时间
currenttime[0] = Systime_year/10;
currenttime[1] = Systime_year%10;
currenttime[2] = Systime_month/10;
currenttime[3] = Systime_month%10;
currenttime[4] = Systime_day/10;
currenttime[5] = Systime_day%10;
currenttime[6] = Systime_hour/10;
currenttime[7] = Systime_hour%10;
currenttime[8] = Systime_minute/10;
currenttime[9] = Systime_minute%10;
currenttime_ptr = InttoStr(currenttime);
//将当前时间以字符串的形式存储起来
for(i = 0;i<15;i++)
currenttime_str = *(currenttime_ptr+i);
//以当前时间为名字建立一个文件
f_open(&fdst,currenttime_str,FA_OPEN_ALWAYS|FA_WRITE);
// //将数据存储到该文件中
// f_write(&fdst,Head_text,sizeof(Head_text),&bw);//存储“4微米 6微米 14微米 21微米 污染度等级”
// f_lseek(&fdst,sizeof(Head_text)-1);
// for(line2 = 0;line2 < 2; line2++)
// {
// for(NumofData = 0;NumofData < 65;NumofData++)
// {
// Content_text[NumofData] = TestingData[line2][NumofData];
// }
// f_write(&fdst,Content_text,sizeof(Content_text),&bw);
// f_lseek(&fdst,sizeof(Head_text)-1+(sizeof(Content_text)-1)*(line2+1));
// }
f_close(&fdst);
//数据存储完成后,显示“数据存储完成!”
LCD_Fill(15,200,300,238,BLUE); //覆盖“数据存储中。。。”
Backcolor_flag = 1; //绘点背景色为蓝色
POINT_COLOR = RED; //设置画笔颜色为红色
LCD_ShowChinese(30,207,41,30,0); //数
LCD_ShowChinese(55,207,66,30,0); //据
LCD_ShowChinese(80,207,67,30,0); //存
LCD_ShowChinese(105,207,68,30,0);//储
LCD_ShowChinese(130,207,70,30,0);//完
LCD_ShowChinese(155,207,71,30,0);//成
LCD_ShowChinese(180,207,65,30,0); //!
LCD_ShowChinese(195,207,65,30,0); //!
LCD_ShowChinese(210,207,65,30,0); //!
POINT_COLOR = WHITE; //设置画笔颜色为白色
GPIO_ResetBits(GPIOE,GPIO_Pin_1); //PE.1 输出高[/mw_shl_code]
|