mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-12 17:07:22 +00:00
nimble/host: Convert BLE_GAP_MAX_UPDATE_ENTRIES from define to syscfg.
Previously, BLE_GAP_MAX_UPDATE_ENTRIES was a define in ble_gap.c. Now it's a syscfg in nimble/host/syscfg.yml. There are cases where this value needs to be increased to support multiple simultaneous connections.
This commit is contained in:
@@ -87,8 +87,6 @@
|
||||
|
||||
#define BLE_GAP_UPDATE_TIMEOUT_MS 30000 /* ms */
|
||||
|
||||
#define BLE_GAP_MAX_UPDATE_ENTRIES 1
|
||||
|
||||
static const struct ble_gap_conn_params ble_gap_conn_params_dflt = {
|
||||
.scan_itvl = 0x0010,
|
||||
.scan_window = 0x0010,
|
||||
@@ -188,7 +186,7 @@ struct ble_gap_snapshot {
|
||||
static SLIST_HEAD(ble_gap_hook_list, ble_gap_event_listener) ble_gap_event_listener_list;
|
||||
|
||||
static os_membuf_t ble_gap_update_entry_mem[
|
||||
OS_MEMPOOL_SIZE(BLE_GAP_MAX_UPDATE_ENTRIES,
|
||||
OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_GAP_MAX_UPDATE_ENTRIES),
|
||||
sizeof (struct ble_gap_update_entry))];
|
||||
static struct os_mempool ble_gap_update_entry_pool;
|
||||
static struct ble_gap_update_entry_list ble_gap_update_entries;
|
||||
@@ -4747,7 +4745,7 @@ ble_gap_init(void)
|
||||
SLIST_INIT(&ble_gap_event_listener_list);
|
||||
|
||||
rc = os_mempool_init(&ble_gap_update_entry_pool,
|
||||
BLE_GAP_MAX_UPDATE_ENTRIES,
|
||||
MYNEWT_VAL(BLE_GAP_MAX_UPDATE_ENTRIES),
|
||||
sizeof (struct ble_gap_update_entry),
|
||||
ble_gap_update_entry_mem,
|
||||
"ble_gap_update");
|
||||
|
||||
@@ -171,6 +171,12 @@ syscfg.defs:
|
||||
for debugging.
|
||||
value: 0
|
||||
|
||||
# GAP options.
|
||||
BLE_GAP_MAX_UPDATE_ENTRIES:
|
||||
description: >
|
||||
The maximum number of GAP update entries. (0/1)
|
||||
value: 1
|
||||
|
||||
# Supported GATT procedures. By default:
|
||||
# o Notify and indicate are enabled;
|
||||
# o All other procedures are enabled for centrals.
|
||||
|
||||
Reference in New Issue
Block a user