ch320v307代碼有bug嗎,高速給的是全速的描述符?

這一段沒看懂:

?/*?get?usb?other-speed?descriptor?*/
????????????????????????case?USB_DESCR_TYP_SPEED:
????????????????????????????if(?USBHS_DevSpeed?==?USBHS_SPEED_HIGH?)
????????????????????????????{
????????????????????????????????/*?High?speed?mode為啥高速模式拷貝的是fs的配置??*/
????????????????????????????????memcpy(?&TAB_USB_HS_OSC_DESC[?2?],?&MyCfgDescr_FS[?2?],?DEF_USBD_CONFIG_FS_DESC_LEN?-?2?);
????????????????????????????????pUSBHS_Descr?=?(?uint8_t?*?)&TAB_USB_HS_OSC_DESC[?0?];
????????????????????????????????len?=?DEF_USBD_CONFIG_FS_DESC_LEN;
????????????????????????????}
????????????????????????????else?if(?USBHS_DevSpeed?==?USBHS_SPEED_FULL?)
????????????????????????????{
????????????????????????????????/*?Full?speed?mode?這里正好反過來??*/
????????????????????????????????memcpy(?&TAB_USB_FS_OSC_DESC[?2?],?&MyCfgDescr_HS[?2?],?DEF_USBD_CONFIG_HS_DESC_LEN?-?2?);
????????????????????????????????pUSBHS_Descr?=?(?uint8_t?*?)&TAB_USB_FS_OSC_DESC[?0?];
????????????????????????????????len?=?DEF_USBD_CONFIG_HS_DESC_LEN;
????????????????????????????}
????????????????????????????else
????????????????????????????{
????????????????????????????????errflag?=?0xFF;
????????????????????????????}
????????????????????????????break;
/*?USB?Full-Speed?Mode,?Other?speed?configuration?Descriptor?*/
uint8_t?TAB_USB_FS_OSC_DESC[?sizeof(MyCfgDescr_HS)?]?=
{
????/*?Other?parts?are?copied?through?the?program?*/
????0x09,?0x07,
};

/*?USB?High-Speed?Mode,?Other?speed?configuration?Descriptor?*/
uint8_t?TAB_USB_HS_OSC_DESC[?sizeof(MyCfgDescr_FS)?]?=
{
????/*?Other?parts?are?copied?through?the?program?*/
????0x09,?0x07,
};


微信截圖_20230329113305.png

這里主機請求的描述符,全稱是:Other_speed_Configuration Descriptor

那當(dāng)然是返回另一種速度的描述符


好的,謝謝回答


這個usbhs device的代碼怎么測試呢?

我看是ep3收到后給ep4,目前ep3是out出去了,但是點ep4 in 卻調(diào)試xact錯誤,怎么測?


1680148606102201.png

1680148606126634.png



兄弟們,幫忙解答下呀


電腦請求的上傳長度需要等于設(shè)備端當(dāng)前包長度。

bushound那個界面執(zhí)行IN的時候,需要配置正確的數(shù)據(jù)長度。


我配置了,out是512,in也是512,in點run時他出錯會自動變成0,我傳給gif給你看


icon_rar.gifaa3.rar


我發(fā)現(xiàn) ep1 in 512 也是這個情況,我怎么接收數(shù)據(jù)呢?郁悶啊!



只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频