Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added endpoint id for Thread network commissioning instance #33685

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading