Skip to content

Commit fbdf9d9

Browse files
committed
Merge branch 'fix/add_macros_for_otbr_v5.3' into 'release/v5.3'
fix(openthread): add macros for ot_br (v5.3) See merge request espressif/esp-idf!35893
2 parents c042aad + 5f19eb4 commit fbdf9d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/openthread/ot_br/main/esp_ot_br.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
#include "esp_openthread_lock.h"
2828
#include "esp_openthread_netif_glue.h"
2929
#include "esp_openthread_types.h"
30+
#if CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
3031
#include "esp_ot_cli_extension.h"
32+
#endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
3133
#include "esp_ot_config.h"
3234
#include "esp_ot_wifi_cmd.h"
3335
#include "esp_vfs_dev.h"
@@ -85,10 +87,17 @@ static void ot_task_worker(void *aContext)
8587
ESP_ERROR_CHECK(esp_openthread_init(&config));
8688
ESP_ERROR_CHECK(esp_netif_attach(openthread_netif, esp_openthread_netif_glue_init(&config)));
8789
esp_openthread_lock_acquire(portMAX_DELAY);
90+
#if CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC
91+
// The OpenThread log level directly matches ESP log level
8892
(void)otLoggingSetLevel(CONFIG_LOG_DEFAULT_LEVEL);
93+
#endif // CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC
94+
#if CONFIG_OPENTHREAD_CLI
8995
esp_openthread_cli_init();
96+
#if CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
9097
esp_cli_custom_command_init();
98+
#endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
9199
esp_openthread_cli_create_task();
100+
#endif // CONFIG_OPENTHREAD_CLI
92101
esp_openthread_lock_release();
93102

94103
// Run the main loop

0 commit comments

Comments
 (0)