mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-12 01:18:22 +00:00
fix(ble): fixed dtm function error on ESP32-C5
This commit is contained in:
@@ -859,3 +859,7 @@ menu "Reserved Memory Config"
|
|||||||
The actual reserved memory count will be the minimum value between the maximum
|
The actual reserved memory count will be the minimum value between the maximum
|
||||||
connection instances and the BT_LE_CONN_RESERVED_MEMORY_COUNT.
|
connection instances and the BT_LE_CONN_RESERVED_MEMORY_COUNT.
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
config BT_LE_DTM_ENABLED
|
||||||
|
bool "Enable Direct Test Mode (DTM) feature"
|
||||||
|
default n
|
||||||
|
@@ -32,6 +32,13 @@ void sync_stack_deinitEnv(void);
|
|||||||
int sync_stack_enable(void);
|
int sync_stack_enable(void);
|
||||||
void sync_stack_disable(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
|
||||||
|
|
||||||
int conn_stack_initEnv(void);
|
int conn_stack_initEnv(void);
|
||||||
void conn_stack_deinitEnv(void);
|
void conn_stack_deinitEnv(void);
|
||||||
int conn_stack_enable(void);
|
int conn_stack_enable(void);
|
||||||
@@ -115,6 +122,12 @@ int ble_stack_initEnv(void)
|
|||||||
return rc;
|
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
|
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||||
rc = conn_stack_initEnv();
|
rc = conn_stack_initEnv();
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -127,7 +140,6 @@ int ble_stack_initEnv(void)
|
|||||||
}
|
}
|
||||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,6 +151,9 @@ void ble_stack_deinitEnv(void)
|
|||||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||||
conn_stack_deinitEnv();
|
conn_stack_deinitEnv();
|
||||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||||
|
#if CONFIG_BT_LE_DTM_ENABLED
|
||||||
|
dtm_stack_deinitEnv();
|
||||||
|
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||||
sync_stack_deinitEnv();
|
sync_stack_deinitEnv();
|
||||||
extAdv_stack_deinitEnv();
|
extAdv_stack_deinitEnv();
|
||||||
adv_stack_deinitEnv();
|
adv_stack_deinitEnv();
|
||||||
@@ -169,6 +184,13 @@ int ble_stack_enable(void)
|
|||||||
return rc;
|
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
|
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||||
rc = conn_stack_enable();
|
rc = conn_stack_enable();
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -220,6 +242,9 @@ void ble_stack_disable(void)
|
|||||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||||
conn_stack_disable();
|
conn_stack_disable();
|
||||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||||
|
#if CONFIG_BT_LE_DTM_ENABLED
|
||||||
|
dtm_stack_disable();
|
||||||
|
#endif // CONFIG_BT_LE_DTM_ENABLED
|
||||||
sync_stack_disable();
|
sync_stack_disable();
|
||||||
extAdv_stack_disable();
|
extAdv_stack_disable();
|
||||||
adv_stack_disable();
|
adv_stack_disable();
|
||||||
|
Reference in New Issue
Block a user