usb: samples: Register BOS capabilities before USB enable.

BOS descriptor capabilities shall be registered before the USB
is enabled.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
Emil Obalski 2020-10-27 10:37:24 +01:00 committed by Carles Cufí
commit 7a252b90dc

View file

@ -287,6 +287,9 @@ void main(void)
LOG_DBG("");
usb_bos_register_cap((void *)&bos_cap_webusb);
usb_bos_register_cap((void *)&bos_cap_msosv2);
/* Set the custom and vendor request handlers */
webusb_register_request_handlers(&req_handlers);
@ -295,7 +298,4 @@ void main(void)
LOG_ERR("Failed to enable USB");
return;
}
usb_bos_register_cap((void *)&bos_cap_webusb);
usb_bos_register_cap((void *)&bos_cap_msosv2);
}