From 3c29376889f82a427d5342ea91924ac2323d0b34 Mon Sep 17 00:00:00 2001 From: chendejin Date: Fri, 31 May 2024 14:31:32 +0800 Subject: [PATCH] Added endpoint id for Thread network commissioning instance --- .../OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 12f9af57a44342..7e39a9d1c7b518 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -75,8 +75,12 @@ static_assert(OPENTHREAD_API_VERSION >= 219, "OpenThread version too old"); // Network commissioning namespace { #ifndef _NO_NETWORK_COMMISSIONING_DRIVER_ +#ifndef CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID +#define CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID (0) +#endif NetworkCommissioning::GenericThreadDriver sGenericThreadDriver; -app::Clusters::NetworkCommissioning::Instance sThreadNetworkCommissioningInstance(0 /* Endpoint Id */, &sGenericThreadDriver); +app::Clusters::NetworkCommissioning::Instance + sThreadNetworkCommissioningInstance(CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID /* Endpoint Id */, &sGenericThreadDriver); #endif void initNetworkCommissioningThreadDriver(void)