diff --git a/components/esp_coex/include/esp_coex_i154.h b/components/esp_coex/include/esp_coex_i154.h index d601205ebe..f817e90140 100644 --- a/components/esp_coex/include/esp_coex_i154.h +++ b/components/esp_coex/include/esp_coex_i154.h @@ -6,6 +6,9 @@ #ifndef __COEXIST_I154_H__ #define __COEXIST_I154_H__ +/** + * @brief 802.15.4 coex event + */ typedef enum { IEEE802154_HIGH = 1, IEEE802154_MIDDLE, @@ -14,16 +17,50 @@ typedef enum { IEEE802154_EVENT_MAX, } ieee802154_coex_event_t; +/** + * @brief 802.15.4 coexistence configurations + */ typedef struct { ieee802154_coex_event_t idle; ieee802154_coex_event_t txrx; ieee802154_coex_event_t txrx_at; } esp_ieee802154_coex_config_t; +/** + * @brief Set 802.15.4 tx/rx pti + * @param 802.15.4 coexistence event + */ void esp_coex_ieee802154_txrx_pti_set(ieee802154_coex_event_t event); + +/** + * @brief Set 802.15.4 ack pti + * @param 802.15.4 coexistence event + */ void esp_coex_ieee802154_ack_pti_set(ieee802154_coex_event_t event); + +/** + * @brief Indicate that a coexistence break occurred in 802.15.4 + */ void esp_coex_ieee802154_coex_break_notify(void); + +/** + * @brief Enter the TX stage for 802.15.4 external coexistence handling + */ void esp_coex_ieee802154_extcoex_tx_stage(void); + +/** + * @brief Enter the RX stage for 802.15.4 external coexistence handling + */ void esp_coex_ieee802154_extcoex_rx_stage(void); +/** + * @brief Enable the 802.15.4 status for coexistence + */ +void esp_coex_ieee802154_status_enable(void); + +/** + * @brief Disable the 802.15.4 status for coexistence + */ +void esp_coex_ieee802154_status_disable(void); + #endif diff --git a/components/esp_coex/include/private/esp_coexist_internal.h b/components/esp_coex/include/private/esp_coexist_internal.h index 6e3799487f..026f1f9fe0 100644 --- a/components/esp_coex/include/private/esp_coexist_internal.h +++ b/components/esp_coex/include/private/esp_coexist_internal.h @@ -32,6 +32,8 @@ typedef enum { COEX_SCHM_ST_TYPE_WIFI = 0, COEX_SCHM_ST_TYPE_BLE, COEX_SCHM_ST_TYPE_BT, + COEX_SCHM_ST_TYPE_EXTERNAL_COEX, + COEX_SCHM_ST_TYPE_I154, } coex_schm_st_type_t; #define COEX_STATUS_GET_WIFI_BITMAP (1 << COEX_SCHM_ST_TYPE_WIFI) diff --git a/components/esp_coex/lib b/components/esp_coex/lib index 2d68674e3d..adb3badffe 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit 2d68674e3d522fb025e4666217f9cc1ca2af9399 +Subproject commit adb3badffe1201033d23c0a3ab596faadd673539 diff --git a/components/esp_coex/src/coexist.c b/components/esp_coex/src/coexist.c index a723fd5a73..3d916c69dc 100644 --- a/components/esp_coex/src/coexist.c +++ b/components/esp_coex/src/coexist.c @@ -21,6 +21,10 @@ #include "esp_private/esp_modem_clock.h" #endif +#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && CONFIG_SOC_IEEE802154_SUPPORTED +#include "esp_coex_i154.h" +#endif + #if SOC_EXTERNAL_COEX_ADVANCE #define EXTERNAL_COEX_SIGNAL_I0_IDX EXTERN_ACTIVE_I_IDX #define EXTERNAL_COEX_SIGNAL_I1_IDX EXTERN_PRIORITY_I_IDX @@ -289,7 +293,7 @@ esp_err_t esp_coex_wifi_i154_enable(void) // TODO: Add a scheme for wifi and 154 coex. // Remove this function if FCC-50 closes. coex_enable(); - coex_schm_status_bit_set(1, 1); + esp_coex_ieee802154_status_enable(); return ESP_OK; } #endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 0e7080ea59..a3ae65ccff 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 0e7080ea59152258608522876ac91b227e1883e9 +Subproject commit a3ae65ccff12c5389877a295fce26254cb09f765