fix(nimble): fix esp_hid_device example when static_to_dynamic enabled
This commit is contained in:
@@ -290,7 +290,7 @@ menu "GAP"
|
|||||||
config BT_NIMBLE_MAX_CCCDS
|
config BT_NIMBLE_MAX_CCCDS
|
||||||
int "Maximum number of CCC descriptors to save across reboots"
|
int "Maximum number of CCC descriptors to save across reboots"
|
||||||
default 8
|
default 8
|
||||||
depends on BT_NIMBLE_ENABLED && BT_NIMBLE_NVS_PERSIST
|
depends on BT_NIMBLE_ENABLED
|
||||||
help
|
help
|
||||||
Defines maximum number of CCC descriptors to save
|
Defines maximum number of CCC descriptors to save
|
||||||
|
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ desc_disced(uint16_t conn_handle, const struct ble_gatt_error *error,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* this api does the following things :
|
/* this api does the following things :
|
||||||
** does service, characteristic and discriptor discovery and
|
** does service, characteristic and descriptor discovery and
|
||||||
** fills the hid device information accordingly in dev */
|
** fills the hid device information accordingly in dev */
|
||||||
static void read_device_services(esp_hidh_dev_t *dev)
|
static void read_device_services(esp_hidh_dev_t *dev)
|
||||||
{
|
{
|
||||||
@@ -466,7 +466,7 @@ static void read_device_services(esp_hidh_dev_t *dev)
|
|||||||
chr_end_handle, desc_disced, descr_result);
|
chr_end_handle, desc_disced, descr_result);
|
||||||
WAIT_CB();
|
WAIT_CB();
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
ESP_LOGE(TAG, "failed to find discriptors for characteristic : %d", c);
|
ESP_LOGE(TAG, "failed to find descriptors for characteristic : %d", c);
|
||||||
assert(status == 0);
|
assert(status == 0);
|
||||||
}
|
}
|
||||||
dcount = dscs_discovered;
|
dcount = dscs_discovered;
|
||||||
@@ -949,6 +949,7 @@ esp_hidh_dev_t *esp_ble_hidh_dev_open(uint8_t *bda, uint8_t address_type)
|
|||||||
dev->report_write = esp_ble_hidh_dev_report_write;
|
dev->report_write = esp_ble_hidh_dev_report_write;
|
||||||
dev->report_read = esp_ble_hidh_dev_report_read;
|
dev->report_read = esp_ble_hidh_dev_report_read;
|
||||||
dev->dump = esp_ble_hidh_dev_dump;
|
dev->dump = esp_ble_hidh_dev_dump;
|
||||||
|
dev->connected = true;
|
||||||
|
|
||||||
/* perform service discovery and fill the report maps */
|
/* perform service discovery and fill the report maps */
|
||||||
read_device_services(dev);
|
read_device_services(dev);
|
||||||
|
|||||||
Reference in New Issue
Block a user