高中生
最后登录1970-1-1
在线时间 小时
注册时间2015-12-21
|
- int SD_text()
- {
- /* function disk_initialize() has been called in f_open */
-
- /* Create new file on the drive 0 */
- res = f_open(&fnew, "0:newfile.txt", FA_OPEN_ALWAYS | FA_WRITE );
-
- if ( res == FR_OK )
- {
-
- ILI9341_DispString_EN ( 60, 250, "start writing", macBACKGROUND, macRED );
- }
- f_lseek(&fnew,fnew.fsize);
- res = f_write(&fnew, textFileBuffer, sizeof(textFileBuffer)-1, &bw);
-
- f_close(&fnew);
- f_mount(0, NULL);
- }
- int juece()
- {
-
- textFileBuffer[0]=Num[0];
- textFileBuffer[1]=Num[1];
- textFileBuffer[2]=' ';
- textFileBuffer[3]='\0';
- SD_text();
- }
- int main ( void )
- {
-
-
- f_mount(0,&fs);
-
- while(1)
- {
- Fasongjieshou_232();
- Fasongjieshou_485();
-
-
- if(KalmanBegin<20)
- {
- KalmanBegin++;
- }
- else juece();
- }
- }
复制代码
|
|