mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/assert_10_9_when_AFPM_occur_v4.2' into 'release/v4.2'
Bugfix/assert 10 9 when afpm occur v4.2, Changed the check order for esp_bt_controller_init(release/v4.2) See merge request espressif/esp-idf!10984
This commit is contained in:
@ -1176,6 +1176,11 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
esp_err_t err;
|
esp_err_t err;
|
||||||
uint32_t btdm_cfg_mask = 0;
|
uint32_t btdm_cfg_mask = 0;
|
||||||
|
|
||||||
|
//if all the bt available memory was already released, cannot initialize bluetooth controller
|
||||||
|
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
|
||||||
|
return ESP_ERR_INVALID_STATE;
|
||||||
|
}
|
||||||
|
|
||||||
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
|
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
|
||||||
if (osi_funcs_p == NULL) {
|
if (osi_funcs_p == NULL) {
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
@ -1190,11 +1195,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
return ESP_ERR_INVALID_STATE;
|
return ESP_ERR_INVALID_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if all the bt available memory was already released, cannot initialize bluetooth controller
|
|
||||||
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
|
|
||||||
return ESP_ERR_INVALID_STATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cfg == NULL) {
|
if (cfg == NULL) {
|
||||||
return ESP_ERR_INVALID_ARG;
|
return ESP_ERR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
|
Submodule components/bt/controller/lib updated: 85be5e8cf1...fc5dd70b42
Reference in New Issue
Block a user