mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 22:16:46 +00:00
feat(15.4): support setting 15.4 txrx pti when coex is enabled
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -22,20 +22,39 @@ uint8_t ieee802154_channel_to_freq(uint8_t channel)
|
||||
}
|
||||
|
||||
#if !CONFIG_IEEE802154_TEST && (CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE)
|
||||
|
||||
esp_ieee802154_coex_config_t s_coex_config = {
|
||||
.idle = IEEE802154_IDLE,
|
||||
.txrx = IEEE802154_LOW,
|
||||
.txrx_at = IEEE802154_MIDDLE,
|
||||
};
|
||||
|
||||
void ieee802154_set_coex_config(esp_ieee802154_coex_config_t config)
|
||||
{
|
||||
s_coex_config.idle = config.idle;
|
||||
s_coex_config.txrx = config.txrx;
|
||||
s_coex_config.txrx_at = config.txrx_at;
|
||||
}
|
||||
|
||||
esp_ieee802154_coex_config_t ieee802154_get_coex_config(void)
|
||||
{
|
||||
return s_coex_config;
|
||||
}
|
||||
|
||||
void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene)
|
||||
{
|
||||
|
||||
switch (txrx_scene) {
|
||||
case IEEE802154_SCENE_IDLE:
|
||||
esp_coex_ieee802154_txrx_pti_set(IEEE802154_IDLE);
|
||||
esp_coex_ieee802154_txrx_pti_set(s_coex_config.idle);
|
||||
break;
|
||||
case IEEE802154_SCENE_TX:
|
||||
case IEEE802154_SCENE_RX:
|
||||
esp_coex_ieee802154_txrx_pti_set(IEEE802154_LOW);
|
||||
esp_coex_ieee802154_txrx_pti_set(s_coex_config.txrx);
|
||||
break;
|
||||
case IEEE802154_SCENE_TX_AT:
|
||||
case IEEE802154_SCENE_RX_AT:
|
||||
esp_coex_ieee802154_txrx_pti_set(IEEE802154_MIDDLE);
|
||||
esp_coex_ieee802154_txrx_pti_set(s_coex_config.txrx_at);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
|
Reference in New Issue
Block a user