fix(wifi): fix esp32c5 enable external coex fail issue

This commit is contained in:
muhaidong 2024-09-20 15:49:07 +08:00
parent ba302e45dd
commit 779bbff03c

View File

@ -6,6 +6,7 @@
#include "esp_coexist.h" #include "esp_coexist.h"
#include "private/esp_coexist_internal.h" #include "private/esp_coexist_internal.h"
#include "soc/soc_caps.h"
#if CONFIG_EXTERNAL_COEX_ENABLE #if CONFIG_EXTERNAL_COEX_ENABLE
#include "esp_log.h" #include "esp_log.h"
@ -18,6 +19,10 @@
#include "esp_attr.h" #include "esp_attr.h"
#endif #endif
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
#include "esp_private/esp_modem_clock.h"
#endif
#if SOC_EXTERNAL_COEX_ADVANCE #if SOC_EXTERNAL_COEX_ADVANCE
#define EXTERNAL_COEX_SIGNAL_I0_IDX EXTERN_ACTIVE_I_IDX #define EXTERNAL_COEX_SIGNAL_I0_IDX EXTERN_ACTIVE_I_IDX
#define EXTERNAL_COEX_SIGNAL_I1_IDX EXTERN_PRIORITY_I_IDX #define EXTERNAL_COEX_SIGNAL_I1_IDX EXTERN_PRIORITY_I_IDX
@ -163,6 +168,9 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
return ESP_ERR_INVALID_ARG; return ESP_ERR_INVALID_ARG;
} }
esp_coex_external_set_wire_type(wire_type); esp_coex_external_set_wire_type(wire_type);
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
modem_clock_module_enable(PERIPH_COEX_MODULE);
#endif
#if SOC_EXTERNAL_COEX_ADVANCE #if SOC_EXTERNAL_COEX_ADVANCE
esp_coex_external_params(g_external_coex_params, 0, 0); esp_coex_external_params(g_external_coex_params, 0, 0);
#endif #endif