Skip to content

Commit

Permalink
Move header to common place (#26105)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Aug 3, 2023
1 parent 5b51cde commit feb2b10
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 57 deletions.
2 changes: 1 addition & 1 deletion examples/chef/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_ccpPlatform();
if (SI917MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
{
appError(CHIP_ERROR_INTERNAL);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_ccpPlatform();
if (SI917MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
{
appError(CHIP_ERROR_INTERNAL);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(void)
{
init_ccpPlatform();

if (SI917MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
Expand Down
8 changes: 4 additions & 4 deletions examples/platform/silabs/SiWx917/matter_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ using namespace ::chip::DeviceLayer;
#include "SiWx917DeviceDataProvider.h"

#if EFR32_OTA_ENABLED
void SI917MatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
#if 0 // TODO : OTA is not planned now for CCP
OTAConfig::Init();
#endif
}
#endif

void SI917MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg){
void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg){
// Initialize OTA only when Thread or WiFi connectivity is established
/*if (((event->Type == DeviceEventType::kThreadConnectivityChange) &&
(event->ThreadConnectivityChange.Result == kConnectivity_Established)) ||
Expand All @@ -79,7 +79,7 @@ void SI917MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event,
SILABS_LOG("Scheduling OTA Requestor initialization")
}

CHIP_ERROR SI917MatterConfig::InitMatter(const char * appName)
CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)
{
CHIP_ERROR err;

Expand Down Expand Up @@ -159,7 +159,7 @@ CHIP_ERROR SI917MatterConfig::InitMatter(const char * appName)
}

#ifdef SL_WIFI
void SI917MatterConfig::InitWiFi(void)
void SilabsMatterConfig::InitWiFi(void)
{
#ifdef RS911X_WIFI
/*
Expand Down
35 changes: 0 additions & 35 deletions examples/platform/silabs/SiWx917/matter_config.h

This file was deleted.

14 changes: 7 additions & 7 deletions examples/platform/silabs/efr32/matter_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys
#include <app/InteractionModelEngine.h>

#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS
ICDSubscriptionCallback EFR32MatterConfig::mICDSubscriptionHandler;
ICDSubscriptionCallback SilabsMatterConfig::mICDSubscriptionHandler;
#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS

#if CHIP_ENABLE_OPENTHREAD
Expand Down Expand Up @@ -87,10 +87,10 @@ void UnlockOpenThreadTask(void)
}

// ================================================================================
// EFR32MatterConfig Methods
// SilabsMatterConfig Methods
// ================================================================================

CHIP_ERROR EFR32MatterConfig::InitOpenThread(void)
CHIP_ERROR SilabsMatterConfig::InitOpenThread(void)
{
SILABS_LOG("Initializing OpenThread stack");
ReturnErrorOnFailure(ThreadStackMgr().InitThreadStack());
Expand All @@ -111,13 +111,13 @@ CHIP_ERROR EFR32MatterConfig::InitOpenThread(void)
#endif // CHIP_ENABLE_OPENTHREAD

#if EFR32_OTA_ENABLED
void EFR32MatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAConfig::Init();
}
#endif

void EFR32MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg)
void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg)
{
// Initialize OTA only when Thread or WiFi connectivity is established
if (((event->Type == DeviceEventType::kThreadConnectivityChange) &&
Expand All @@ -133,7 +133,7 @@ void EFR32MatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event,
}
}

CHIP_ERROR EFR32MatterConfig::InitMatter(const char * appName)
CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)
{
CHIP_ERROR err;

Expand Down Expand Up @@ -223,7 +223,7 @@ CHIP_ERROR EFR32MatterConfig::InitMatter(const char * appName)
}

#ifdef SL_WIFI
void EFR32MatterConfig::InitWiFi(void)
void SilabsMatterConfig::InitWiFi(void)
{
#ifdef WF200_WIFI
// Start wfx bus communication task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "ICDSubscriptionCallback.h"
#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS

class EFR32MatterConfig
class SilabsMatterConfig
{
public:
static CHIP_ERROR InitMatter(const char * appName);
Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
int main(void)
{
init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/window-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(void)
CHIP_ERROR err = CHIP_NO_ERROR;

init_ccpPlatform();
if (SI917MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage());
Expand Down
2 changes: 1 addition & 1 deletion examples/window-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(void)
CHIP_ERROR err = CHIP_NO_ERROR;

init_efrPlatform();
if (EFR32MatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
if (SilabsMatterConfig::InitMatter(BLE_DEV_NAME) != CHIP_NO_ERROR)
appError(CHIP_ERROR_INTERNAL);

gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage());
Expand Down

0 comments on commit feb2b10

Please sign in to comment.