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

@@ -48,6 +48,8 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
/********************************************************************************/
#if L2C_DYNAMIC_MEMORY == FALSE
tL2C_CB l2cb;
#else
tL2C_CB *l2c_cb_ptr;
#endif
/*******************************************************************************
@@ -815,7 +817,9 @@ void l2c_process_held_packets(BOOLEAN timed_out)
void l2c_init (void)
{
INT16 xx;
#if L2C_DYNAMIC_MEMORY
l2c_cb_ptr = (tL2C_CB *)osi_malloc(sizeof(tL2C_CB));
#endif /* #if L2C_DYNAMIC_MEMORY */
memset (&l2cb, 0, sizeof (tL2C_CB));
/* the psm is increased by 2 before being used */
l2cb.dyn_psm = 0xFFF;
@@ -874,6 +878,9 @@ void l2c_free(void)
{
list_free(l2cb.rcv_pending_q);
l2cb.rcv_pending_q = NULL;
#if L2C_DYNAMIC_MEMORY
FREE_AND_RESET(l2c_cb_ptr);
#endif
}
/*******************************************************************************