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-C5
(cherry picked from commit 1fc9676c99)
Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -979,3 +979,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.
|
||||
|
||||
@@ -44,6 +44,18 @@ int dtm_stack_enable(void);
|
||||
void dtm_stack_disable(void);
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
int conn_stack_initEnv(void);
|
||||
void conn_stack_deinitEnv(void);
|
||||
int conn_stack_enable(void);
|
||||
void conn_stack_disable(void);
|
||||
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
int conn_errorSim_initEnv(void);
|
||||
void conn_errorSim_deinitEnv(void);
|
||||
int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
int ble_single_env_init(void);
|
||||
void ble_single_env_deinit(void);
|
||||
@@ -63,17 +75,12 @@ int pawrSync_stack_enable(void);
|
||||
void pawrSync_stack_disable(void);
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
int conn_stack_initEnv(void);
|
||||
void conn_stack_deinitEnv(void);
|
||||
int conn_stack_enable(void);
|
||||
void conn_stack_disable(void);
|
||||
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
int conn_errorSim_initEnv(void);
|
||||
void conn_errorSim_deinitEnv(void);
|
||||
int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#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);
|
||||
@@ -200,12 +207,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();
|
||||
@@ -291,7 +306,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);
|
||||
@@ -310,6 +330,10 @@ 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