24
24
#include " EventHandlerLibShell.h"
25
25
#endif // ENABLE_CHIP_SHELL
26
26
27
- #ifdef ENABLE_WSTK_LEDS
28
27
#include " LEDWidget.h"
29
- #include " sl_simple_led_instances.h"
30
- #endif // ENABLE_WSTK_LEDS
31
28
32
29
#ifdef DISPLAY_ENABLED
33
30
#include " lcd.h"
53
50
#include < lib/support/CodeUtils.h>
54
51
55
52
#include < platform/CHIPDeviceLayer.h>
56
-
57
- #ifdef ENABLE_WSTK_LEDS
58
- #define SYSTEM_STATE_LED &sl_led_led0
59
- #define LOCK_STATE_LED &sl_led_led1
60
- #endif // ENABLE_WSTK_LEDS
53
+ #define SYSTEM_STATE_LED 0
54
+ #define LOCK_STATE_LED 1
61
55
62
56
#define APP_FUNCTION_BUTTON &sl_button_btn0
63
57
#define APP_LOCK_SWITCH &sl_button_btn1
@@ -72,9 +66,7 @@ using namespace ::chip::DeviceLayer::Internal;
72
66
using namespace EFR32DoorLock ::LockInitParams;
73
67
74
68
namespace {
75
- #ifdef ENABLE_WSTK_LEDS
76
69
LEDWidget sLockLED ;
77
- #endif // ENABLE_WSTK_LEDS
78
70
79
71
EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT;
80
72
} // namespace
@@ -243,11 +235,8 @@ CHIP_ERROR AppTask::Init()
243
235
244
236
LockMgr ().SetCallbacks (ActionInitiated, ActionCompleted);
245
237
246
- #ifdef ENABLE_WSTK_LEDS
247
- // Initialize LEDs
248
238
sLockLED .Init (LOCK_STATE_LED);
249
239
sLockLED .Set (state.Value () == DlLockState::kUnlocked );
250
- #endif // ENABLE_WSTK_LEDS
251
240
252
241
// Update the LCD with the Stored value. Show QR Code if not provisioned
253
242
#ifdef DISPLAY_ENABLED
@@ -395,9 +384,7 @@ void AppTask::ActionInitiated(LockManager::Action_t aAction, int32_t aActor)
395
384
{
396
385
bool locked = (aAction == LockManager::LOCK_ACTION);
397
386
SILABS_LOG (" %s Action has been initiated" , (locked) ? " Lock" : " Unlock" );
398
- #ifdef ENABLE_WSTK_LEDS
399
387
sLockLED .Set (!locked);
400
- #endif // ENABLE_WSTK_LEDS
401
388
402
389
#ifdef DISPLAY_ENABLED
403
390
sAppTask .GetLCD ().WriteDemoUI (locked);
0 commit comments