Skip to content

Commit

Permalink
Added endpoint id for Thread network commissioning instance
Browse files Browse the repository at this point in the history
  • Loading branch information
DejinChen committed Jun 4, 2024
1 parent 923854b commit ca1a2f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
# devices with multiple radios that have different sleep behavior for
# different radios.
chip_device_config_enable_dynamic_mrp_config = false

# Define the default endpoint id for the generic Thread network commissioning instance
chip_device_config_thread_network_endpoint_id = 0
}

if (chip_stack_lock_tracking == "auto") {
Expand Down Expand Up @@ -389,6 +392,11 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {

defines += [ "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}" ]

if (chip_enable_openthread && chip_device_platform != "linux" &&
chip_device_platform != "tizen" && chip_device_platform != "webos") {
defines += [ "CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID=${chip_device_config_thread_network_endpoint_id}" ]
}

visibility = [
":platform_config_header",
"${chip_root}/src/ble:ble_config_header",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static_assert(OPENTHREAD_API_VERSION >= 219, "OpenThread version too old");
namespace {
#ifndef _NO_NETWORK_COMMISSIONING_DRIVER_
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)
Expand Down

0 comments on commit ca1a2f7

Please sign in to comment.