File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
examples/openthread/ot_br/main Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments