Răsfoiți Sursa

clean up usbd auto desc

hathach 7 ani în urmă
părinte
comite
15cd30629a
2 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 2
      src/device/usbd_desc.c
  2. 0 1
      src/device/usbd_pvt.h

+ 2 - 2
src/device/usbd_desc.c

@@ -254,7 +254,7 @@ desc_auto_cfg_t const _desc_auto_config_struct =
           .bInterfaceClass    = TUSB_CLASS_CDC,
           .bInterfaceSubClass = CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL,
           .bInterfaceProtocol = CDC_COMM_PROTOCOL_ATCOMMAND,
-          .iInterface         = 0x04
+          .iInterface         = 4
       },
 
       .header =
@@ -352,7 +352,7 @@ desc_auto_cfg_t const _desc_auto_config_struct =
           .bInterfaceClass    = TUSB_CLASS_MSC,
           .bInterfaceSubClass = MSC_SUBCLASS_SCSI,
           .bInterfaceProtocol = MSC_PROTOCOL_BOT,
-          .iInterface         = 0 // ITF_NUM_MSC + 3
+          .iInterface         = 4 + CFG_TUD_CDC
       },
 
       .ep_out =

+ 0 - 1
src/device/usbd_pvt.h

@@ -68,7 +68,6 @@ tusb_error_t usbd_open_edpt_pair(uint8_t rhport, tusb_desc_endpoint_t const* p_d
       STASK_ASSERT_ERR( err );\
     }\
     /* No need to wait for status to complete therefore */ \
-    /* status phase must not call dcd_control_complete/dcd_xfer_complete*/ \
     dcd_control_status(_rhport, _dir);\
   }while(0)