@@ -33,6 +33,9 @@ USBD_DESC_PRODUCT_DEFINE(sample_product, CONFIG_SAMPLE_USBD_PRODUCT);
3333USBD_DESC_SERIAL_NUMBER_DEFINE (sample_sn );
3434/* doc string instantiation end */
3535
36+ USBD_DESC_CONFIG_DEFINE (fs_cfg_desc , "FS Configuration" );
37+ USBD_DESC_CONFIG_DEFINE (hs_cfg_desc , "HS Configuration" );
38+
3639/* doc configuration instantiation start */
3740static const uint8_t attributes = (IS_ENABLED (CONFIG_SAMPLE_USBD_SELF_POWERED ) ?
3841 USB_SCD_SELF_POWERED : 0 ) |
@@ -42,12 +45,12 @@ static const uint8_t attributes = (IS_ENABLED(CONFIG_SAMPLE_USBD_SELF_POWERED) ?
4245/* Full speed configuration */
4346USBD_CONFIGURATION_DEFINE (sample_fs_config ,
4447 attributes ,
45- CONFIG_SAMPLE_USBD_MAX_POWER );
48+ CONFIG_SAMPLE_USBD_MAX_POWER , & fs_cfg_desc );
4649
4750/* High speed configuration */
4851USBD_CONFIGURATION_DEFINE (sample_hs_config ,
4952 attributes ,
50- CONFIG_SAMPLE_USBD_MAX_POWER );
53+ CONFIG_SAMPLE_USBD_MAX_POWER , & hs_cfg_desc );
5154/* doc configuration instantiation end */
5255
5356/*
@@ -69,6 +72,7 @@ static void sample_fix_code_triple(struct usbd_context *uds_ctx,
6972 /* Always use class code information from Interface Descriptors */
7073 if (IS_ENABLED (CONFIG_USBD_CDC_ACM_CLASS ) ||
7174 IS_ENABLED (CONFIG_USBD_CDC_ECM_CLASS ) ||
75+ IS_ENABLED (CONFIG_USBD_CDC_NCM_CLASS ) ||
7276 IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
7377 /*
7478 * Class with multiple interfaces have an Interface
@@ -159,8 +163,8 @@ struct usbd_context *sample_usbd_init_device(usbd_msg_cb_t msg_cb)
159163 }
160164
161165 if (IS_ENABLED (CONFIG_SAMPLE_USBD_20_EXTENSION_DESC )) {
162- (void )usbd_device_set_bcd (& sample_usbd , USBD_SPEED_FS , 0x0201 );
163- (void )usbd_device_set_bcd (& sample_usbd , USBD_SPEED_HS , 0x0201 );
166+ (void )usbd_device_set_bcd_usb (& sample_usbd , USBD_SPEED_FS , 0x0201 );
167+ (void )usbd_device_set_bcd_usb (& sample_usbd , USBD_SPEED_HS , 0x0201 );
164168
165169 err = usbd_add_descriptor (& sample_usbd , & sample_usbext );
166170 if (err ) {
0 commit comments