component/bt: Added the bluedroid environment variable dynomic malloc support & support to malloc the memory to the psram.

component/bt: Added the Macro for the classic BT support.
component/bt: added the bluedroid deinit method.
component/bt: allow more classic BT global variables to use dynamic allocation scheme
1. allocate memory for AVDT, AVCT control blocks when dynamic memory is used
2. allow SBC decoder buffer to use dynamic allocation scheme
component/bt: Remove the wrong changes in bt/Kconfig & Added the GATTS_INCLUDED in the gatt_free function when gatt service close.
component/bt: Shorten the abbreviation BT_ALLOCATION_FROM_SPIRAM_FIRST and BT_BLE_DYNAMIC_ENV_MEMORY two macros.
This commit is contained in:
Yulong
2017-10-18 03:34:43 -04:00
committed by yulong
parent 2a10ffce5f
commit 63e5cbbd66
38 changed files with 379 additions and 51 deletions

View File

@@ -119,12 +119,15 @@ void btu_free_core(void)
l2c_free();
#if BLE_INCLUDED == TRUE
#if (defined(GATTS_INCLUDED) && GATTS_INCLUDED == true)
#if (defined(GATT_INCLUDED) && GATT_INCLUDED == true)
gatt_free();
#endif
btm_ble_free();
#endif
btm_free();
#if SMP_INCLUDED == TRUE
SMP_Free();
#endif
}
/*****************************************************************************
@@ -141,6 +144,9 @@ void btu_free_core(void)
******************************************************************************/
void BTU_StartUp(void)
{
#if BTU_DYNAMIC_MEMORY
btu_cb_ptr = (tBTU_CB *)osi_malloc(sizeof(tBTU_CB));
#endif /* #if BTU_DYNAMIC_MEMORY */
memset (&btu_cb, 0, sizeof (tBTU_CB));
btu_cb.trace_level = HCI_INITIAL_TRACE_LEVEL;
@@ -182,6 +188,9 @@ error_exit:;
void BTU_ShutDown(void)
{
#if BTU_DYNAMIC_MEMORY
FREE_AND_RESET(btu_cb_ptr);
#endif
btu_task_shut_down();
hash_map_free(btu_general_alarm_hash_map);