Skip to content

Commit d112653

Browse files
ArekBalysNordicrlubos
authored andcommitted
samples: matter: Move GenericThreadDriver Instance to app layer
After the recent changes in Matter upstream, we need to create the Instance and Driver for Thread driver in application layer. Previously it was initialized in Matter device layer. Signed-off-by: Arkadiusz Balys <[email protected]>
1 parent d0ed1d9 commit d112653

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

samples/matter/common/src/app/matter_init.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
#include <platform/nrfconnect/KMUKeyAllocator.h>
5151
#endif
5252

53+
#ifdef CONFIG_OPENTHREAD
54+
#include <platform/OpenThread/GenericNetworkCommissioningThreadDriver.h>
55+
#endif
56+
5357
#include <app/InteractionModelEngine.h>
5458
#include <app/clusters/network-commissioning/network-commissioning.h>
5559
#include <credentials/examples/DeviceAttestationCredsExample.h>
@@ -73,6 +77,11 @@ Clusters::NetworkCommissioning::Instance Nrf::Matter::InitData::sWiFiCommissioni
7377
};
7478
#endif
7579

80+
#ifdef CONFIG_OPENTHREAD
81+
app::Clusters::NetworkCommissioning::InstanceAndDriver<NetworkCommissioning::GenericThreadDriver>
82+
sThreadNetworkDriver(0 /*endpointId*/);
83+
#endif
84+
7685
#ifdef CONFIG_CHIP_CRYPTO_PSA
7786
chip::Crypto::PSAOperationalKeystore Nrf::Matter::InitData::sOperationalKeystoreDefault{};
7887
#endif
@@ -180,6 +189,8 @@ CHIP_ERROR InitNetworkingStack()
180189
error = ConfigureThreadRole();
181190
VerifyOrReturnLogError(error == CHIP_NO_ERROR, error);
182191

192+
sThreadNetworkDriver.Init();
193+
183194
return error;
184195
}
185196

0 commit comments

Comments
 (0)