2019-04-06 15:08:09 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-10-27 15:43:34 +02:00
|
|
|
if(CONFIG_USB_DEVICE_STACK)
|
2019-10-01 15:05:05 +02:00
|
|
|
zephyr_include_directories(${ZEPHYR_BASE}/subsys/usb)
|
|
|
|
|
2017-10-27 15:43:34 +02:00
|
|
|
zephyr_sources(
|
|
|
|
usb_device.c
|
|
|
|
usb_descriptor.c
|
2019-12-12 16:38:28 +01:00
|
|
|
usb_transfer.c
|
2017-10-27 15:43:34 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_subdirectory(class)
|
|
|
|
endif()
|
|
|
|
|
2018-05-31 15:26:58 +02:00
|
|
|
if(CONFIG_USB_DEVICE_BOS)
|
|
|
|
zephyr_sources(
|
|
|
|
bos.c
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-05-25 11:25:17 +02:00
|
|
|
if(CONFIG_USB_DEVICE_OS_DESC)
|
|
|
|
zephyr_sources(
|
|
|
|
os_desc.c
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-01-12 08:30:34 +01:00
|
|
|
if(CONFIG_USB_DEVICE_VID EQUAL 0x2FE3)
|
2017-11-08 12:20:40 +01:00
|
|
|
message(WARNING
|
2018-01-12 08:30:34 +01:00
|
|
|
"CONFIG_USB_DEVICE_VID has default value 0x2FE3.
|
2017-11-08 12:20:40 +01:00
|
|
|
This value is only for testing and MUST be configured for USB products."
|
|
|
|
)
|
|
|
|
|
2018-01-12 08:30:34 +01:00
|
|
|
if(CONFIG_USB_DEVICE_PID EQUAL 0x100)
|
|
|
|
message(WARNING
|
|
|
|
"CONFIG_USB_DEVICE_PID has default value 0x100.
|
2017-11-08 12:20:40 +01:00
|
|
|
This value is only for testing and MUST be configured for USB products."
|
2018-01-12 08:30:34 +01:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2017-11-08 12:20:40 +01:00
|
|
|
endif()
|