Skip to content

Commit f4c9f66

Browse files
samples: Renamed files in the light switch sample
Added _matter prefix to related app_task files, similarly as it is in light bulb sample. Aligned readme to describe files structure. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
1 parent 12f7ce6 commit f4c9f66

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

samples/light_switch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if(CONFIG_CHIP)
3131

3232
target_sources(app PRIVATE
3333
src/main.cpp
34-
src/app_task.cpp
34+
src/app_task_matter.cpp
3535
src/app_task_zigbee.c
3636
src/light_switch.cpp
3737
src/shell_commands.cpp

samples/light_switch/README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ Source file setup
151151

152152
This sample is split into the following source files:
153153

154-
* The :file:`main` file to handle initialization and light switch basic behavior.
154+
* The :file:`main` file is the application entry point only.
155+
* The :file:`app_task_zigbee` file manages the application task flow, user input handling, and Zigbee-specific startup and control logic.
156+
* The :file:`app_task_matter` file is used in the Matter extension build only.
157+
It implements the application tasks flow: button input, timers, and delegating control actions to bound lighting devices.
158+
* The :file:`light_switch` file to implement the light switch application logic and interaction with Zigbee clusters.
155159
* An additional :file:`nus_cmd` file for handling NUS commands.
156160

157161
.. _zigbee_light_switch_activating_variants:

samples/light_switch/src/app_task.h renamed to samples/light_switch/include/app_task_matter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Nordic Semiconductor ASA
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
33
*
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/

samples/light_switch/src/app_task.cpp renamed to samples/light_switch/src/app_task_matter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*
2-
* Copyright (c) 2022 Nordic Semiconductor ASA
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
33
*
44
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
*/
66

7-
#include "app_task.h"
7+
#include "app_task_matter.h"
88

99
#include "light_switch.h"
1010

0 commit comments

Comments
 (0)