file_sys.c中的內(nèi)容我沒(méi)有改過(guò)啊,如下:
void?? ?CH376SetFileName( PUINT8 name )? /* 設(shè)置將要操作的文件的文件名 */
{
/*?? ?UINT8?? ?i;*/
?? ?UINT8?? ?c;
#ifndef?? ?DEF_IC_V43_U
?? ?UINT8?? ?s;
?? ?xWriteCH376Cmd( CMD01_GET_IC_VER );
?? ?if ( xReadCH376Data( ) < 0x43 ) {
?? ??? ?if ( CH376ReadVar8( VAR_DISK_STATUS ) < DEF_DISK_READY ) {
?? ??? ??? ?xWriteCH376Cmd( CMD10_SET_FILE_NAME );
?? ??? ??? ?xWriteCH376Data( 0 );
?? ??? ??? ?s = CH376SendCmdWaitInt( CMD0H_FILE_OPEN );
?? ??? ??? ?if ( s == USB_INT_SUCCESS ) {
?? ??? ??? ??? ?s = CH376ReadVar8( 0xCF );
?? ??? ??? ??? ?if ( s ) {
?? ??? ??? ??? ??? ?CH376WriteVar32( 0x4C, CH376ReadVar32( 0x4C ) + ( (UINT16)s << 8 ) );
?? ??? ??? ??? ??? ?CH376WriteVar32( 0x50, CH376ReadVar32( 0x50 ) + ( (UINT16)s << 8 ) );
?? ??? ??? ??? ??? ?CH376WriteVar32( 0x70, 0 );
?? ??? ??? ??? ?}
?? ??? ??? ?}
?? ??? ?}
?? ?}
#endif
?? ?xWriteCH376Cmd( CMD10_SET_FILE_NAME );
?? ?/*for ( i = MAX_FILE_NAME_LEN; i != 0; -- i ) {
?? ??? ?c = *name;
?? ??? ?xWriteCH376Data( c );
?? ??? ?if ( c == 0 ) break;
?? ??? ?name ++;
?? ?}*/
?? ?c = *name;
?? ?xWriteCH376Data( c );
?? ?while ( c ) {
?? ??? ?name ++;
?? ??? ?c = *name;
?? ??? ?if ( c == DEF_SEPAR_CHAR1 || c == DEF_SEPAR_CHAR2 ) c = 0;? /* 強(qiáng)行將文件名截止 */
?? ??? ?xWriteCH376Data( c );
?? ?}
?? ?xEndCH376Cmd( );
}