Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: matter: common: Cleaned up samples common directory #13485

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions applications/matter_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ target_sources(app PRIVATE
${COMMON_ROOT}/src/bridge/matter_bridged_device.cpp
${COMMON_ROOT}/src/bridge/bridge_storage_manager.cpp
${COMMON_ROOT}/src/bridge/bridged_device_data_provider.cpp
${COMMON_ROOT}/src/bridge/binding_handler.cpp
${COMMON_ROOT}/src/binding/binding_handler.cpp
src/zap-generated/IMClusterCommandHandler.cpp
src/zap-generated/callback-stub.cpp
${COMMON_ROOT}/src/led_widget.cpp
${COMMON_ROOT}/src/persistent_storage_util.cpp
${COMMON_ROOT}/src/task_executor.cpp
${COMMON_ROOT}/src/board.cpp
${COMMON_ROOT}/src/matter_init.cpp
${COMMON_ROOT}/src/led/led_widget.cpp
markaj-nordic marked this conversation as resolved.
Show resolved Hide resolved
${COMMON_ROOT}/src/ps_storage/persistent_storage_util.cpp
${COMMON_ROOT}/src/tasks/task_executor.cpp
${COMMON_ROOT}/src/board/board.cpp
markaj-nordic marked this conversation as resolved.
Show resolved Hide resolved
${COMMON_ROOT}/src/init/matter_init.cpp
)

if(CONFIG_BRIDGED_DEVICE_BT)
Expand Down Expand Up @@ -146,11 +146,11 @@ endif() # CONFIG_BRIDGE_HUMIDITY_SENSOR_BRIDGED_DEVICE
endif() # CONFIG_BRIDGED_DEVICE_BT

if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT)
target_sources(app PRIVATE ${COMMON_ROOT}/src/ota_util.cpp)
target_sources(app PRIVATE ${COMMON_ROOT}/src/dfu/ota/ota_util.cpp)
endif()

if(CONFIG_MCUMGR_TRANSPORT_BT)
target_sources(app PRIVATE ${COMMON_ROOT}/src/dfu_over_smp.cpp)
target_sources(app PRIVATE ${COMMON_ROOT}/src/dfu/smp/dfu_over_smp.cpp)
endif()

chip_configure_data_model(app
Expand Down
28 changes: 17 additions & 11 deletions applications/matter_bridge/src/app_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,33 @@

#include "app_task.h"

#include "bridge_manager.h"
#include "bridge_storage_manager.h"
#include "matter_init.h"
#include "task_executor.h"

#ifdef CONFIG_BRIDGED_DEVICE_BT
#include "ble_bridged_device_factory.h"
#include "ble_connectivity_manager.h"
#include <bluetooth/services/lbs.h>
#else
#include "simulated_bridged_device_factory.h"
#endif /* CONFIG_BRIDGED_DEVICE_BT */

#include "board/board.h"
#include "bridge/bridge_manager.h"
#include "bridge/bridge_storage_manager.h"
#include "init/matter_init.h"
#include "tasks/task_executor.h"

#ifdef CONFIG_BRIDGED_DEVICE_BT
#include "bridge/ble_connectivity_manager.h"
#endif

#ifdef CONFIG_CHIP_OTA_REQUESTOR
#include "dfu/ota/ota_util.h"
#endif /* CONFIG_BRIDGED_DEVICE_BT */

#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/server/OnboardingCodesUtil.h>

#ifdef CONFIG_CHIP_OTA_REQUESTOR
#include "ota_util.h"
#endif

#ifdef CONFIG_BRIDGED_DEVICE_BT
#include <bluetooth/services/lbs.h>
#endif /* CONFIG_BRIDGED_DEVICE_BT */
#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL);
Expand Down
3 changes: 0 additions & 3 deletions applications/matter_bridge/src/app_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

#pragma once

#include "board.h"

#include <platform/CHIPDeviceLayer.h>

class AppTask {
public:

static AppTask &Instance()
{
static AppTask sAppTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "ble_lbs_data_provider.h"

#ifdef CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE
#include "binding_handler.h"
#include "binding/binding_handler.h"
#endif

#include <bluetooth/gatt_dm.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "simulated_onoff_light_switch_data_provider.h"
#include "binding_handler.h"
#include "binding/binding_handler.h"

#include <zephyr/logging/log.h>

Expand Down
12 changes: 6 additions & 6 deletions applications/matter_weather_station/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ target_sources(app PRIVATE
src/buzzer.cpp
src/zap-generated/IMClusterCommandHandler.cpp
src/zap-generated/callback-stub.cpp
${COMMON_ROOT}/src/led_widget.cpp
${COMMON_ROOT}/src/dfu_over_smp.cpp
${COMMON_ROOT}/src/task_executor.cpp
${COMMON_ROOT}/src/board.cpp
${COMMON_ROOT}/src/matter_init.cpp
${COMMON_ROOT}/src/led/led_widget.cpp
${COMMON_ROOT}/src/dfu/smp/dfu_over_smp.cpp
${COMMON_ROOT}/src/tasks/task_executor.cpp
${COMMON_ROOT}/src/board/board.cpp
${COMMON_ROOT}/src/init/matter_init.cpp
)

if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT)
target_sources(app PRIVATE ${COMMON_ROOT}/src/ota_util.cpp)
target_sources(app PRIVATE ${COMMON_ROOT}/src/dfu/ota/ota_util.cpp)
endif()

chip_configure_data_model(app
Expand Down
33 changes: 16 additions & 17 deletions applications/matter_weather_station/src/app_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,38 @@

#include "app_task.h"

#include "board.h"
#include "task_executor.h"

#include "battery.h"
#include "buzzer.h"
#include "led_widget.h"
#include "matter_init.h"

#include <DeviceInfoProviderImpl.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerDelegate.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include "board/board.h"
#include "init/matter_init.h"
#include "led/led_widget.h"
#include "tasks/task_executor.h"

#ifdef CONFIG_CHIP_OTA_REQUESTOR
#include "ota_util.h"
#include "dfu/ota/ota_util.h"
#endif

#ifdef CONFIG_MCUMGR_TRANSPORT_BT
#include "dfu_over_smp.h"
#include "dfu/smp/dfu_over_smp.h"
#endif

#include <DeviceInfoProviderImpl.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerDelegate.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>

#include <zephyr/drivers/sensor.h>
#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(app);

using namespace ::chip;
using namespace ::chip::DeviceLayer;
using namespace ::chip::app;

#include <zephyr/logging/log.h>

LOG_MODULE_DECLARE(app);

namespace
{
enum class FunctionTimerMode { kDisabled, kFactoryResetTrigger, kFactoryResetComplete };
Expand Down
2 changes: 1 addition & 1 deletion applications/matter_weather_station/src/app_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

#include "led_widget.h"
#include "led/led_widget.h"

#include <app/clusters/identify-server/identify-server.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/

#include "board.h"
#include "task_executor.h"
#include "tasks/task_executor.h"

#include <app/server/Server.h>
#include <platform/CHIPDeviceLayer.h>

#include <zephyr/logging/log.h>

#ifdef CONFIG_MCUMGR_TRANSPORT_BT
#include "dfu_over_smp.h"
#include "dfu/smp/dfu_over_smp.h"
#endif

LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

#pragma once

#include "board_config.h"
#include "board_consts.h"
#include "led_util.h"
#include "led_widget.h"
#include "board/board_config.h"
#include "board/board_consts.h"
#include "led/led_util.h"
#include "led/led_widget.h"

enum class DeviceState : uint8_t { DeviceDisconnected, DeviceAdvertisingBLE, DeviceConnectedBLE, DeviceProvisioned };
enum class DeviceLeds : uint8_t { LED1, LED2, LED3, LED4 };
Expand Down
137 changes: 0 additions & 137 deletions samples/matter/common/src/bridge/binding_handler.cpp

This file was deleted.

Loading
Loading