zephyr/subsys/usb/device/CMakeLists.txt
Johann Fischer 6be45c2a18 usb: move USB device stack code to own directory
Until now the whole USB device stack code is located
in the top subsys/usb directory. Move it to own directory
in preparation for upcoming extension and rework of USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-03-31 18:30:14 +02:00

35 lines
819 B
CMake

# SPDX-License-Identifier: Apache-2.0
if(CONFIG_USB_DEVICE_STACK)
zephyr_include_directories(${ZEPHYR_BASE}/subsys/usb/device)
zephyr_sources(
usb_device.c
usb_descriptor.c
usb_transfer.c
)
add_subdirectory(class)
endif()
zephyr_sources_ifdef(CONFIG_USB_DEVICE_BOS bos.c)
zephyr_sources_ifdef(CONFIG_USB_DEVICE_OS_DESC os_desc.c)
zephyr_sources_ifdef(CONFIG_USB_WORKQUEUE usb_work_q.c)
if(CONFIG_USB_DEVICE_VID EQUAL 0x2FE3)
message(WARNING
"CONFIG_USB_DEVICE_VID has default value 0x2FE3.
This value is only for testing and MUST be configured for USB products."
)
if(CONFIG_USB_DEVICE_PID EQUAL 0x100)
message(WARNING
"CONFIG_USB_DEVICE_PID has default value 0x100.
This value is only for testing and MUST be configured for USB products."
)
endif()
endif()