fix(bt): Fixed the issue with l2cap not using dynamic memory

This commit is contained in:
xiongweichao
2025-03-31 14:40:06 +08:00
parent ebce1de0fc
commit 63ca09cacd
2 changed files with 7 additions and 0 deletions

View File

@ -80,7 +80,12 @@ typedef struct {
esp_vfs_id_t l2cap_vfs_id;
} l2cap_local_param_t;
#if L2CAP_DYNAMIC_MEMORY == FALSE
static l2cap_local_param_t l2cap_local_param;
#else
static l2cap_local_param_t *l2cap_local_param_ptr;
#define l2cap_local_param (*l2cap_local_param_ptr)
#endif
/* L2CAP default options for OBEX connections */
static const tL2CAP_FCR_OPTS obex_l2c_fcr_opts_def =

View File

@ -56,6 +56,7 @@
#define LLCP_DYNAMIC_MEMORY TRUE
#define BTC_SBC_DEC_DYNAMIC_MEMORY TRUE
#define BTC_GAP_BT_DYNAMIC_MEMORY TRUE
#define L2CAP_DYNAMIC_MEMORY TRUE
#else /* #if UC_BT_BLE_DYNAMIC_ENV_MEMORY */
#define BTU_DYNAMIC_MEMORY FALSE
@ -93,6 +94,7 @@
#define LLCP_DYNAMIC_MEMORY FALSE
#define BTC_SBC_DEC_DYNAMIC_MEMORY FALSE
#define BTC_GAP_BT_DYNAMIC_MEMORY FALSE
#define L2CAP_DYNAMIC_MEMORY FALSE
#endif /* #if UC_BT_BLE_DYNAMIC_ENV_MEMORY */