File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,6 @@ struct usb_association_descriptor {
220220#define USB_SCD_RESERVED BIT(7)
221221#define USB_SCD_SELF_POWERED BIT(6)
222222#define USB_SCD_REMOTE_WAKEUP BIT(5)
223- #define USB_SCD_ATTRIBUTES (USB_SCD_RESERVED | \
224- COND_CODE_1(CONFIG_USB_SELF_POWERED, \
225- (USB_SCD_SELF_POWERED), (0)) | \
226- COND_CODE_1(CONFIG_USB_DEVICE_REMOTE_WAKEUP, \
227- (USB_SCD_REMOTE_WAKEUP), (0)))
228223
229224/** USB Defined Base Class Codes from https://www.usb.org/defined-class-codes */
230225#define USB_BCC_AUDIO 0x01
Original file line number Diff line number Diff line change @@ -155,7 +155,11 @@ struct dev_dfu_mode_descriptor dfu_mode_desc = {
155155 .bNumInterfaces = 1 ,
156156 .bConfigurationValue = 1 ,
157157 .iConfiguration = 0 ,
158- .bmAttributes = USB_SCD_ATTRIBUTES ,
158+ .bmAttributes = USB_SCD_RESERVED |
159+ COND_CODE_1 (CONFIG_USB_SELF_POWERED ,
160+ (USB_SCD_SELF_POWERED ), (0 )) |
161+ COND_CODE_1 (CONFIG_USB_DEVICE_REMOTE_WAKEUP ,
162+ (USB_SCD_REMOTE_WAKEUP ), (0 )),
159163 .bMaxPower = CONFIG_USB_MAX_POWER ,
160164 },
161165 .sec_dfu_cfg = {
Original file line number Diff line number Diff line change @@ -90,7 +90,11 @@ USBD_DEVICE_DESCR_DEFINE(primary) struct common_descriptor common_desc = {
9090 .bNumInterfaces = 0 ,
9191 .bConfigurationValue = 1 ,
9292 .iConfiguration = 0 ,
93- .bmAttributes = USB_SCD_ATTRIBUTES ,
93+ .bmAttributes = USB_SCD_RESERVED |
94+ COND_CODE_1 (CONFIG_USB_SELF_POWERED ,
95+ (USB_SCD_SELF_POWERED ), (0 )) |
96+ COND_CODE_1 (CONFIG_USB_DEVICE_REMOTE_WAKEUP ,
97+ (USB_SCD_REMOTE_WAKEUP ), (0 )),
9498 .bMaxPower = CONFIG_USB_MAX_POWER ,
9599 },
96100};
You can’t perform that action at this time.
0 commit comments