7171#include "usbd_msc_bot.h"
7272#include "usbd_msc_mem.h"
7373
74- #define USB_PYB_CONFIG_DESC_SIZ 98
74+ #define USB_PYB_CONFIG_DESC_SIZ (98)
7575
7676#define MSC_EPIN_SIZE MSC_MAX_PACKET
7777#define MSC_EPOUT_SIZE MSC_MAX_PACKET
@@ -150,7 +150,7 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
150150 HIBYTE (USB_PYB_CONFIG_DESC_SIZ ),
151151 0x03 , // bNumInterfaces: 3 interfaces
152152 0x01 , // bConfigurationValue: Configuration value
153- 0x00 , // iConfiguration: Index of string descriptor describing the configuration
153+ 0x04 , // iConfiguration: Index of string descriptor describing the configuration
154154 0x80 , // bmAttributes: bus powered; 0xc0 for self powered
155155 0xfa , // bMaxPower: in units of 2mA
156156
@@ -163,7 +163,7 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
163163 0x00 , // bFunctionClass: ?
164164 0x00 , // bFunctionSubClass: ?
165165 0x00 , // bFunctionProtocol: ?
166- 0x00 , // iFunction: index of string for this function
166+ 0x04 , // iFunction: index of string for this function
167167
168168 //--------------------------------------------------------------------------
169169 // Interface Descriptor
@@ -252,9 +252,9 @@ __ALIGN_BEGIN static uint8_t usbd_pyb_CfgDesc[USB_PYB_CONFIG_DESC_SIZ] __ALIGN_E
252252 USB_INTERFACE_DESCRIPTOR_TYPE , // bDescriptorType: interface descriptor
253253 0x02 , // bInterfaceNumber: Number of Interface
254254 0x00 , // bAlternateSetting: Alternate setting
255- 0x02 , // bNumEndpoints*/
255+ 0x02 , // bNumEndpoints
256256 0x08 , // bInterfaceClass: MSC Class
257- 0x06 , // bInterfaceSubClass : SCSI transparent*/
257+ 0x06 , // bInterfaceSubClass : SCSI transparent
258258 0x50 , // nInterfaceProtocol
259259 0x00 , // iInterface:
260260
@@ -397,6 +397,7 @@ static uint8_t usbd_pyb_Setup(void *pdev, USB_SETUP_REQ *req) {
397397
398398 // Standard Device Request ---------------------------------------------
399399 case (USB_REQ_TYPE_STANDARD | USB_REQ_RECIPIENT_DEVICE ):
400+ /*
400401 switch (req->bRequest) {
401402 case USB_REQ_GET_DESCRIPTOR:
402403 {
@@ -409,6 +410,7 @@ static uint8_t usbd_pyb_Setup(void *pdev, USB_SETUP_REQ *req) {
409410 return USBD_CtlSendData(pdev, pbuf, len);
410411 }
411412 }
413+ */
412414 break ;
413415
414416 // Standard Interface Request ------------------------------------------
0 commit comments