Skip to content

Commit 3e7a4c8

Browse files
EFR32 and SiWx917 can now use the same ConfigurationManagerImpl.cpp implementation (project-chip#31939)
1 parent 7c70a25 commit 3e7a4c8

File tree

4 files changed

+5
-320
lines changed

4 files changed

+5
-320
lines changed

src/platform/silabs/efr32/ConfigurationManagerImpl.cpp src/platform/silabs/ConfigurationManagerImpl.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* @file
2121
* Provides the implementation of the Device Layer ConfigurationManager object
22-
* for EFR32 platforms using the Silicon Labs SDK.
22+
* for Silabs platforms using the Silicon Labs SDK.
2323
*/
2424
/* this file behaves like a config.h, comes first */
2525
#include <platform/ConfigurationManager.h>
@@ -93,7 +93,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason)
9393
BootReasonType matterBootCause;
9494
uint32_t rebootCause = Silabs::GetPlatform().GetRebootCause();
9595

96-
#if defined(_SILICON_LABS_32B_SERIES_1)
96+
#if defined(_RMU_RSTCAUSE_MASK)
9797
if (rebootCause & RMU_RSTCAUSE_PORST || rebootCause & RMU_RSTCAUSE_EXTRST) // PowerOn or External pin reset
9898
{
9999
matterBootCause = BootReasonType::kPowerOnReboot;
@@ -115,7 +115,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason)
115115
matterBootCause = BootReasonType::kUnspecified;
116116
}
117117
// Not tracked HARDWARE_WATCHDOG_RESET && SOFTWARE_UPDATE_COMPLETED
118-
#elif defined(_SILICON_LABS_32B_SERIES_2)
118+
#elif defined(_EMU_RSTCAUSE_MASK)
119119
if (rebootCause & EMU_RSTCAUSE_POR || rebootCause & EMU_RSTCAUSE_PIN) // PowerOn or External pin reset
120120
{
121121
matterBootCause = BootReasonType::kPowerOnReboot;

src/platform/silabs/SiWx917/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static_library("SiWx917") {
3939
"${silabs_platform_dir}/CHIPDevicePlatformEvent.h",
4040
"${silabs_platform_dir}/CHIPMem-Platform.cpp",
4141
"${silabs_platform_dir}/CHIPPlatformConfig.h",
42+
"${silabs_platform_dir}/ConfigurationManagerImpl.cpp",
4243
"${silabs_platform_dir}/ConfigurationManagerImpl.h",
4344
"${silabs_platform_dir}/ConnectivityManagerImpl.h",
4445
"${silabs_platform_dir}/DiagnosticDataProviderImpl.cpp",
@@ -62,7 +63,6 @@ static_library("SiWx917") {
6263
"../rs911x/rsi_ble_config.h",
6364
"../rs911x/wfx_sl_ble_init.c",
6465
"../rs911x/wfx_sl_ble_init.h",
65-
"ConfigurationManagerImpl.cpp",
6666
"PlatformManagerImpl.cpp",
6767
]
6868

src/platform/silabs/SiWx917/ConfigurationManagerImpl.cpp

-315
This file was deleted.

src/platform/silabs/efr32/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static_library("efr32") {
4444
"${silabs_platform_dir}/CHIPDevicePlatformEvent.h",
4545
"${silabs_platform_dir}/CHIPMem-Platform.cpp",
4646
"${silabs_platform_dir}/CHIPPlatformConfig.h",
47+
"${silabs_platform_dir}/ConfigurationManagerImpl.cpp",
4748
"${silabs_platform_dir}/ConfigurationManagerImpl.h",
4849
"${silabs_platform_dir}/ConnectivityManagerImpl.h",
4950
"${silabs_platform_dir}/DiagnosticDataProviderImpl.cpp",
@@ -62,7 +63,6 @@ static_library("efr32") {
6263
"${silabs_platform_dir}/platformAbstraction/SilabsPlatformBase.h",
6364
"../../FreeRTOS/SystemTimeSupport.cpp",
6465
"../../SingletonConfigurationManager.cpp",
65-
"ConfigurationManagerImpl.cpp",
6666
"PlatformManagerImpl.cpp",
6767
]
6868

0 commit comments

Comments
 (0)