Merge branch 'bugfix/gatts_example_param' into 'master'

BT gatts example: using param, which corresponds to handled event

See merge request !1176
This commit is contained in:
Anton Maklakov
2017-09-12 10:37:19 +08:00

View File

@@ -455,9 +455,9 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i
break; break;
} }
case ESP_GATTS_ADD_CHAR_DESCR_EVT: case ESP_GATTS_ADD_CHAR_DESCR_EVT:
gl_profile_tab[PROFILE_A_APP_ID].descr_handle = param->add_char.attr_handle; gl_profile_tab[PROFILE_A_APP_ID].descr_handle = param->add_char_descr.attr_handle;
ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n", ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n",
param->add_char.status, param->add_char.attr_handle, param->add_char.service_handle); param->add_char_descr.status, param->add_char_descr.attr_handle, param->add_char_descr.service_handle);
break; break;
case ESP_GATTS_DELETE_EVT: case ESP_GATTS_DELETE_EVT:
break; break;
@@ -608,9 +608,9 @@ static void gatts_profile_b_event_handler(esp_gatts_cb_event_t event, esp_gatt_i
NULL, NULL); NULL, NULL);
break; break;
case ESP_GATTS_ADD_CHAR_DESCR_EVT: case ESP_GATTS_ADD_CHAR_DESCR_EVT:
gl_profile_tab[PROFILE_B_APP_ID].descr_handle = param->add_char.attr_handle; gl_profile_tab[PROFILE_B_APP_ID].descr_handle = param->add_char_descr.attr_handle;
ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n", ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n",
param->add_char.status, param->add_char.attr_handle, param->add_char.service_handle); param->add_char_descr.status, param->add_char_descr.attr_handle, param->add_char_descr.service_handle);
break; break;
case ESP_GATTS_DELETE_EVT: case ESP_GATTS_DELETE_EVT:
break; break;