diff --git a/samples/subsys/usb/dfu/src/usb_dfu.c b/samples/subsys/usb/dfu/src/usb_dfu.c index 68f7e5b2cc0..744415ad67a 100644 --- a/samples/subsys/usb/dfu/src/usb_dfu.c +++ b/samples/subsys/usb/dfu/src/usb_dfu.c @@ -197,8 +197,8 @@ static const u8_t dfu_mode_usb_description[] = { USB_CONFIGURATION_DESC_SIZE, /* Descriptor size */ USB_CONFIGURATION_DESC, /* Descriptor type */ /* Total length in bytes of data returned */ - LOW_BYTE(DFU_RUNTIME_CONF_SIZE), - HIGH_BYTE(DFU_RUNTIME_CONF_SIZE), + LOW_BYTE(DFU_MODE_CONF_SIZE), + HIGH_BYTE(DFU_MODE_CONF_SIZE), DFU_NUM_ITF, /* Number of interfaces */ 0x01, /* Configuration value */ 0x00, /* Index of the Configuration string */ diff --git a/samples/subsys/usb/dfu/src/usb_dfu.h b/samples/subsys/usb/dfu/src/usb_dfu.h index b17e5a0fc03..cb11764d301 100644 --- a/samples/subsys/usb/dfu/src/usb_dfu.h +++ b/samples/subsys/usb/dfu/src/usb_dfu.h @@ -116,11 +116,11 @@ enum dfu_state { * For DFU: CONF + ITF*ALT_SETTINGS + DFU) */ #define DFU_MODE_CONF_SIZE (USB_CONFIGURATION_DESC_SIZE + \ - USB_INTERFACE_DESC_SIZE * DFU_RUNTIME_ALTERNATE_SETTINGS + \ + USB_INTERFACE_DESC_SIZE * DFU_MODE_ALTERNATE_SETTINGS + \ USB_DFU_DESC_SIZE) #define DFU_RUNTIME_CONF_SIZE (USB_CONFIGURATION_DESC_SIZE + \ - USB_INTERFACE_DESC_SIZE * DFU_MODE_ALTERNATE_SETTINGS + \ + USB_INTERFACE_DESC_SIZE * DFU_RUNTIME_ALTERNATE_SETTINGS + \ USB_DFU_DESC_SIZE) /* Alternate settings are used to access additional memory segments.