Skip to content

Commit

Permalink
Grouped extern C statements
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs committed Jul 19, 2024
1 parent 1443a45 commit 0478e63
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/platform/silabs/BaseApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ class BaseApplication
static void UpdateCommissioningStatus(bool newState);

/**
* @brief Called when the last Fabric is removed, clears all Fabric related data and Thread Wifi provision.
* @note This function preserves some NVM3 data that is not Fabric scoped like Attribute Value or Boot Count.
* @brief Called when the last Fabric is removed, clears all Fabric related data, including Thread and Wifi provision.
* @note This function preserves some NVM3 data that is not Fabric scoped, like Attribute Value or Boot Count.
*/
static void DoProvisioningReset();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetPollPeriod(u

/**
* @brief Helper that sets callbacks for OpenThread state changes and configures the Thread stack.
* Assigns mOTInst to and instance and configures the OT stack on a device by setting state change callbacks enabling features
* Assigns mOTInst to an instance, and configures the OT stack on a device by setting state change callbacks enabling features
* for IPv6 address configuration, enabling the Thread network if necessary, and handling SRP if enabled.
* Allows for the configuration of the Thread stack on a device where the instance and the otCLI are already initialised.
*
Expand Down
17 changes: 7 additions & 10 deletions src/platform/silabs/efr32/ThreadStackManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,33 @@

extern "C" {
#include "platform-efr32.h"
}

// Forward declaration
extern "C" otInstance * otGetInstance(void);

otInstance * otGetInstance(void);
#if CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
extern "C" void otAppCliInit(otInstance * aInstance);
#endif
void otAppCliInit(otInstance * aInstance);
#endif // CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
}

namespace chip {
namespace DeviceLayer {
namespace {
otInstance * sOTInstance = NULL;

// Network commissioning
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
NetworkCommissioning::GenericThreadDriver sGenericThreadDriver;
app::Clusters::NetworkCommissioning::Instance sThreadNetworkCommissioningInstance(0 /* Endpoint Id */, &sGenericThreadDriver);
#endif

void initStaticNetworkCommissioningThreadDriver(void)
{
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
sThreadNetworkCommissioningInstance.Init();
#endif
}

void shutdownStaticNetworkCommissioningThreadDriver(void)
{
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
sThreadNetworkCommissioningInstance.Shutdown();
#endif
}
Expand Down
1 change: 1 addition & 0 deletions third_party/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ if (wifi_soc != true) { # CCP board

include_dirs = [ "${sl_ot_platform_abstraction}/include" ]
}
sources += [ "${sl_ot_platform_abstraction}/efr32/sleep.c" ]

# Use silabs openthread library stack with or without coap api enabled
COAP_API = ""
Expand Down
2 changes: 2 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,8 @@ template("efr32_sdk") {
sources += [
"${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c",
"${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/hmac_drbg.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_ecp.c",
]
}

Expand Down

0 comments on commit 0478e63

Please sign in to comment.