mirror of
https://github.com/espressif/esp-idf
synced 2025-03-11 10:09:08 -04:00
feat(bt/bluedroid): Support BLE gattc notify registration number
This commit is contained in:
parent
ca32e5268b
commit
6f400e1b5d
@ -250,6 +250,14 @@ config BT_GATTC_MAX_CACHE_CHAR
|
|||||||
help
|
help
|
||||||
Maximum GATTC cache characteristic count
|
Maximum GATTC cache characteristic count
|
||||||
|
|
||||||
|
config BT_GATTC_NOTIF_REG_MAX
|
||||||
|
int "Max gattc notify(indication) register number"
|
||||||
|
depends on BT_GATTC_ENABLE
|
||||||
|
range 1 64
|
||||||
|
default 5
|
||||||
|
help
|
||||||
|
Maximum GATTC notify(indication) register number
|
||||||
|
|
||||||
config BT_GATTC_CACHE_NVS_FLASH
|
config BT_GATTC_CACHE_NVS_FLASH
|
||||||
bool "Save gattc cache data to nvs flash"
|
bool "Save gattc cache data to nvs flash"
|
||||||
depends on BT_GATTC_ENABLE
|
depends on BT_GATTC_ENABLE
|
||||||
|
@ -932,7 +932,7 @@ tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
|
|||||||
}
|
}
|
||||||
if (i == BTA_GATTC_NOTIF_REG_MAX) {
|
if (i == BTA_GATTC_NOTIF_REG_MAX) {
|
||||||
status = BTA_GATT_NO_RESOURCES;
|
status = BTA_GATT_NO_RESOURCES;
|
||||||
APPL_TRACE_ERROR("Max Notification Reached, registration failed.");
|
APPL_TRACE_ERROR("Max Notification Reached, registration failed,see CONFIG_BT_GATTC_NOTIF_REG_MAX in menuconfig");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -319,10 +319,6 @@ typedef struct {
|
|||||||
bool update_incl_srvc;
|
bool update_incl_srvc;
|
||||||
} tBTA_GATTC_SERV;
|
} tBTA_GATTC_SERV;
|
||||||
|
|
||||||
#ifndef BTA_GATTC_NOTIF_REG_MAX
|
|
||||||
#define BTA_GATTC_NOTIF_REG_MAX BTA_GATTC_CONN_MAX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BOOLEAN in_use;
|
BOOLEAN in_use;
|
||||||
BD_ADDR remote_bda;
|
BD_ADDR remote_bda;
|
||||||
|
@ -163,6 +163,13 @@
|
|||||||
#define UC_BT_GATTC_MAX_CACHE_CHAR 40
|
#define UC_BT_GATTC_MAX_CACHE_CHAR 40
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//GATTC NOTIF
|
||||||
|
#ifdef CONFIG_BT_GATTC_NOTIF_REG_MAX
|
||||||
|
#define UC_BT_GATTC_NOTIF_REG_MAX CONFIG_BT_GATTC_NOTIF_REG_MAX
|
||||||
|
#else
|
||||||
|
#define UC_BT_GATTC_NOTIF_REG_MAX 5
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_BT_GATTC_CACHE_NVS_FLASH
|
#ifdef CONFIG_BT_GATTC_CACHE_NVS_FLASH
|
||||||
#define UC_BT_GATTC_CACHE_NVS_FLASH_ENABLED CONFIG_BT_GATTC_CACHE_NVS_FLASH
|
#define UC_BT_GATTC_CACHE_NVS_FLASH_ENABLED CONFIG_BT_GATTC_CACHE_NVS_FLASH
|
||||||
#else
|
#else
|
||||||
|
@ -248,6 +248,12 @@
|
|||||||
#define GATTC_CONNECT_RETRY_EN FALSE
|
#define GATTC_CONNECT_RETRY_EN FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UC_BT_GATTC_NOTIF_REG_MAX
|
||||||
|
#define BTA_GATTC_NOTIF_REG_MAX UC_BT_GATTC_NOTIF_REG_MAX
|
||||||
|
#else
|
||||||
|
#define BTA_GATTC_NOTIF_REG_MAX 5
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (UC_BT_SMP_ENABLE)
|
#if (UC_BT_SMP_ENABLE)
|
||||||
#define SMP_INCLUDED TRUE
|
#define SMP_INCLUDED TRUE
|
||||||
#if (BLE_INCLUDED == TRUE)
|
#if (BLE_INCLUDED == TRUE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user