mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 13:00:19 +00:00
fix(ble): fixed dtm function error on ESP32-H2
(cherry picked from commit 43c82b3b20b458c6b5eeb48d197488e36c857b15) Co-authored-by: zwl <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -887,3 +887,7 @@ menu "Reserved Memory Config"
|
||||
The actual reserved memory count will be the minimum value between the maximum connection instances and
|
||||
the BT_LE_CONN_RESERVED_MEMORY_COUNT.
|
||||
endmenu
|
||||
|
||||
config BT_LE_DTM_ENABLED
|
||||
bool "Enable Direct Test Mode (DTM) feature"
|
||||
default n
|
||||
|
@@ -37,6 +37,13 @@ void sync_stack_deinitEnv(void);
|
||||
int sync_stack_enable(void);
|
||||
void sync_stack_disable(void);
|
||||
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
int dtm_stack_initEnv(void);
|
||||
void dtm_stack_deinitEnv(void);
|
||||
int dtm_stack_enable(void);
|
||||
void dtm_stack_disable(void);
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
int conn_errorSim_initEnv(void);
|
||||
void conn_errorSim_deinitEnv(void);
|
||||
@@ -115,6 +122,12 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
rc = dtm_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
rc = conn_stack_initEnv();
|
||||
@@ -140,6 +153,9 @@ void ble_stack_deinitEnv(void)
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_stack_deinitEnv();
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
dtm_stack_deinitEnv();
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
sync_stack_deinitEnv();
|
||||
extAdv_stack_deinitEnv();
|
||||
adv_stack_deinitEnv();
|
||||
@@ -170,6 +186,13 @@ int ble_stack_enable(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
rc = dtm_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
rc = conn_stack_enable();
|
||||
if (rc) {
|
||||
@@ -208,6 +231,9 @@ void ble_stack_disable(void)
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_stack_disable();
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_DTM_ENABLED
|
||||
dtm_stack_disable();
|
||||
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||
sync_stack_disable();
|
||||
extAdv_stack_disable();
|
||||
adv_stack_disable();
|
||||
|
Reference in New Issue
Block a user