mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(ble): support adv fast tx feature on ESP32-C6 and ESP32-H2
(cherry picked from commit 84924e3980)
Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -1000,3 +1000,12 @@ config BT_LE_CTRL_DL_ITVL_PHY_SYNC_EN
|
||||
When this option is enabled, the Controller automatically initiates a data length update
|
||||
Using the appropriate data length parameters
|
||||
When a PHY update or a connection interval update occurs.
|
||||
|
||||
config BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
bool "Reduce adv enable-to-air latency (READ DOCS FIRST) (EXPERIMENTAL)"
|
||||
default n
|
||||
help
|
||||
Reduce the latency between issuing the advertising enable command
|
||||
and the actual on-air transmission by executing the advertising TX
|
||||
path from IRAM.
|
||||
Note: Enabling this option increases IRAM usage.
|
||||
|
||||
@@ -80,6 +80,13 @@ int pawrSync_stack_enable(void);
|
||||
void pawrSync_stack_disable(void);
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
int advFastTx_stack_initEnv(void);
|
||||
void advFastTx_stack_deinitEnv(void);
|
||||
int advFastTx_stack_enable(void);
|
||||
void advFastTx_stack_disable(void);
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
@@ -211,12 +218,20 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_deinitEnv(void)
|
||||
{
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_deinitEnv();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_deinitEnv();
|
||||
pawrBcast_stack_deinitEnv();
|
||||
@@ -302,7 +317,12 @@ int ble_stack_enable(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
@@ -321,6 +341,9 @@ void ble_stack_disable(void)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_disable();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_disable();
|
||||
pawrBcast_stack_disable();
|
||||
|
||||
Reference in New Issue
Block a user