# This recipe is included by app/community.cmake
# APP_DIR points to Community-Code-Examples root

#BUG: app_utils.c:213:46: error: 'WICED_BT_GATT_ENCRYPED_MITM'
return()

# https://github.com/Infineon/Community-Code-Examples/tree/master/sensor_interfacing/cce-psoc6-btn8982-motor-control/COMPONENT_CUSTOM_DESIGN_MODUS
psoc6_check_bsp(
  CY8CPROTO-062-4343W
)

psoc6_add_executable(
  NAME
    cce-psoc6-btn8982-motor-control
  SOURCES
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source/main.c
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source/motor.h
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source/motor.c
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source/motor_task.h
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source/motor_task.c
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/configs/app_platform_cfg.h
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/configs/app_platform_cfg.c
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/app_utils.h
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/app_utils.c
  INCLUDE_DIRS
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/source
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/configs
  LINK_LIBRARIES
    mtb-hal-cat1
    retarget-io
    btstack-ble
    bluetooth-freertos
    bsp-bluetooth
  DESIGN_MODUS
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/COMPONENT_CUSTOM_DESIGN_MODUS/TARGET_${BSP_NAME}/design.modus
  DESIGN_BT
    ${APP_DIR}/sensor_interfacing/cce-psoc6-btn8982-motor-control/cycfg_bt.cybt
  BT_GENERATED_SOURCES
    cycfg_bt_settings.h
    cycfg_bt_settings.c
    cycfg_gap.h
    cycfg_gap.c
    cycfg_gatt_db.h
    cycfg_gatt_db.c
)
