Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcux: middleware: usb: fix USB MW to use new OSA #433

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions mcux/hal_nxp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,19 @@ if(CONFIG_ETH_MCUX)
endif()

if (CONFIG_USB_DEVICE_DRIVER)
set(CONFIG_USE_component_osa_zephyr true)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/osa
)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb
)
include(middleware_usb_phy)
include_ifdef(CONFIG_USB_DC_NXP_EHCI middleware_usb_device_ehci)
include_ifdef(CONFIG_USB_DC_NXP_LPCIP3511 middleware_usb_device_ip3511fs)
include(set_component_osa)

zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/device)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/phy)
Expand All @@ -412,12 +419,19 @@ endif()


if (CONFIG_UDC_DRIVER)
set(CONFIG_USE_component_osa_zephyr true)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/osa
)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb
)
include_ifdef(CONFIG_DT_HAS_NXP_USBPHY_ENABLED middleware_usb_phy)
include_ifdef(CONFIG_UDC_NXP_EHCI middleware_usb_device_ehci)
include_ifdef(CONFIG_UDC_NXP_IP3511 middleware_usb_device_ip3511fs)
include(set_component_osa)

zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/device)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/phy)
Expand All @@ -435,6 +449,10 @@ if(${MCUX_DEVICE} MATCHES "RW61")
endif()
endif()

if(${CONFIG_USE_component_osa_zephyr})
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/osa)
endif()

include_ifdef(CONFIG_USE_component_osa_zephyr set_component_osa)

if(CONFIG_WIFI_NXP)
Expand Down