现在可以建立文件名,但是写数据时,s = Wait376Interrupt( );,s值总是0X14;函数如下:
UINT8 CH376ByteWrite( PUINT8 buf, UINT16 ReqCount, PUINT16 RealCount ) /* 以字节为单位向当前位置写入数据块 */ { UINT8 s; WriteCH376Cmd( CMD2H_BYTE_WRITE ); WriteCH376Data( (UINT8)ReqCount ); WriteCH376Data( (UINT8)(ReqCount>>8) ); EndCH376Cmd( ); if ( RealCount ) *RealCount = 0; while ( 1 ) { s = Wait376Interrupt( ); Dlayms(100); if ( s == USB_INT_DISK_WRITE ) { s = CH376WriteReqBlock( buf ); /* 向内部指定缓冲区写入请求的数据块,返回长度 */ WriteCH376Cmd( CMD0H_BYTE_WR_GO ); EndCH376Cmd( ); buf += s; if ( RealCount ) *RealCount += s; } /* else if ( s == USB_INT_SUCCESS ) return( s );*/ /* 结束 */ else return( s ); /* 错误 */ } }