Skip to content

Commit 92b519b

Browse files
samples: Remove snippets from samples
We should store our snippets in the root directory instead of sample's one. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
1 parent 2f49eab commit 92b519b

5 files changed

Lines changed: 3 additions & 13 deletions

File tree

samples/light_switch/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff 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.

samples/light_switch/src/app_task_zigbee.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
LOG_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)
120120
static inline void led_set(uint32_t led, uint32_t val) { ARG_UNUSED(led); ARG_UNUSED(val); }
121121
static inline void led_set_on(uint32_t led) { ARG_UNUSED(led); }
122122
static 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;

samples/light_switch/snippets/low_power/boards/nrf52840dk_nrf52840.conf renamed to snippets/low_power/boards/nrf52840dk_nrf52840.conf

File renamed without changes.

samples/light_switch/snippets/low_power/low_power.conf renamed to snippets/low_power/low_power.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
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
118
CONFIG_SERIAL=n
129
CONFIG_CONSOLE=n

samples/light_switch/snippets/low_power/snippet.yml renamed to snippets/low_power/snippet.yml

File renamed without changes.

0 commit comments

Comments
 (0)