mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 02:20:57 +02:00
feat(ble): support pawr feature in ble sdk on ESP32-C6
This commit is contained in:
@@ -237,6 +237,13 @@ config BT_LE_CTE_FEATURE_ENABLED
|
||||
This feature allows devices to determine the direction of a Bluetooth CTE signal,
|
||||
enabling Angle of Arrival (AoA) and Angle of Departure (AoD) functionality.
|
||||
|
||||
config BT_LE_PERIODIC_ADV_WITH_RESPONSE_ENABLED
|
||||
bool "Enable BLE periodic advertising with response"
|
||||
depends on BT_LE_50_FEATURE_SUPPORT
|
||||
default n
|
||||
help
|
||||
This enables BLE periodic advertising with response feature
|
||||
|
||||
menu "Memory Settings"
|
||||
depends on !BT_NIMBLE_ENABLED
|
||||
|
||||
|
@@ -17,11 +17,6 @@ void base_stack_deinitEnv(void);
|
||||
int base_stack_enable(void);
|
||||
void base_stack_disable(void);
|
||||
|
||||
int conn_stack_initEnv(void);
|
||||
void conn_stack_deinitEnv(void);
|
||||
int conn_stack_enable(void);
|
||||
void conn_stack_disable(void);
|
||||
|
||||
int adv_stack_initEnv(void);
|
||||
void adv_stack_deinitEnv(void);
|
||||
int adv_stack_enable(void);
|
||||
@@ -44,6 +39,11 @@ 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);
|
||||
@@ -51,6 +51,25 @@ 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);
|
||||
int ble_single_init(void);
|
||||
void ble_single_deinit(void);
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
int pawrBcast_stack_initEnv(void);
|
||||
void pawrBcast_stack_deinitEnv(void);
|
||||
int pawrBcast_stack_enable(void);
|
||||
void pawrBcast_stack_disable(void);
|
||||
|
||||
int pawrSync_stack_initEnv(void);
|
||||
void pawrSync_stack_deinitEnv(void);
|
||||
int pawrSync_stack_enable(void);
|
||||
void pawrSync_stack_disable(void);
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
@@ -61,9 +80,6 @@ void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
void log_stack_enableLogsRelatedVsCmd(bool en);
|
||||
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
|
||||
void winWiden_stack_enableSetConstPeerScaVsCmd(bool en);
|
||||
#if CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
void conn_stack_enableSetPrefTxRxCntVsCmd(bool en);
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
|
||||
void adv_stack_enableScanReqRxdVsEvent(bool en);
|
||||
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
|
||||
@@ -88,9 +104,6 @@ void ble_stack_enableVsCmds(bool en)
|
||||
log_stack_enableLogsRelatedVsCmd(en);
|
||||
hci_stack_enableSetVsEvtMaskVsCmd(en);
|
||||
winWiden_stack_enableSetConstPeerScaVsCmd(en);
|
||||
#if CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
conn_stack_enableSetPrefTxRxCntVsCmd(en);
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
}
|
||||
|
||||
void ble_stack_enableVsEvents(bool en)
|
||||
@@ -113,19 +126,6 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
rc = conn_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
rc = conn_errorSim_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
|
||||
rc = adv_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
@@ -147,11 +147,58 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
rc = conn_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
rc = conn_errorSim_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
rc = ble_single_env_init();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = ble_single_init();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
rc = pawrBcast_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = pawrSync_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_deinitEnv(void)
|
||||
{
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_deinitEnv();
|
||||
pawrBcast_stack_deinitEnv();
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
ble_single_deinit();
|
||||
ble_single_env_deinit();
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED || CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_errorSim_deinitEnv();
|
||||
@@ -161,6 +208,7 @@ void ble_stack_deinitEnv(void)
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
dtm_stack_deinitEnv();
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
sync_stack_deinitEnv();
|
||||
extAdv_stack_deinitEnv();
|
||||
adv_stack_deinitEnv();
|
||||
@@ -210,6 +258,17 @@ int ble_stack_enable(void)
|
||||
}
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
rc = pawrBcast_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = pawrSync_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
@@ -229,7 +288,10 @@ void ble_stack_disable(void)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_disable();
|
||||
pawrBcast_stack_disable();
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_errorSim_disable();
|
||||
|
@@ -46,6 +46,11 @@ extern "C" {
|
||||
#else
|
||||
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
|
||||
#endif
|
||||
#if CONFIG_BT_NIMBLE_PERIODIC_ADV_WITH_RESPONSES
|
||||
#define DEFAULT_BT_LE_PAWR_SUPPORTED (1)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_PAWR_SUPPORTED (0)
|
||||
#endif // CONFIG_BT_NIMBLE_PERIODIC_ADV_WITH_RESPONSES
|
||||
#else
|
||||
|
||||
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
|
||||
@@ -72,6 +77,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_MAX_CONNECTIONS (2)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_LE_PERIODIC_ADV_WITH_RESPONSE_ENABLED)
|
||||
#define DEFAULT_BT_LE_PAWR_SUPPORTED (CONFIG_BT_LE_PERIODIC_ADV_WITH_RESPONSE_ENABLED)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_PAWR_SUPPORTED (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_LE_ACL_BUF_SIZE)
|
||||
#define DEFAULT_BT_LE_ACL_BUF_SIZE (CONFIG_BT_LE_ACL_BUF_SIZE)
|
||||
#else
|
||||
|
Reference in New Issue
Block a user