Lines Matching refs:params

200 				       struct bt_gatt_subscribe_params *params, const void *data,  in control_point_notify_cb()  argument
203 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in control_point_notify_cb()
208 LOG_DBG("conn %p params %p data %p len %u", (void *)conn, params, data, len); in control_point_notify_cb()
215 params->value_handle = 0u; in control_point_notify_cb()
273 inst->params.write.func = func; in cp_write()
274 inst->params.write.handle = value_handle; in cp_write()
275 inst->params.write.offset = 0U; in cp_write()
276 inst->params.write.data = buf->data; in cp_write()
277 inst->params.write.length = buf->len; in cp_write()
279 return bt_gatt_write(inst->conn, &inst->params.write); in cp_write()
283 struct bt_gatt_write_params *params) in read_presets_req_cb() argument
285 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.write); in read_presets_req_cb()
287 LOG_DBG("conn %p err 0x%02x param %p", (void *)conn, err, params); in read_presets_req_cb()
316 struct bt_gatt_write_params *params) in set_active_preset_cb() argument
318 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.write); in set_active_preset_cb()
320 LOG_DBG("conn %p err 0x%02x param %p", (void *)conn, err, params); in set_active_preset_cb()
375 struct bt_gatt_subscribe_params *params, const void *data, in active_preset_notify_cb() argument
378 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in active_preset_notify_cb()
382 LOG_DBG("conn %p params %p data %p len %u", (void *)conn, params, data, len); in active_preset_notify_cb()
391 params->value_handle = 0u; in active_preset_notify_cb()
418 struct bt_gatt_subscribe_params *params) in active_index_subscribe_cb() argument
420 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in active_index_subscribe_cb()
423 LOG_DBG("conn %p att_err 0x%02x params %p", (void *)inst->conn, att_err, params); in active_index_subscribe_cb()
446 inst->active_index_subscription.disc_params = &inst->params.discover; in active_index_subscribe()
459 struct bt_gatt_read_params *params, const void *data, in active_index_read_cb() argument
462 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.read); in active_index_read_cb()
465 LOG_DBG("conn %p att_err 0x%02x params %p data %p len %u", (void *)conn, att_err, params, in active_index_read_cb()
474 err = active_index_subscribe(inst, params->by_uuid.start_handle); in active_index_read_cb()
495 (void)memset(&inst->params.read, 0, sizeof(inst->params.read)); in active_index_read()
497 (void)memcpy(&inst->params.uuid, BT_UUID_HAS_ACTIVE_PRESET_INDEX, in active_index_read()
498 sizeof(inst->params.uuid)); in active_index_read()
499 inst->params.read.func = active_index_read_cb; in active_index_read()
500 inst->params.read.handle_count = 0u; in active_index_read()
501 inst->params.read.by_uuid.uuid = &inst->params.uuid.uuid; in active_index_read()
502 inst->params.read.by_uuid.start_handle = BT_ATT_FIRST_ATTRIBUTE_HANDLE; in active_index_read()
503 inst->params.read.by_uuid.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE; in active_index_read()
505 return bt_gatt_read(inst->conn, &inst->params.read); in active_index_read()
509 struct bt_gatt_subscribe_params *params) in control_point_subscribe_cb() argument
511 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in control_point_subscribe_cb()
548 inst->control_point_subscription.disc_params = &inst->params.discover; in control_point_subscribe()
566 struct bt_gatt_discover_params *params) in control_point_discover_cb() argument
568 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.discover); in control_point_discover_cb()
572 LOG_DBG("conn %p attr %p params %p", (void *)conn, attr, params); in control_point_discover_cb()
599 (void)memset(&inst->params.discover, 0, sizeof(inst->params.discover)); in control_point_discover()
601 (void)memcpy(&inst->params.uuid, BT_UUID_HAS_PRESET_CONTROL_POINT, in control_point_discover()
602 sizeof(inst->params.uuid)); in control_point_discover()
603 inst->params.discover.uuid = &inst->params.uuid.uuid; in control_point_discover()
604 inst->params.discover.func = control_point_discover_cb; in control_point_discover()
605 inst->params.discover.start_handle = BT_ATT_FIRST_ATTRIBUTE_HANDLE; in control_point_discover()
606 inst->params.discover.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE; in control_point_discover()
607 inst->params.discover.type = BT_GATT_DISCOVER_CHARACTERISTIC; in control_point_discover()
609 return bt_gatt_discover(inst->conn, &inst->params.discover); in control_point_discover()
624 struct bt_gatt_read_params *params, const void *data, uint16_t len) in features_read_cb() argument
626 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.read); in features_read_cb()
629 LOG_DBG("conn %p att_err 0x%02x params %p data %p len %u", (void *)conn, att_err, params, in features_read_cb()
665 (void)memset(&inst->params.read, 0, sizeof(inst->params.read)); in features_read()
667 inst->params.read.func = features_read_cb; in features_read()
668 inst->params.read.handle_count = 1u; in features_read()
669 inst->params.read.single.handle = value_handle; in features_read()
670 inst->params.read.single.offset = 0u; in features_read()
672 return bt_gatt_read(inst->conn, &inst->params.read); in features_read()
676 struct bt_gatt_subscribe_params *params) in features_subscribe_cb() argument
678 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in features_subscribe_cb()
682 LOG_DBG("conn %p att_err 0x%02x params %p", (void *)conn, att_err, params); in features_subscribe_cb()
703 static uint8_t features_notify_cb(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, in features_notify_cb() argument
706 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, in features_notify_cb()
709 LOG_DBG("conn %p params %p data %p len %u", (void *)conn, params, data, len); in features_notify_cb()
718 params->value_handle = 0u; in features_notify_cb()
744 inst->features_subscription.disc_params = &inst->params.discover; in features_subscribe()
757 struct bt_gatt_discover_params *params) in features_discover_cb() argument
759 struct bt_has_client *inst = CONTAINER_OF(params, struct bt_has_client, params.discover); in features_discover_cb()
763 LOG_DBG("conn %p attr %p params %p", (void *)conn, attr, params); in features_discover_cb()
802 (void)memset(&inst->params.discover, 0, sizeof(inst->params.discover)); in features_discover()
804 (void)memcpy(&inst->params.uuid, BT_UUID_HAS_HEARING_AID_FEATURES, in features_discover()
805 sizeof(inst->params.uuid)); in features_discover()
806 inst->params.discover.uuid = &inst->params.uuid.uuid; in features_discover()
807 inst->params.discover.func = features_discover_cb; in features_discover()
808 inst->params.discover.start_handle = BT_ATT_FIRST_ATTRIBUTE_HANDLE; in features_discover()
809 inst->params.discover.end_handle = BT_ATT_LAST_ATTRIBUTE_HANDLE; in features_discover()
810 inst->params.discover.type = BT_GATT_DISCOVER_CHARACTERISTIC; in features_discover()
812 return bt_gatt_discover(inst->conn, &inst->params.discover); in features_discover()