Skip to content

Commit

Permalink
EFR32 and SiWx917 can now use the same ConfigurationManagerImpl.cpp i…
Browse files Browse the repository at this point in the history
…mplementation (#31939)
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed May 20, 2024
1 parent 41fc827 commit 3166151
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 320 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @file
* Provides the implementation of the Device Layer ConfigurationManager object
* for EFR32 platforms using the Silicon Labs SDK.
* for Silabs platforms using the Silicon Labs SDK.
*/
/* this file behaves like a config.h, comes first */
#include <platform/ConfigurationManager.h>
Expand Down Expand Up @@ -93,7 +93,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason)
BootReasonType matterBootCause;
uint32_t rebootCause = Silabs::GetPlatform().GetRebootCause();

#if defined(_SILICON_LABS_32B_SERIES_1)
#if defined(_RMU_RSTCAUSE_MASK)
if (rebootCause & RMU_RSTCAUSE_PORST || rebootCause & RMU_RSTCAUSE_EXTRST) // PowerOn or External pin reset
{
matterBootCause = BootReasonType::kPowerOnReboot;
Expand All @@ -115,7 +115,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetBootReason(uint32_t & bootReason)
matterBootCause = BootReasonType::kUnspecified;
}
// Not tracked HARDWARE_WATCHDOG_RESET && SOFTWARE_UPDATE_COMPLETED
#elif defined(_SILICON_LABS_32B_SERIES_2)
#elif defined(_EMU_RSTCAUSE_MASK)
if (rebootCause & EMU_RSTCAUSE_POR || rebootCause & EMU_RSTCAUSE_PIN) // PowerOn or External pin reset
{
matterBootCause = BootReasonType::kPowerOnReboot;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static_library("SiWx917") {
"${silabs_platform_dir}/CHIPDevicePlatformEvent.h",
"${silabs_platform_dir}/CHIPMem-Platform.cpp",
"${silabs_platform_dir}/CHIPPlatformConfig.h",
"${silabs_platform_dir}/ConfigurationManagerImpl.cpp",
"${silabs_platform_dir}/ConfigurationManagerImpl.h",
"${silabs_platform_dir}/ConnectivityManagerImpl.h",
"${silabs_platform_dir}/DiagnosticDataProviderImpl.cpp",
Expand All @@ -62,7 +63,6 @@ static_library("SiWx917") {
"../rs911x/rsi_ble_config.h",
"../rs911x/wfx_sl_ble_init.c",
"../rs911x/wfx_sl_ble_init.h",
"ConfigurationManagerImpl.cpp",
"PlatformManagerImpl.cpp",
]

Expand Down
315 changes: 0 additions & 315 deletions src/platform/silabs/SiWx917/ConfigurationManagerImpl.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion src/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static_library("efr32") {
"${silabs_platform_dir}/CHIPDevicePlatformEvent.h",
"${silabs_platform_dir}/CHIPMem-Platform.cpp",
"${silabs_platform_dir}/CHIPPlatformConfig.h",
"${silabs_platform_dir}/ConfigurationManagerImpl.cpp",
"${silabs_platform_dir}/ConfigurationManagerImpl.h",
"${silabs_platform_dir}/ConnectivityManagerImpl.h",
"${silabs_platform_dir}/DiagnosticDataProviderImpl.cpp",
Expand All @@ -62,7 +63,6 @@ static_library("efr32") {
"${silabs_platform_dir}/platformAbstraction/SilabsPlatformBase.h",
"../../FreeRTOS/SystemTimeSupport.cpp",
"../../SingletonConfigurationManager.cpp",
"ConfigurationManagerImpl.cpp",
"PlatformManagerImpl.cpp",
]

Expand Down

0 comments on commit 3166151

Please sign in to comment.