From 3240479e18647b7217cfd93429f4ee1cd6a1c8a6 Mon Sep 17 00:00:00 2001 From: bhmanda Date: Thu, 12 Dec 2024 17:11:53 +0530 Subject: [PATCH] Added separate condition for wstk_leds and rgb led enabled --- .../platformAbstraction/WiseMcuSpam.cpp | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index d47395e6c7..b3335aa309 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -41,16 +41,6 @@ extern "C" { #include "sl_si91x_button_pin_config.h" #endif //SL_CATALOG_SIMPLE_BUTTON_PRESENT -#if defined(ENABLE_WSTK_LEDS) && defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED -#include "sl_si91x_rgb_led.h" -#include "sl_si91x_rgb_led_config.h" -#include "sl_si91x_rgb_led_instances.h" -#else -#include "sl_si91x_led.h" -#include "sl_si91x_led_config.h" -#include "sl_si91x_led_instances.h" -#endif //defined(ENABLE_WSTK_LEDS) && defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED - #if CHIP_CONFIG_ENABLE_ICD_SERVER == 0 void soc_pll_config(void); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -64,14 +54,22 @@ void soc_pll_config(void); #include "uart.h" #endif -#if defined(ENABLE_WSTK_LEDS) && defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED +#ifdef ENABLE_WSTK_LEDS +#if defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED +#include "sl_si91x_rgb_led.h" +#include "sl_si91x_rgb_led_config.h" +#include "sl_si91x_rgb_led_instances.h" #define SL_LED_COUNT SL_SI91X_RGB_LED_COUNT -const sl_rgb_led_t * ledPinArray[SL_LED_COUNT] = { &led_led0 }; +const sl_rgb_led_t *ledPinArray[SL_LED_COUNT] = { &led_led0 }; #define SL_RGB_LED_INSTANCE(n) (ledPinArray[n]) #else -#define SL_LED_COUNT SL_SI91x_LED_COUNT +#include "sl_si91x_led.h" +#include "sl_si91x_led_config.h" +#include "sl_si91x_led_instances.h" +#define SL_LED_COUNT SL_SI91X_LED_COUNT uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LED0_PIN, SL_LED_LED1_PIN }; -#endif //defined(ENABLE_WSTK_LEDS) && defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED +#endif // SL_MATTER_RGB_LED_ENABLED +#endif // ENABLE_WSTK_LEDS namespace chip { namespace DeviceLayer {