Merge branch 'bugfix/btdm_add_svc_inst_id_param_for_create_tab_event' into 'master'

Component/bt: add svc_inst_id param for create service table event

See merge request idf/esp-idf!4958
pull/7874/head
Jiang Jiang Jian 2019-06-18 21:19:41 +08:00
commit ceb00f7a41
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -256,6 +256,7 @@ typedef union {
struct gatts_add_attr_tab_evt_param{
esp_gatt_status_t status; /*!< Operation status */
esp_bt_uuid_t svc_uuid; /*!< Service uuid type */
uint8_t svc_inst_id; /*!< Service id */
uint16_t num_handle; /*!< The number of the attribute handle to be added to the gatts database */
uint16_t *handles; /*!< The number to the handles */
} add_attr_tab; /*!< Gatt server callback param of ESP_GATTS_CREAT_ATTR_TAB_EVT */

Wyświetl plik

@ -425,6 +425,8 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db,
param.add_attr_tab.handles = btc_creat_tab_env.handles;
memcpy(&param.add_attr_tab.svc_uuid, &btc_creat_tab_env.svc_uuid, sizeof(esp_bt_uuid_t));
param.add_attr_tab.svc_inst_id = srvc_inst_id;
btc_gatts_cb_to_app(ESP_GATTS_CREAT_ATTR_TAB_EVT, gatts_if, &param);
//reset the env after sent the data to app
memset(&btc_creat_tab_env, 0, sizeof(esp_btc_creat_tab_t));