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) {
7171 #if CIRCUITPY_USB_DEVICE
7272 usb_identification_t defaults ;
7373 usb_identification_t * identification ;
74+ #if CIRCUITPY_USB_IDENTIFICATION
7475 if (custom_usb_identification != NULL ) {
7576 identification = custom_usb_identification ;
7677 } 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
8589 if (!usb_build_descriptors (identification )) {
8690 return ;
8791 }
You can’t perform that action at this time.
0 commit comments