samples: tracing: Enable USB by the application

usb_enable() must be called by the application.
The application may want to register usb_dc_status_callback
and trace usb status codes (usb_dc_status_code).

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
Emil Obalski 2020-08-03 11:36:50 +02:00 committed by Carles Cufí
commit 3758a3d4f9
2 changed files with 12 additions and 9 deletions

View file

@ -167,16 +167,7 @@ static void tracing_backend_usb_output(const struct tracing_backend *backend,
}
}
static void tracing_backend_usb_init(void)
{
int ret;
ret = usb_enable(NULL);
__ASSERT(ret == 0, "usb backend enable failed");
}
const struct tracing_backend_api tracing_backend_usb_api = {
.init = tracing_backend_usb_init,
.output = tracing_backend_usb_output
};