diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index 63a5cb7d910e0c..9e419150712c3c 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -252,7 +252,11 @@ void AppTask::PowerOnFactoryResetTimerEvent(struct k_timer * timer) void AppTask::LinkLeds(LedManager & ledManager) { -#if (!CONFIG_PWM) - ledManager.linkLed(LedManager::EAppLed_App0, 0); -#endif // !CONFIG_PWM +#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED + ledManager.linkLed(LedManager::EAppLed_Status, 0); +#endif + +#if !CONFIG_PWM + ledManager.linkLed(LedManager::EAppLed_App0, 1); +#endif /* !CONFIG_PWM */ } diff --git a/examples/platform/telink/common.cmake b/examples/platform/telink/common.cmake index edb77e18a72cab..ffba8fff6133bb 100644 --- a/examples/platform/telink/common.cmake +++ b/examples/platform/telink/common.cmake @@ -14,10 +14,10 @@ # limitations under the License. string(REPLACE "_retention" "" BASE_BOARD ${BOARD}) +string(REGEX REPLACE "_v[0-9]+" "" BASE_BOARD ${BASE_BOARD}) if(NOT FLASH_SIZE) - if(${BASE_BOARD} MATCHES "tlsr9118bdk40d" OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v1" - OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v2") + if(${BASE_BOARD} MATCHES "tlsr9118bdk40d") set(FLASH_SIZE "3m") else() set(FLASH_SIZE "2m") @@ -99,11 +99,8 @@ endif() set(FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_${FLASH_SIZE}_flash.overlay") if(NOT EXISTS "${FLASH_DTC_OVERLAY_FILE}") - if(${BASE_BOARD} MATCHES "tlsr9118bdk40d_v1" OR ${BASE_BOARD} MATCHES "tlsr9118bdk40d_v2") - set(FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/tlsr9118bdk40d_${FLASH_SIZE}_flash.overlay") - else() - message(FATAL_ERROR "${FLASH_DTC_OVERLAY_FILE} doesn't exist") - endif() + message(STATUS "${FLASH_DTC_OVERLAY_FILE} doesn't exist") + unset(FLASH_DTC_OVERLAY_FILE) endif() if(DTC_OVERLAY_FILE) diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 052e6f40e59124..13036743a5db65 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -416,7 +416,9 @@ void AppTaskCommon::InitPwms() void AppTaskCommon::LinkPwms(PwmManager & pwmManager) { -#if CONFIG_WS2812_STRIP +#if CONFIG_BOARD_TLSR9118BDK40D_V1 && CONFIG_PWM // TLSR9118BDK40D_V1 EVK supports single LED PWM channel + pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0); +#elif CONFIG_WS2812_STRIP pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0); pwmManager.linkPwm(PwmManager::EAppPwm_Green, 1); pwmManager.linkPwm(PwmManager::EAppPwm_Blue, 2);