File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,10 +49,3 @@ config LIGHT_SWITCH_TX_POWER
4949 default 0
5050 help
5151 TX power level in dBm.
52-
53- config LIGHT_SWITCH_LOW_POWER
54- bool "Low power mode"
55- default n
56- help
57- Enable low power mode for the Light Switch sample.
58- This enables sleepy behavior and disables LEDs for power savings.
Original file line number Diff line number Diff line change 116116LOG_MODULE_REGISTER (zb_lightswitch , LOG_LEVEL_INF );
117117
118118/* Helper functions for LED control in low power mode */
119- #if CONFIG_LIGHT_SWITCH_LOW_POWER
119+ #if defined( CONFIG_PM_DEVICE )
120120static inline void led_set (uint32_t led , uint32_t val ) { ARG_UNUSED (led ); ARG_UNUSED (val ); }
121121static inline void led_set_on (uint32_t led ) { ARG_UNUSED (led ); }
122122static inline void led_set_off (uint32_t led ) { ARG_UNUSED (led ); }
@@ -388,7 +388,7 @@ static void configure_gpio(void)
388388 LOG_ERR ("Cannot init buttons (err: %d)" , err );
389389 }
390390
391- #if !CONFIG_LIGHT_SWITCH_LOW_POWER
391+ #if !defined( CONFIG_PM_DEVICE )
392392 err = dk_leds_init ();
393393 if (err ) {
394394 LOG_ERR ("Cannot init LEDs (err: %d)" , err );
@@ -923,7 +923,7 @@ int ZigbeeStart(void)
923923 /* Check if sleepy button is pressed during Zigbee initialization
924924 * and enable sleepy behavior. In low power mode, always enable sleepy behavior.
925925 */
926- #if CONFIG_LIGHT_SWITCH_LOW_POWER
926+ #if defined( CONFIG_PM_DEVICE )
927927 bool enable_sleepy = true;
928928#elif defined(CONFIG_CHIP )
929929 bool enable_sleepy = false;
File renamed without changes.
Original file line number Diff line number Diff line change 44# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55#
66
7- # Low power configuration for Zigbee Light Switch
8- CONFIG_LIGHT_SWITCH_LOW_POWER=y
9-
107# Disable serial and console for power savings
118CONFIG_SERIAL=n
129CONFIG_CONSOLE=n
File renamed without changes.
You can’t perform that action at this time.
0 commit comments