感覺資料里的程序有錯誤
UINT8CH376ReadBlock( PUINT8 buf ) ?/* 從當前主機端點的接收緩沖區(qū)讀取數(shù)據(jù)塊,返回長度 */
{
UINT8s, l;
xWriteCH376Cmd( CMD01_RD_USB_DATA0 );
s = l = xReadCH376Data( ); ?/* 長度 */
if ( l ) {
do {
*buf = xReadCH376Data( );
buf ++;
} while ( -- l );
}
xEndCH376Cmd( );
return( s );
});
//}
s = CH376ReadBlock( buf ); ?/* 如果需要,可以讀取數(shù)據(jù)塊CH376_CMD_DATA.DiskMountInq,返回長度 */
//if ( s == sizeof( INQUIRY_DATA ) ) { ?/* U盤的廠商和產(chǎn)品信息 */
//buf[ s ] = 0;
//printf( "UdiskInfo: %s\n", ((P_INQUIRY_DATA)buf) -> VendorIdStr );
//}