Skip to content

Commit

Permalink
move local variable to a namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs committed Apr 5, 2024
1 parent 0d69202 commit 6834522
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,6 @@ using namespace ::chip::DeviceLayer;
using namespace ::chip::Credentials::Silabs;
using namespace chip::DeviceLayer::Silabs;

constexpr uint32_t kMainTaskStackSize = (1024 * 5);
// Task is dynamically allocated with max priority. This task gets deleted once the inits are completed.
constexpr osThreadAttr_t kMainTaskAttr = { .name = "main",
.attr_bits = osThreadDetached,
.cb_mem = NULL,
.cb_size = 0U,
.stack_mem = NULL,
.stack_size = kMainTaskStackSize,
.priority = osPriorityRealtime7 };
osThreadId_t sMainTaskHandle;

volatile int apperror_cnt;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

#if CHIP_ENABLE_OPENTHREAD
#include <inet/EndPointStateOpenThread.h>
#include <openthread/cli.h>
Expand Down Expand Up @@ -158,6 +144,19 @@ CHIP_ERROR SilabsMatterConfig::InitOpenThread(void)
#endif // CHIP_ENABLE_OPENTHREAD

namespace {

constexpr uint32_t kMainTaskStackSize = (1024 * 5);
// Task is dynamically allocated with max priority. This task gets deleted once the inits are completed.
constexpr osThreadAttr_t kMainTaskAttr = { .name = "main",
.attr_bits = osThreadDetached,
.cb_mem = NULL,
.cb_size = 0U,
.stack_mem = NULL,
.stack_size = kMainTaskStackSize,
.priority = osPriorityRealtime7 };
osThreadId_t sMainTaskHandle;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

void ApplicationStart(void * unused)
{
CHIP_ERROR err = SilabsMatterConfig::InitMatter(BLE_DEV_NAME);
Expand Down

0 comments on commit 6834522

Please sign in to comment.