#Description: USB Device Stack; user_visible: True
include_guard(GLOBAL)
message("middleware_usb_device_stack_external component is included.")

target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
    ${CMAKE_CURRENT_LIST_DIR}/output/source/device/class/usb_device_class.c
    ${CMAKE_CURRENT_LIST_DIR}/output/source/device/usb_device_ch9.c
)

target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
    ${CMAKE_CURRENT_LIST_DIR}/output/source/device
    ${CMAKE_CURRENT_LIST_DIR}/output/source/device/class
)

#OR Logic component
if(${MCUX_DEVICE} STREQUAL "MIMXRT1166_cm4")
    include(middleware_usb_device_controller_driver_MIMXRT1166_cm4)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1166_cm7")
    include(middleware_usb_device_controller_driver_MIMXRT1166_cm7)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1052")
    include(middleware_usb_device_controller_driver_MIMXRT1052)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1064")
    include(middleware_usb_device_controller_driver_MIMXRT1064)
endif()
if(${MCUX_DEVICE} STREQUAL "K32L2B31A")
    include(middleware_usb_device_controller_driver_K32L2B31A)
endif()
if(${MCUX_DEVICE} STREQUAL "MK64F12")
    include(middleware_usb_device_controller_driver_MK64F12)
endif()
if(${MCUX_DEVICE} STREQUAL "MK66F18")
    include(middleware_usb_device_controller_driver_MK66F18)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC54628")
    include(middleware_usb_device_controller_driver_LPC54628)
endif()
if(${MCUX_DEVICE} STREQUAL "MK22F51212")
    include(middleware_usb_device_controller_driver_MK22F51212)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1021")
    include(middleware_usb_device_controller_driver_MIMXRT1021)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC55S16")
    include(middleware_usb_device_controller_driver_LPC55S16)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1062")
    include(middleware_usb_device_controller_driver_MIMXRT1062)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC54S018")
    include(middleware_usb_device_controller_driver_LPC54S018)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1176_cm4")
    include(middleware_usb_device_controller_driver_MIMXRT1176_cm4)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1176_cm7")
    include(middleware_usb_device_controller_driver_MIMXRT1176_cm7)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC54S018M")
    include(middleware_usb_device_controller_driver_LPC54S018M)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC55S69_cm33_core0")
    include(middleware_usb_device_controller_driver_LPC55S69_cm33_core0)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1024")
    include(middleware_usb_device_controller_driver_MIMXRT1024)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1011")
    include(middleware_usb_device_controller_driver_MIMXRT1011)
endif()
if(${MCUX_DEVICE} STREQUAL "LPC55S28")
    include(middleware_usb_device_controller_driver_LPC55S28)
endif()
if(${MCUX_DEVICE} STREQUAL "K32L2A41A")
    include(middleware_usb_device_controller_driver_K32L2A41A)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT685S_cm33")
    include(middleware_usb_device_controller_driver_MIMXRT685S_cm33)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT595S_cm33")
    include(middleware_usb_device_controller_driver_MIMXRT595S_cm33)
endif()
if(${MCUX_DEVICE} STREQUAL "MIMXRT1015")
    include(middleware_usb_device_controller_driver_MIMXRT1015)
endif()

