void CH376FileOpen( void ) /* 在根目錄或者當前目錄下打開文件或者目錄(文件夾) */ { unsigned char res = 0; unsigned char i,j; mDelaymS( 200 ); Nop(); i = 0; CH376WriteCmd( CMD10_SET_FILE_NAME );// 0x2F /* 設置文件名 */ CH376WriteData(FileName[0]); while ( FileName[i] ) { i++; Nop(); Nop(); if ( FileName[i] == DEF_SEPAR_CHAR1 || FileName[i] == DEF_SEPAR_CHAR2 ) FileName[i] = 0; /* 強行將文件名截止 */ Nop(); CH376WriteData( FileName[i] ); } Nop(); /* 延遲 */ Nop(); CH376WriteCmd( CMD50_WRITE_VAR32 ); CH376WriteData( VAR_CURRENT_CLUST ); CH376WriteData( 0 ); CH376WriteData( 0 ); CH376WriteData( 0 ); CH376WriteData( 0 ); Nop(); /* 延遲 */ Nop(); CH376WriteCmd( CMD0H_FILE_OPEN ); while( USB_INT ) //等待中斷 { Nop(); } mDelaymS( 100 ); CH376WriteCmd( CMD01_GET_STATUS);// 0x22 /* 獲取中斷狀態(tài)*/ res = CH376ReadData(); Nop(); /* 延遲 */ Nop(); Nop(); /* 延遲 */ Nop(); if( res == 0x14 ) { return; } while(1) { LcdOpenErr(); } }
根目錄下文件打開返回0x42 以上是子程序 其中 FileName[]儲存的是根目錄下的文件名 請問這是什么原因?