mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'feat/allow_creat_vendor_descriptor_by_service_table_v5.2' into 'release/v5.2'
feat(ble/bluedroid): Allow add vendor descriptor by service table create API (5.2) See merge request espressif/esp-idf!47039
This commit is contained in:
@@ -247,7 +247,14 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
|
||||
//set the attribute table create service flag to true
|
||||
btc_creat_tab_env.is_tab_creat_svc = true;
|
||||
btc_creat_tab_env.num_handle = max_nb_attr;
|
||||
/* After CHAR_DECLARE, the next row is the characteristic value (any UUID length); skip it here so
|
||||
* a 16-bit characteristic UUID is not mistaken for a descriptor. */
|
||||
bool skip_next_attr_row = false;
|
||||
for(int i = 0; i < max_nb_attr; i++){
|
||||
if (skip_next_attr_row) {
|
||||
skip_next_attr_row = false;
|
||||
continue;
|
||||
}
|
||||
if(gatts_attr_db[i].att_desc.uuid_length == ESP_UUID_LEN_16){
|
||||
uuid = (gatts_attr_db[i].att_desc.uuid_p[1] << 8) + (gatts_attr_db[i].att_desc.uuid_p[0]);
|
||||
}
|
||||
@@ -363,6 +370,7 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
|
||||
BTC_TRACE_ERROR("%s failed\n", __func__);
|
||||
return;
|
||||
}
|
||||
skip_next_attr_row = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +390,8 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
|
||||
case ESP_GATT_UUID_ENV_SENSING_CONFIG_DESCR:
|
||||
case ESP_GATT_UUID_ENV_SENSING_MEASUREMENT_DESCR:
|
||||
case ESP_GATT_UUID_ENV_SENSING_TRIGGER_DESCR:
|
||||
case ESP_GATT_UUID_TIME_TRIGGER_DESCR: {
|
||||
case ESP_GATT_UUID_TIME_TRIGGER_DESCR:
|
||||
default: {
|
||||
uint16_t svc_hal = btc_creat_tab_env.svc_start_hdl;
|
||||
tBT_UUID bta_char_uuid;
|
||||
esp_bt_uuid_t uuid_temp;
|
||||
@@ -407,9 +416,6 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
future_free(future_p);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user