/* * Copyright (c) 2018 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include #include #include #include #if defined(CONFIG_USB_DEVICE_STACK_NEXT) #include static int enable_usb_device_next(void) { struct usbd_context *sample_usbd = sample_usbd_init_device(NULL); if (sample_usbd == NULL) { printk("Failed to initialize USB device"); return -ENODEV; } return usbd_enable(sample_usbd); } #endif /* CONFIG_USB_DEVICE_STACK_NEXT */ int main(void) { int ret; #if defined(CONFIG_USB_DEVICE_STACK_NEXT) ret = enable_usb_device_next(); #else ret = usb_enable(NULL); #endif if (ret != 0) { printk("Failed to enable USB"); return 0; } printk("Bluetooth over USB sample\n"); return 0; }