Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and lpbeliveau-silabs committed Jul 18, 2024
1 parent 9f93eb7 commit a82a2bb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 250 deletions.
22 changes: 12 additions & 10 deletions examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ app::Clusters::NetworkCommissioning::Instance
sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::SlWiFiDriver::GetInstance()));
#endif /* SL_WIFI */

bool sIsEnabled = false;
bool sIsAttached = false;
bool sIsEnabled = false;
bool sIsAttached = false;

#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER)
bool sHaveBLEConnections = false;
Expand Down Expand Up @@ -160,9 +160,9 @@ Identify gIdentify = {

} // namespace

bool BaseApplication::sIsProvisioned = false;
bool BaseApplication::sIsFactoryResetTriggered = false;
LEDWidget * BaseApplication::sAppActionLed = nullptr;
bool BaseApplication::sIsProvisioned = false;
bool BaseApplication::sIsFactoryResetTriggered = false;
LEDWidget * BaseApplication::sAppActionLed = nullptr;
BaseApplicationDelegate BaseApplication::sAppDelegate = BaseApplicationDelegate();

#ifdef DIC_ENABLE
Expand Down Expand Up @@ -438,14 +438,14 @@ void BaseApplication::UpdateCommissioningStatus(bool newState)
{
#ifdef SL_WIFI
BaseApplication::sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned();
sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled();
sIsAttached = ConnectivityMgr().IsWiFiStationConnected();
sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled();
sIsAttached = ConnectivityMgr().IsWiFiStationConnected();
#endif /* SL_WIFI */
#if CHIP_ENABLE_OPENTHREAD
// TODO: This is a temporary solution until we can read Thread provisioning status from RAM instead of NVM.
BaseApplication::sIsProvisioned = newState;
sIsEnabled = ConnectivityMgr().IsThreadEnabled();
sIsAttached = ConnectivityMgr().IsThreadAttached();
sIsEnabled = ConnectivityMgr().IsThreadEnabled();
sIsAttached = ConnectivityMgr().IsThreadAttached();
#endif /* CHIP_ENABLE_OPENTHREAD */

ActivateStatusLedPatterns();
Expand Down Expand Up @@ -790,7 +790,9 @@ void BaseApplication::ScheduleFactoryReset()
{
Provision::Manager::GetInstance().SetProvisionRequired(true);
}
PlatformMgr().HandleServerShuttingDown(); // HandleServerShuttingDown calls OnShutdown() which is only implemented for the basic information cluster it seems. And triggers and Event flush, which is not relevant when there are no fabrics left
PlatformMgr().HandleServerShuttingDown(); // HandleServerShuttingDown calls OnShutdown() which is only implemented for the
// basic information cluster it seems. And triggers and Event flush, which is not
// relevant when there are no fabrics left
ConfigurationMgr().InitiateFactoryReset();
});
}
Expand Down
5 changes: 2 additions & 3 deletions examples/platform/silabs/BaseApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#include <app/util/config.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <credentials/FabricTable.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceEvent.h>
#include <platform/CHIPDeviceLayer.h>
#include <credentials/FabricTable.h>

#include "LEDWidget.h"

Expand Down Expand Up @@ -63,8 +63,7 @@
#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05)
#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06)

class BaseApplicationDelegate : public AppDelegate,
public chip::FabricTable::Delegate
class BaseApplicationDelegate : public AppDelegate, public chip::FabricTable::Delegate
{
private:
// AppDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,6 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::ConfigureThreadS
return err;
}


template <class ImplClass>
CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::DoInit(otInstance * otInst)
{
Expand Down
97 changes: 0 additions & 97 deletions src/platform/silabs/ThreadStackManagerImpl_CMSIS.h

This file was deleted.

138 changes: 0 additions & 138 deletions src/platform/silabs/efr32/ThreadStackManagerImpl_CMSIS.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ template("efr32_sdk") {
defines += [
"SL_OT_ENABLE=1",

#TODO: Remove these defines onse sl_openthread_rtos_config is included in sl_ot_rtos_adaptation.c
#TODO: Remove these defines once sl_openthread_rtos_config is included in sl_ot_rtos_adaptation.c
"SL_OPENTHREAD_RTOS_STACK_TASK_PRIORITY=24",
"SL_OPENTHREAD_RTOS_APP_TASK_PRIORITY=23",
"SL_OPENTHREAD_RTOS_CLI_TASK_PRIORITY=16",
Expand Down

0 comments on commit a82a2bb

Please sign in to comment.