mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
feat(external coex): add set tx line flag api
This commit is contained in:
@@ -167,7 +167,9 @@ esp_err_t esp_disable_extern_coex_gpio_pin();
|
|||||||
* @brief Configure leader work mode, gpio pin correspondly and finally enable external coex,
|
* @brief Configure leader work mode, gpio pin correspondly and finally enable external coex,
|
||||||
* demand not to call the legacy function of `esp_enable_extern_coex_gpio_pin` any more.
|
* demand not to call the legacy function of `esp_enable_extern_coex_gpio_pin` any more.
|
||||||
* @param wire_type : to select the whole external coex gpio number.
|
* @param wire_type : to select the whole external coex gpio number.
|
||||||
* @param gpio_pin : gpio pin number to select.
|
* @param request : request gpio pin number to select.
|
||||||
|
* @param priority : priority gpio pin number to select.
|
||||||
|
* @param grant : grant gpio pin number to select.
|
||||||
* @return : ESP_OK - success, other - failed
|
* @return : ESP_OK - success, other - failed
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_external_coex_leader_role_set_gpio_pin(external_coex_wire_t wire_type, uint32_t request, uint32_t priority,
|
esp_err_t esp_external_coex_leader_role_set_gpio_pin(external_coex_wire_t wire_type, uint32_t request, uint32_t priority,
|
||||||
@@ -177,7 +179,9 @@ esp_err_t esp_external_coex_leader_role_set_gpio_pin(external_coex_wire_t wire_t
|
|||||||
* @brief Configure follower work mode, gpio pin correspondly and finally enable external coex,
|
* @brief Configure follower work mode, gpio pin correspondly and finally enable external coex,
|
||||||
* demand not to call the legacy function of `esp_enable_extern_coex_gpio_pin` any more.
|
* demand not to call the legacy function of `esp_enable_extern_coex_gpio_pin` any more.
|
||||||
* @param wire_type : to select the whole external coex gpio number.
|
* @param wire_type : to select the whole external coex gpio number.
|
||||||
* @param gpio_pin : gpio pin number to select.
|
* @param request : request gpio pin number to select.
|
||||||
|
* @param priority : priority gpio pin number to select.
|
||||||
|
* @param grant : grant gpio pin number to select.
|
||||||
* @return : ESP_OK - success, other - failed
|
* @return : ESP_OK - success, other - failed
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_external_coex_follower_role_set_gpio_pin(external_coex_wire_t wire_type, uint32_t request, uint32_t priority,
|
esp_err_t esp_external_coex_follower_role_set_gpio_pin(external_coex_wire_t wire_type, uint32_t request, uint32_t priority,
|
||||||
|
@@ -308,10 +308,13 @@ esp_err_t esp_coex_adapter_register(coex_adapter_funcs_t *funcs);
|
|||||||
/**
|
/**
|
||||||
* @brief Set external coexistence advanced informations, like working mode.
|
* @brief Set external coexistence advanced informations, like working mode.
|
||||||
*
|
*
|
||||||
|
* @param out_pti1 This parameter no longer works, will be deprecated and later removed in future releases.
|
||||||
|
* @param out_pti2 This parameter no longer works, will be deprecated and later removed in future releases.
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK: succeed
|
* - ESP_OK: succeed
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_coex_external_params(esp_external_coex_advance_t coex_info);
|
esp_err_t esp_coex_external_params(esp_external_coex_advance_t coex_info, uint32_t out_pti1, uint32_t out_pti2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set external coexistence pti level and enable it.
|
* @brief Set external coexistence pti level and enable it.
|
||||||
@@ -333,6 +336,18 @@ esp_err_t esp_coex_external_set(esp_coex_pti_level_t level1,
|
|||||||
* - ESP_OK: succeed
|
* - ESP_OK: succeed
|
||||||
*/
|
*/
|
||||||
void esp_coex_external_stop(void);
|
void esp_coex_external_stop(void);
|
||||||
|
|
||||||
|
#if SOC_EXTERNAL_COEX_LEADER_TX_LINE
|
||||||
|
/**
|
||||||
|
* @brief Enable external coexist tx line
|
||||||
|
*
|
||||||
|
* @param en Enable external coex tx line
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK: succeed
|
||||||
|
*/
|
||||||
|
void esp_coex_external_set_txline(bool en);
|
||||||
|
#endif /*SOC_EXTERNAL_COEX_LEADER_TX_LINE*/
|
||||||
#endif /*External Coex*/
|
#endif /*External Coex*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Submodule components/esp_coex/lib updated: 08e1c246c7...37698e17a4
@@ -164,7 +164,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SOC_EXTERNAL_COEX_ADVANCE
|
#if SOC_EXTERNAL_COEX_ADVANCE
|
||||||
esp_coex_external_params(g_external_coex_params);
|
esp_coex_external_params(g_external_coex_params, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(EXTERNAL_COEX_LEADER_ROLE == g_external_coex_params.work_mode) {
|
if(EXTERNAL_COEX_LEADER_ROLE == g_external_coex_params.work_mode) {
|
||||||
@@ -173,6 +173,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
|||||||
#if SOC_EXTERNAL_COEX_LEADER_TX_LINE
|
#if SOC_EXTERNAL_COEX_LEADER_TX_LINE
|
||||||
case EXTERN_COEX_WIRE_4:
|
case EXTERN_COEX_WIRE_4:
|
||||||
{
|
{
|
||||||
|
esp_coex_external_set_txline(true);
|
||||||
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.tx_line], PIN_FUNC_GPIO);
|
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_pin.tx_line], PIN_FUNC_GPIO);
|
||||||
gpio_set_direction(gpio_pin.tx_line, GPIO_MODE_OUTPUT);
|
gpio_set_direction(gpio_pin.tx_line, GPIO_MODE_OUTPUT);
|
||||||
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.tx_line));
|
REG_WRITE(GPIO_ENABLE_W1TC_REG, BIT(gpio_pin.tx_line));
|
||||||
@@ -254,10 +255,11 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* SOC_EXTERNAL_COEX_ADVANCE */
|
#else
|
||||||
return ESP_ERR_INVALID_ARG;
|
return ESP_ERR_INVALID_ARG;
|
||||||
|
#endif /* SOC_EXTERNAL_COEX_ADVANCE */
|
||||||
}
|
}
|
||||||
int ret = esp_coex_external_set(EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_HIGH);
|
esp_err_t ret = esp_coex_external_set(EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_HIGH);
|
||||||
if (ESP_OK != ret) {
|
if (ESP_OK != ret) {
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
Submodule components/esp_wifi/lib updated: fd77ffcf8e...82dd9020a4
@@ -172,21 +172,21 @@ void initialise_wifi(void)
|
|||||||
ESP_ERROR_CHECK(esp_wifi_start() );
|
ESP_ERROR_CHECK(esp_wifi_start() );
|
||||||
|
|
||||||
#if CONFIG_EXTERNAL_COEX_ENABLE
|
#if CONFIG_EXTERNAL_COEX_ENABLE
|
||||||
#if SOC_EXTERNAL_COEX_ADVANCE
|
|
||||||
uint32_t request = 1;
|
|
||||||
uint32_t priority = 2;
|
|
||||||
uint32_t grant = 3;
|
|
||||||
ESP_ERROR_CHECK(esp_external_coex_leader_role_set_gpio_pin(EXTERN_COEX_WIRE_3, request, priority, grant));
|
|
||||||
#else
|
|
||||||
esp_external_coex_gpio_set_t gpio_pin;
|
esp_external_coex_gpio_set_t gpio_pin;
|
||||||
gpio_pin.request = 1;
|
gpio_pin.request = 1;
|
||||||
gpio_pin.priority = 2;
|
gpio_pin.priority = 2;
|
||||||
gpio_pin.grant = 3;
|
gpio_pin.grant = 3;
|
||||||
|
#if SOC_EXTERNAL_COEX_LEADER_TX_LINE
|
||||||
gpio_pin.tx_line = 4;
|
gpio_pin.tx_line = 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
esp_external_coex_set_work_mode(EXTERNAL_COEX_LEADER_ROLE);
|
esp_external_coex_set_work_mode(EXTERNAL_COEX_LEADER_ROLE);
|
||||||
|
#if SOC_EXTERNAL_COEX_LEADER_TX_LINE
|
||||||
ESP_ERROR_CHECK(esp_enable_extern_coex_gpio_pin(EXTERN_COEX_WIRE_4, gpio_pin));
|
ESP_ERROR_CHECK(esp_enable_extern_coex_gpio_pin(EXTERN_COEX_WIRE_4, gpio_pin));
|
||||||
#endif
|
#else
|
||||||
#endif
|
ESP_ERROR_CHECK(esp_enable_extern_coex_gpio_pin(EXTERN_COEX_WIRE_3, gpio_pin));
|
||||||
|
#endif /* SOC_EXTERNAL_COEX_LEADER_TX_LINE */
|
||||||
|
#endif /* CONFIG_EXTERNAL_COEX_ENABLE */
|
||||||
|
|
||||||
#if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS
|
#if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||||
#if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_MU_STATS
|
#if CONFIG_ESP_WIFI_ENABLE_WIFI_RX_MU_STATS
|
||||||
|
Reference in New Issue
Block a user