mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(openthread): add different led color for openthread devices
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
@@ -38,6 +39,10 @@
|
||||
#include "openthread/logging.h"
|
||||
#include "openthread/tasklet.h"
|
||||
|
||||
#if CONFIG_OPENTHREAD_STATE_INDICATOR_ENABLE
|
||||
#include "ot_led_strip.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
|
||||
#include "esp_ot_cli_extension.h"
|
||||
#endif // CONFIG_OPENTHREAD_CLI_ESP_EXTENSION
|
||||
@@ -65,6 +70,10 @@ static void ot_task_worker(void *aContext)
|
||||
// Initialize the OpenThread stack
|
||||
ESP_ERROR_CHECK(esp_openthread_init(&config));
|
||||
|
||||
#if CONFIG_OPENTHREAD_STATE_INDICATOR_ENABLE
|
||||
ESP_ERROR_CHECK(esp_openthread_state_indicator_init(esp_openthread_get_instance()));
|
||||
#endif
|
||||
|
||||
#if CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC
|
||||
// The OpenThread log level directly matches ESP log level
|
||||
(void)otLoggingSetLevel(CONFIG_LOG_DEFAULT_LEVEL);
|
||||
|
||||
Reference in New Issue
Block a user