Skip to content

Commit

Permalink
Move Base Application
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Jul 26, 2023
1 parent 44a9d92 commit 6a66d79
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 866 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ CHIP_ERROR BaseApplication::Init()
}

PlatformMgr().AddEventHandler(OnPlatformEvent, 0);
#ifdef SL_WIFI
sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned();
#endif /* SL_WIFI */
#if CHIP_ENABLE_OPENTHREAD
sIsProvisioned = ConnectivityMgr().IsThreadProvisioned();
#endif

return err;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "AppEvent.h"
#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <app/clusters/identify-server/identify-server.h>
#include <app/util/config.h>
#include <ble/BLEEndPoint.h>
#include <lib/core/CHIPError.h>
Expand All @@ -47,10 +48,6 @@
#endif // QR_CODE_ENABLED
#endif // DISPLAY_ENABLED

#ifndef SL_STATUS_LED
#define SL_STATUS_LED 1
#endif

/**********************************************************
* Defines
*********************************************************/
Expand Down
9 changes: 4 additions & 5 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)
// Init Chip memory management before the stack
ReturnErrorOnFailure(chip::Platform::MemoryInit());

// WiFi needs to be initialized after Memory Init for some reason
#ifdef SL_WIFI
// WiFi needs to be initialized after Memory Init for some reason
#ifdef SL_WIFI
InitWiFi();
#endif
#endif

ReturnErrorOnFailure(PlatformMgr().InitChipStack());

Expand Down Expand Up @@ -260,8 +260,7 @@ void SilabsMatterConfig::InitWiFi(void)
SILABS_LOG("RSI init failed");
return CHIP_ERROR_INTERNAL;
}
#endif /* WF200_WIFI */

#endif /* WF200_WIFI */
}
#endif // SL_WIFI

Expand Down
4 changes: 2 additions & 2 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ source_set("siwx917-common") {
]

sources = [
"${silabs_common_plat_dir}/BaseApplication.cpp",
"${silabs_common_plat_dir}/LEDWidget.cpp",
"${silabs_common_plat_dir}/MatterConfig.cpp",
"${silabs_common_plat_dir}/SoftwareFaultReports.cpp",
"${silabs_common_plat_dir}/heap_4_silabs.c",
"${silabs_common_plat_dir}/silabs_utils.cpp",
Expand All @@ -256,10 +258,8 @@ source_set("siwx917-common") {
"${wifi_sdk_dir}/ethernetif.cpp",
"${wifi_sdk_dir}/lwip_netif.cpp",
"${wifi_sdk_dir}/wfx_notify.cpp",
"BaseApplication.cpp",
"SiWx917/rsi_if.c",
"SiWx917/wfx_rsi_host.c",
"${silabs_common_plat_dir}/MatterConfig.cpp",
]

if (chip_enable_pw_rpc || chip_build_libshell) {
Expand Down
Loading

0 comments on commit 6a66d79

Please sign in to comment.