Skip to content

Commit

Permalink
using blank namespace for application_start() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak-Shaha committed Mar 21, 2024
1 parent fee4bc3 commit 90ff4c6
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,28 @@ CHIP_ERROR SilabsMatterConfig::InitOpenThread(void)
}
#endif // CHIP_ENABLE_OPENTHREAD

void application_start(void * unused)
{
CHIP_ERROR err = SilabsMatterConfig::InitMatter(BLE_DEV_NAME);
if (err != CHIP_NO_ERROR)
appError(err);
namespace {
void application_start(void * unused)
{
CHIP_ERROR err = SilabsMatterConfig::InitMatter(BLE_DEV_NAME);
if (err != CHIP_NO_ERROR)
appError(err);

gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage());
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);
gExampleDeviceInfoProvider.SetStorageDelegate(&chip::Server::GetInstance().GetPersistentStorage());
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Credentials::Silabs::GetSilabsDacProvider());
chip::DeviceLayer::PlatformMgr().UnlockChipStack();
chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Credentials::Silabs::GetSilabsDacProvider());
chip::DeviceLayer::PlatformMgr().UnlockChipStack();

SILABS_LOG("Starting App Task");
err = AppTask::GetAppTask().StartAppTask();
if (err != CHIP_NO_ERROR)
appError(err);
SILABS_LOG("Starting App Task");
err = AppTask::GetAppTask().StartAppTask();
if (err != CHIP_NO_ERROR)
appError(err);

vTaskDelete(main_Task);
vTaskDelete(main_Task);
}
}

void SilabsMatterConfig::AppInit()
Expand Down

0 comments on commit 90ff4c6

Please sign in to comment.