[build] enable coexistence parameter build (#7540)
This commit enables defining
OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE, which can be used by
external build system (i.e. Matter) to override the platform
defaults. This is useful for platforms having transceivers that also
support coexistence between multiple protocols (WiFi/BLE etc.)`
diff --git a/etc/gn/openthread.gni b/etc/gn/openthread.gni
index a64d833..fe494b0 100644
--- a/etc/gn/openthread.gni
+++ b/etc/gn/openthread.gni
@@ -231,6 +231,9 @@
# Enable builtin mbedtls management
openthread_config_enable_builtin_mbedtls_management =
openthread_external_mbedtls == ""
+
+ # Enable radio coexistence
+ openthread_config_coexistence_enable = false
}
}
diff --git a/src/core/BUILD.gn b/src/core/BUILD.gn
index 25cd1a1..bd837f5 100644
--- a/src/core/BUILD.gn
+++ b/src/core/BUILD.gn
@@ -264,6 +264,10 @@
if (openthread_config_otns_enable) {
defines += [ "OPENTHREAD_CONFIG_OTNS_ENABLE=1" ]
}
+
+ if (openthread_config_coexistence_enable) {
+ defines += [ "OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE=1" ]
+ }
}
}