feat(openthread): make esp_netif glue optional

Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
This commit is contained in:
Zhibin (Ryan) Wen
2026-04-23 21:12:26 +08:00
committed by BOT
parent d125a34453
commit 144de20960
7 changed files with 51 additions and 26 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ static void ot_task_worker(void *aContext)
// Initialize the OpenThread stack
ESP_ERROR_CHECK(esp_openthread_init(&(config->platform_config)));
#if CONFIG_OPENTHREAD_FTD || CONFIG_OPENTHREAD_MTD
#if CONFIG_OPENTHREAD_PLATFORM_NETIF
esp_netif_t *openthread_netif = esp_netif_new(&(config->netif_config));
assert(openthread_netif != NULL);
ESP_ERROR_CHECK(esp_netif_attach(openthread_netif, esp_openthread_netif_glue_init(&(config->platform_config))));
@@ -270,7 +270,7 @@ static void ot_task_worker(void *aContext)
// esp_openthread_cli_console_command_unregister is not provided on idf 5.2
#if CONFIG_OPENTHREAD_FTD || CONFIG_OPENTHREAD_MTD
#if CONFIG_OPENTHREAD_PLATFORM_NETIF
// Clean up
esp_openthread_netif_glue_deinit();
esp_netif_destroy(openthread_netif);