Skip to content

Commit 5271440

Browse files
Grouped extern C statements
1 parent 0970062 commit 5271440

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

examples/platform/silabs/BaseApplication.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ class BaseApplication
165165
static void UpdateCommissioningStatus(bool newState);
166166

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

src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetPollPeriod(u
10901090

10911091
/**
10921092
* @brief Helper that sets callbacks for OpenThread state changes and configures the Thread stack.
1093-
* Assigns mOTInst to and instance and configures the OT stack on a device by setting state change callbacks enabling features
1093+
* Assigns mOTInst to an instance, and configures the OT stack on a device by setting state change callbacks enabling features
10941094
* for IPv6 address configuration, enabling the Thread network if necessary, and handling SRP if enabled.
10951095
* Allows for the configuration of the Thread stack on a device where the instance and the otCLI are already initialised.
10961096
*

src/platform/silabs/ConfigurationManagerImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,13 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void)
263263
/// @brief Helper to erase Thread info from device
264264
void ConfigurationManagerImpl::ClearThreadStack()
265265
{
266+
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
266267
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
267268
ThreadStackMgr().ClearAllSrpHostAndServices();
268269
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
269270
ChipLogProgress(DeviceLayer, "Clearing Thread provision");
270271
ThreadStackMgr().ErasePersistentInfo();
272+
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD
271273
}
272274

273275
void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
@@ -282,9 +284,7 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
282284
ChipLogError(DeviceLayer, "FactoryResetConfig() failed: %s", chip::ErrorStr(err));
283285
}
284286

285-
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
286287
GetDefaultInstance().ClearThreadStack();
287-
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD
288288

289289
PersistedStorage::KeyValueStoreMgrImpl().ErasePartition();
290290

src/platform/silabs/efr32/ThreadStackManagerImpl.cpp

+7-10
Original file line numberDiff line numberDiff line change
@@ -41,36 +41,33 @@
4141

4242
extern "C" {
4343
#include "platform-efr32.h"
44-
}
45-
46-
// Forward declaration
47-
extern "C" otInstance * otGetInstance(void);
48-
44+
otInstance * otGetInstance(void);
4945
#if CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
50-
extern "C" void otAppCliInit(otInstance * aInstance);
51-
#endif
46+
void otAppCliInit(otInstance * aInstance);
47+
#endif // CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
48+
}
5249

5350
namespace chip {
5451
namespace DeviceLayer {
5552
namespace {
5653
otInstance * sOTInstance = NULL;
5754

5855
// Network commissioning
59-
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
56+
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
6057
NetworkCommissioning::GenericThreadDriver sGenericThreadDriver;
6158
app::Clusters::NetworkCommissioning::Instance sThreadNetworkCommissioningInstance(0 /* Endpoint Id */, &sGenericThreadDriver);
6259
#endif
6360

6461
void initStaticNetworkCommissioningThreadDriver(void)
6562
{
66-
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
63+
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
6764
sThreadNetworkCommissioningInstance.Init();
6865
#endif
6966
}
7067

7168
void shutdownStaticNetworkCommissioningThreadDriver(void)
7269
{
73-
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
70+
#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_
7471
sThreadNetworkCommissioningInstance.Shutdown();
7572
#endif
7673
}

third_party/silabs/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ if (wifi_soc != true) { # CCP board
211211

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

215216
# Use silabs openthread library stack with or without coap api enabled
216217
COAP_API = ""

third_party/silabs/efr32_sdk.gni

+2
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,8 @@ template("efr32_sdk") {
916916
sources += [
917917
"${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c",
918918
"${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c",
919+
"${efr32_sdk_root}/util/third_party/mbedtls/library/hmac_drbg.c",
920+
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_ecp.c",
919921
]
920922
}
921923

third_party/silabs/lwip.gni

-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ template("lwip_target") {
169169
"${_lwip_root}/src/core/ipv6/ip6.c",
170170
"${_lwip_root}/src/core/ipv6/ip6_addr.c",
171171
"${_lwip_root}/src/core/ipv6/ip6_frag.c",
172-
"${_lwip_root}/src/core/ipv6/mld6.c",
173172
"${_lwip_root}/src/core/ipv6/nd6.c",
174173

175174
# TODO: When updating to next Si SDK version, revert change.

0 commit comments

Comments
 (0)