這一段沒看懂:
?/*?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, };
熱門產(chǎn)品 :
CH585: 集成高速USB和NFC的藍牙MCU