感觉资料里的程序有错误
UINT8CH376ReadBlock( PUINT8 buf ) /* 从当前主机端点的接收缓冲区读取数据块,返回长度 */
{
UINT8s, l;
xWriteCH376Cmd( CMD01_RD_USB_DATA0 );
s = l = xReadCH376Data( ); /* 长度 */
if ( l ) {
do {
*buf = xReadCH376Data( );
buf ++;
} while ( -- l );
}
xEndCH376Cmd( );
return( s );
});
//}
s = CH376ReadBlock( buf ); /* 如果需要,可以读取数据块CH376_CMD_DATA.DiskMountInq,返回长度 */
//if ( s == sizeof( INQUIRY_DATA ) ) { /* U盘的厂商和产品信息 */
//buf[ s ] = 0;
//printf( "UdiskInfo: %s\n", ((P_INQUIRY_DATA)buf) -> VendorIdStr );
//}