~aleteoryx/muditaos

5822c47e53fa92357958e2c12090d6a70400b1d1 — Marek Niepieklo 5 years ago 2844cc8
[EGD-5329] Change Mudita USB VID PID via CMake options

Added CMake options to define Mudita USB Vendor and
Product IDs for USB stack
1 files changed, 12 insertions(+), 1 deletions(-)

M config/ProjectConfig.cmake
M config/ProjectConfig.cmake => config/ProjectConfig.cmake +12 -1
@@ 26,15 26,26 @@ else()
    set (LOG_LUART_ENABLED 0 CACHE INTERNAL "")
endif()

# add Mudita USB Vendor/Product IDs
option(MUDITA_USB_ID "Enables using Mudita registered USB Vendor ID and Pure Phone USB Product ID" OFF)
if (MUDITA_USB_ID)
    set (USB_DEVICE_VENDOR_ID  0x3310 CACHE INTERNAL "Sets USB_DEVICE_VENDOR_ID to Mudita Vendor ID")
    set (USB_DEVICE_PRODUCT_ID 0x0100 CACHE INTERNAL "Sets USB_DEVICE_PRODUCT_ID to Mudita Pure Product ID")
else()
    set (USB_DEVICE_VENDOR_ID  0x045E CACHE INTERNAL "Sets USB_DEVICE_VENDOR_ID to Microsoft Vendor ID")
    set (USB_DEVICE_PRODUCT_ID 0x0622 CACHE INTERNAL "Sets USB_DEVICE_PRODUCT_ID to Windows MTP Simulator Product ID")
endif()

#Config options described in README.md
set(PROJECT_CONFIG_DEFINITIONS

        LOG_USE_COLOR=${LOG_USE_COLOR}
        LOG_REDIRECT=${LOG_REDIRECT}
        SYSTEM_VIEW_ENABLED=${SYSTEM_VIEW_ENABLED}
        USBCDC_ECHO_ENABLED=${USBCDC_ECHO_ENABLED}
        LOG_LUART_ENABLED=${LOG_LUART_ENABLED}
        PROJECT_CONFIG_USER_DYNMEM_SIZE=9*1024*1024
        USB_DEVICE_VENDOR_ID=${USB_DEVICE_VENDOR_ID}
        USB_DEVICE_PRODUCT_ID=${USB_DEVICE_PRODUCT_ID}
        CACHE INTERNAL ""
        )