File tree Expand file tree Collapse file tree
snippets/low_power/boards Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ config LIGHT_SWITCH_TX_POWER
5252
5353config LIGHT_SWITCH_LOW_POWER
5454 bool "Low power mode"
55- default n
55+ default y
56+ depends on PM_DEVICE
5657 help
5758 Enable low power mode for the Light Switch sample.
5859 This enables sleepy behavior and disables LEDs for power savings.
Load Diff This file was deleted.
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_LIGHT_SWITCH_LOW_POWER )
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_LIGHT_SWITCH_LOW_POWER )
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_LIGHT_SWITCH_LOW_POWER )
927927 bool enable_sleepy = true;
928928#elif defined(CONFIG_CHIP )
929929 bool enable_sleepy = false;
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
Original file line number Diff line number Diff line change 77name : low_power
88append :
99 EXTRA_CONF_FILE : low_power.conf
10-
11- boards :
12- nrf52840dk/nrf52840 :
13- append :
14- EXTRA_CONF_FILE : boards/nrf52840dk_nrf52840.conf
You can’t perform that action at this time.
0 commit comments