static void __bt_handle_gatt_client_read_desc(void *buf, uint16_t len);
static void __bt_handle_gatt_client_write_char(void *buf, uint16_t len);
static void __bt_handle_gatt_client_write_desc(void *buf, uint16_t len);
+static void __bt_handle_gatt_client_watch_notification(void *buf, uint16_t len);
/*****************************************************************************************************/
static bool interface_ready(void)
__bt_handle_gatt_client_write_desc(buf, len);
break;
}
+ case HAL_EV_GATT_CLIENT_WATCH_NOTIFICATION: {
+ __bt_handle_gatt_client_watch_notification(buf, len);
+ break;
+ }
default:
DBG("Event Currently not handled!!");
break;
ev->status, &desc_write_parm);
}
+static void __bt_handle_gatt_client_watch_notification(void *buf, uint16_t len)
+{
+ struct hal_ev_gatt_client_watch_notification *ev = buf;
+ btgatt_srvc_id_t gatt_srvc_id;
+ btgatt_gatt_id_t gatt_char_id;
+
+ gatt_srvc_id.is_primary = ev->is_primary;
+ gatt_srvc_id.id.inst_id = ev->inst_id;
+ memcpy(gatt_srvc_id.id.uuid.uu, ev->svc_uuid, 16);
+
+ memcpy(gatt_char_id.uuid.uu, ev->char_uuid, 16);
+ gatt_char_id.inst_id = ev->inst_id;
+
+ if (bt_gatt_callbacks->client->register_for_notification_cb)
+ bt_gatt_callbacks->client->register_for_notification_cb(ev->client_if,
+ ev->registered, ev->status, &gatt_srvc_id, &gatt_char_id);
+}
+
static bt_hal_le_adv_info_t *__bt_hal_get_adv_ind_info(char *addr)
{
GSList *l;