mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(openthread): Fixed light sleep lock issue
This commit is contained in:
@ -58,12 +58,12 @@ static size_t hex_string_to_binary(const char *hex_string, uint8_t *buf, size_t
|
|||||||
|
|
||||||
esp_err_t esp_openthread_init(const esp_openthread_platform_config_t *config)
|
esp_err_t esp_openthread_init(const esp_openthread_platform_config_t *config)
|
||||||
{
|
{
|
||||||
ESP_RETURN_ON_ERROR(esp_openthread_platform_init(config), OT_PLAT_LOG_TAG,
|
|
||||||
"Failed to initialize OpenThread platform driver");
|
|
||||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||||
ESP_RETURN_ON_ERROR(esp_openthread_sleep_init(), OT_PLAT_LOG_TAG,
|
ESP_RETURN_ON_ERROR(esp_openthread_sleep_init(), OT_PLAT_LOG_TAG,
|
||||||
"Failed to initialize OpenThread esp pm_lock");
|
"Failed to initialize OpenThread esp pm_lock");
|
||||||
#endif
|
#endif
|
||||||
|
ESP_RETURN_ON_ERROR(esp_openthread_platform_init(config), OT_PLAT_LOG_TAG,
|
||||||
|
"Failed to initialize OpenThread platform driver");
|
||||||
esp_openthread_lock_acquire(portMAX_DELAY);
|
esp_openthread_lock_acquire(portMAX_DELAY);
|
||||||
ESP_RETURN_ON_FALSE(otInstanceInitSingle() != NULL, ESP_FAIL, OT_PLAT_LOG_TAG,
|
ESP_RETURN_ON_FALSE(otInstanceInitSingle() != NULL, ESP_FAIL, OT_PLAT_LOG_TAG,
|
||||||
"Failed to initialize OpenThread instance");
|
"Failed to initialize OpenThread instance");
|
||||||
|
Reference in New Issue
Block a user