讀取描述符,用375 命令可以正確讀出,但用控制方式寫讀描述符請求時,狀態(tài)回復0X28。有那位大大知道為什么
? CH375_Set_USBMode(5); ?
? while(CH375_Wait_INT() != USB_INT_CONNECT);
? DelayUs(200000);
? CH375_SetAddr(5);
? CH375_Set_Retry(50);
? status = CH375_Get_freq();
? if(status &0x10)
? {
? ? ?set_freq();
? }
? CH375_Reset_Device();//首先置7復位并延時10ms,然后置6并延時100ms
? Bsp_CH375_SetAddr(5);
? //Bsp_CH375_Get_USBDescr(1);//用CMD_GET_DESCR命令可以正確讀出描述符
? //len = CH375_Read_USBData(DataTemp);
? Request.Req.bmRequestType=0x80;
? Request.Req.bRequest=0x06;
? Request.Req.wValue=0x0100; ? ??
? Request.Req.wIndex=0x0000;
? Request.Req.wLength=0x0012;?
? CH375_Write_USBData(8,Request.Req_buf);
? CH375_Toggle_Send(); ?
? CH375_IssueToken( ( 0 << 4 ) | DEF_USB_PID_OUT );//最后狀態(tài)返回0X28
? len = CH375_Read_USBData(DataTemp);
??
? //CH375_Get_USBDescr(2);//用CMD_GET_DESCR命令可以正確讀出描述符
? //len = CH375_Read_USBData(DataTemp);
? Request.Req.bmRequestType=0x80;
? Request.Req.bRequest=0x06;
? Request.Req.wValue=0x0200; ? ??
? Request.Req.wIndex=0x0000;
? Request.Req.wLength=0x0009;
? CH375_Write_USBData(8,Request.Req_buf);
? CH375_Toggle_Send(); ?
? CH375_IssueToken( ( 0 << 4 ) | DEF_USB_PID_OUT );//最后狀態(tài)返回0X28
? len = CH375_Read_USBData(DataTemp);
? Bsp_CH375_SetConfig(DataTemp[5]);
不管哪種方式讀取描述符,后面寫數(shù)據(jù)都是狀態(tài)返回0X28