2021-07-09 03:15:26 +00:00
|
|
|
set(srcs)
|
|
|
|
set(include)
|
|
|
|
set(priv_include)
|
2022-01-28 11:47:04 +00:00
|
|
|
# As CONFIG_USB_OTG_SUPPORTED comes from Kconfig, it is not evaluated yet
|
|
|
|
# when components are being registered.
|
|
|
|
# Thus, always add the (private) requirements, regardless of Kconfig
|
2022-03-24 13:33:36 +00:00
|
|
|
set(priv_require driver) # usb_phy driver relies on gpio driver API
|
2021-02-09 02:29:01 +00:00
|
|
|
|
2021-07-09 03:15:26 +00:00
|
|
|
if(CONFIG_USB_OTG_SUPPORTED)
|
2022-09-15 12:43:18 +00:00
|
|
|
list(APPEND srcs "hcd_dwc.c"
|
2021-08-24 15:20:50 +00:00
|
|
|
"hub.c"
|
2021-08-31 06:14:04 +00:00
|
|
|
"usb_helpers.c"
|
2021-08-24 15:20:50 +00:00
|
|
|
"usb_host.c"
|
|
|
|
"usb_private.c"
|
2021-08-19 12:28:28 +00:00
|
|
|
"usbh.c"
|
|
|
|
"usb_phy.c")
|
2021-08-24 15:20:50 +00:00
|
|
|
list(APPEND include "include")
|
2021-07-09 03:15:26 +00:00
|
|
|
list(APPEND priv_include "private_include")
|
2021-02-09 02:29:01 +00:00
|
|
|
endif()
|
|
|
|
|
2021-07-09 03:15:26 +00:00
|
|
|
idf_component_register(SRCS ${srcs}
|
|
|
|
INCLUDE_DIRS ${include}
|
|
|
|
PRIV_INCLUDE_DIRS ${priv_include}
|
|
|
|
PRIV_REQUIRES ${priv_require}
|
|
|
|
)
|