File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -71,17 +71,21 @@ void usb_init(void) {
71
71
#if CIRCUITPY_USB_DEVICE
72
72
usb_identification_t defaults ;
73
73
usb_identification_t * identification ;
74
+ #if CIRCUITPY_USB_IDENTIFICATION
74
75
if (custom_usb_identification != NULL ) {
75
76
identification = custom_usb_identification ;
76
77
} else {
77
- // This compiles to less code than using a struct initializer.
78
- defaults .vid = USB_VID ;
79
- defaults .pid = USB_PID ;
80
- strcpy (defaults .manufacturer_name , USB_MANUFACTURER );
81
- strcpy (defaults .product_name , USB_PRODUCT );
82
- identification = & defaults ;
83
- // This memory only needs to be live through the end of usb_build_descriptors.
84
- }
78
+ #endif
79
+ // This compiles to less code than using a struct initializer.
80
+ defaults .vid = USB_VID ;
81
+ defaults .pid = USB_PID ;
82
+ strcpy (defaults .manufacturer_name , USB_MANUFACTURER );
83
+ strcpy (defaults .product_name , USB_PRODUCT );
84
+ identification = & defaults ;
85
+ // This memory only needs to be live through the end of usb_build_descriptors.
86
+ #if CIRCUITPY_USB_IDENTIFICATION
87
+ }
88
+ #endif
85
89
if (!usb_build_descriptors (identification )) {
86
90
return ;
87
91
}
You can’t perform that action at this time.
0 commit comments