Skip to content

Commit 6d645ba

Browse files
sabollim-silabsrestyled-commitsrosahay-silabs
authored
[SL-ONLY] Porting dic component to release 2.6 -1.4 (#562)
Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Rohan Sahay <[email protected]>
1 parent d52cc2b commit 6d645ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+13286
-110
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,7 @@
351351
url = https://github.com/rtkconnectivity/ot-realtek.git
352352
branch = matter_support
353353
platforms = realtek
354+
[submodule "third_party/silabs/aws_ota_sdk/ota-for-aws-iot-embedded-sdk"]
355+
path = third_party/silabs/aws_ota_sdk/ota-for-aws-iot-embedded-sdk
356+
url = https://github.com/aws/ota-for-aws-iot-embedded-sdk.git
357+
platforms = silabs

examples/air-quality-sensor-app/silabs/src/ZclCallbacks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#include <app/ConcreteAttributePath.h>
2929
#include <lib/support/logging/CHIPLogging.h>
3030

31-
#ifdef DIC_ENABLE
32-
#include "dic_control.h"
33-
#endif // DIC_ENABLE
31+
#ifdef SL_MATTER_ENABLE_AWS
32+
#include "MatterAwsControl.h"
33+
#endif // SL_MATTER_ENABLE_AWS
3434

3535
using namespace ::chip;
3636
using namespace ::chip::app::Clusters;

examples/dishwasher-app/silabs/src/ZclCallbacks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#include "DishwasherManager.h"
2929
#include "ElectricalSensorManager.h"
3030

31-
#ifdef DIC_ENABLE
32-
#include "dic.h"
33-
#endif // DIC_ENABLE
31+
#ifdef SL_MATTER_ENABLE_AWS
32+
#include "MatterAws.h"
33+
#endif // SL_MATTER_ENABLE_AWS
3434

3535
using namespace chip;
3636
using namespace chip::app::Clusters;

examples/lighting-app/silabs/src/ZclCallbacks.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
#include <app/ConcreteAttributePath.h>
3333
#include <lib/support/logging/CHIPLogging.h>
3434

35-
#ifdef DIC_ENABLE
36-
#include "dic.h"
37-
#endif // DIC_ENABLE
35+
#ifdef SL_MATTER_ENABLE_AWS
36+
#include "MatterAws.h"
37+
#endif // SL_MATTER_ENABLE_AWS
3838

3939
using namespace ::chip;
4040
using namespace ::chip::app::Clusters;
@@ -48,9 +48,10 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
4848

4949
if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id)
5050
{
51-
#ifdef DIC_ENABLE
52-
dic_sendmsg("light/state", (const char *) (value ? (*value ? "on" : "off") : "invalid"));
53-
#endif // DIC_ENABLE
51+
#ifdef SL_MATTER_ENABLE_AWS
52+
ChipLogProgress(Zcl, "sending light state update");
53+
MatterAwsSendMsg("light/state", (const char *) (value ? (*value ? "on" : "off") : "invalid"));
54+
#endif // SL_MATTER_ENABLE_AWS
5455
LightMgr().InitiateAction(AppEvent::kEventType_Light, *value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION,
5556
value);
5657
}

examples/lock-app/silabs/src/ZclCallbacks.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#include <lib/core/DataModelTypes.h>
3232
#include <lib/support/logging/CHIPLogging.h>
3333

34-
#ifdef DIC_ENABLE
35-
#include "dic.h"
36-
#endif // DIC_ENABLE
34+
#ifdef SL_MATTER_ENABLE_AWS
35+
#include "MatterAws.h"
36+
#endif // SL_MATTER_ENABLE_AWS
3737

3838
using namespace ::chip::app::Clusters;
3939
using namespace ::chip::DeviceLayer::Internal;
@@ -51,9 +51,9 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
5151
[[maybe_unused]] DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
5252
ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId),
5353
to_underlying(lockState));
54-
#ifdef DIC_ENABLE
55-
dic_sendmsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock"));
56-
#endif // DIC_ENABLE
54+
#ifdef SL_MATTER_ENABLE_AWS
55+
MatterAwsSendMsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock"));
56+
#endif // SL_MATTER_ENABLE_AWS
5757
}
5858
}
5959

examples/lock-app/telink/src/ZclCallbacks.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
#include <lib/core/DataModelTypes.h>
3333
#include <lib/support/logging/CHIPLogging.h>
3434

35-
#ifdef DIC_ENABLE
36-
#include "dic.h"
37-
#endif // DIC_ENABLE
35+
#ifdef SL_MATTER_ENABLE_AWS
36+
#include "MatterAws.h"
37+
#endif // SL_MATTER_ENABLE_AWS
3838

3939
using namespace ::chip::app::Clusters;
4040
using namespace ::chip::DeviceLayer::Internal;
@@ -52,9 +52,9 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
5252
DoorLock::DlLockState lockState = *(reinterpret_cast<DoorLock::DlLockState *>(value));
5353
ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId),
5454
to_underlying(lockState));
55-
#ifdef DIC_ENABLE
56-
dic_sendmsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock"));
57-
#endif // DIC_ENABLE
55+
#ifdef SL_MATTER_ENABLE_AWS
56+
MatterAwsSendMsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock"));
57+
#endif // SL_MATTER_ENABLE_AWS
5858
}
5959
}
6060

examples/platform/silabs/BaseApplication.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@
7777

7878
#if CHIP_CONFIG_ENABLE_ICD_SERVER
7979
#include <platform/silabs/wifi/icd/WifiSleepManager.h> // nogncheck
80-
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
81-
#endif // SL_WIFI
80+
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
81+
#endif // SL_WIFI
8282

83-
#ifdef DIC_ENABLE
84-
#include "dic.h"
85-
#include "dic_control.h"
86-
#endif // DIC_ENABLE
83+
#ifdef SL_MATTER_ENABLE_AWS
84+
#include "MatterAws.h"
85+
#include "MatterAwsControl.h"
86+
#endif // SL_MATTER_ENABLE_AWS
8787

8888
#ifdef PERFORMANCE_TEST_ENABLED
8989
#include <performance_test_commands.h>
@@ -969,15 +969,15 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
969969

970970
case DeviceEventType::kThreadConnectivityChange:
971971
case DeviceEventType::kInternetConnectivityChange: {
972-
#ifdef DIC_ENABLE
972+
#ifdef SL_MATTER_ENABLE_AWS
973973
if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established)
974974
{
975-
if (DIC_OK != dic_init(dic::control::subscribeCB))
975+
if (MATTER_AWS_OK != MatterAwsInit(matterAws::control::subscribeCB))
976976
{
977977
ChipLogError(AppServer, "dic_init failed");
978978
}
979979
}
980-
#endif // DIC_ENABLE
980+
#endif // SL_MATTER_ENABLE_AWS
981981
#ifdef DISPLAY_ENABLED
982982
SilabsLCD::Screen_e screen;
983983
AppTask::GetLCD().GetScreen(screen);

examples/platform/silabs/FreeRTOSConfig.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,15 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
244244

245245
#ifndef configTOTAL_HEAP_SIZE
246246
#ifdef SL_WIFI
247-
#ifdef DIC_ENABLE
247+
#ifdef SL_MATTER_ENABLE_AWS
248248
#ifdef SLI_SI91X_MCU_INTERFACE
249-
#define configTOTAL_HEAP_SIZE ((size_t) ((75 + EXTRA_HEAP_k) * 1024))
249+
#define configTOTAL_HEAP_SIZE ((size_t) ((65 + EXTRA_HEAP_k) * 1024))
250250
#else
251251
#define configTOTAL_HEAP_SIZE ((size_t) ((68 + EXTRA_HEAP_k) * 1024))
252252
#endif // SLI_SI91X_MCU_INTERFACE
253253
#else
254254
#define configTOTAL_HEAP_SIZE ((size_t) ((42 + EXTRA_HEAP_k) * 1024))
255-
#endif // DIC
255+
#endif // MATTER_AWS
256256
#else // SL_WIFI
257257
#if SL_CONFIG_OPENTHREAD_LIB == 1
258258
#define configTOTAL_HEAP_SIZE ((size_t) ((40 + EXTRA_HEAP_k) * 1024))

examples/platform/silabs/SiWx917/BUILD.gn

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,14 @@ source_set("siwx917-common") {
168168
}
169169
}
170170

171-
# DIC
172-
if (enable_dic) {
173-
public_deps +=
174-
[ "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-dic" ]
171+
# MATTER_AWS
172+
if (enable_matter_aws) {
173+
public_deps += [ "${silabs_common_plat_dir}/matter_aws/matter_aws_interface:silabs-matter-aws" ]
175174
}
176175

177176
# AWS SDK OTA
178177
if (aws_sdk_ota) {
179-
public_deps += [
180-
"${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-aws-sdk-ota",
181-
]
178+
public_deps += [ "${silabs_common_plat_dir}/matter_aws/matter_aws_interface:silabs-matter-aws-sdk-ota" ]
182179
}
183180

184181
public_deps += [

examples/platform/silabs/efr32/BUILD.gn

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,14 @@ source_set("efr32-common") {
153153
":chip_examples_project_config",
154154
]
155155

156-
# DIC
157-
if (enable_dic) {
158-
public_deps +=
159-
[ "${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-dic" ]
156+
# MATTER_AWS
157+
if (enable_matter_aws) {
158+
public_deps += [ "${silabs_common_plat_dir}/matter_aws/matter_aws_interface:silabs-matter-aws" ]
160159
}
161160

162161
# AWS SDK OTA
163162
if (aws_sdk_ota) {
164-
public_deps += [
165-
"${silabs_common_plat_dir}/DIC/matter_abs_interface:silabs-aws-sdk-ota",
166-
]
163+
public_deps += [ "${silabs_common_plat_dir}/matter_aws/matter_aws_interface:silabs-matter-aws-sdk-ota" ]
167164
}
168165

169166
include_dirs = [ "." ]

0 commit comments

Comments
 (0)