Lines Matching refs:has
31 #define HAS_INST(_has) CONTAINER_OF(_has, struct bt_has_client, has)
99 client_cb->preset_read_rsp(&inst->has, 0, &record, !!pdu->is_last); in handle_read_preset_rsp()
130 client_cb->preset_update(&inst->has, pdu->prev_index, &record, is_last); in handle_generic_update()
141 client_cb->preset_deleted(&inst->has, net_buf_simple_pull_u8(buf), is_last); in handle_preset_deleted()
152 client_cb->preset_availability(&inst->has, net_buf_simple_pull_u8(buf), available, in handle_preset_availability()
246 client_cb->discover(inst->conn, 0, &inst->has, in discover_complete()
247 inst->has.features & BT_HAS_FEAT_HEARING_AID_TYPE_MASK, in discover_complete()
253 client_cb->preset_switch(&inst->has, 0, inst->has.active_index); in discover_complete()
292 client_cb->preset_read_rsp(&inst->has, err, NULL, true); in read_presets_req_cb()
325 client_cb->preset_switch(&inst->has, err, inst->has.active_index); in set_active_preset_cb()
363 const uint8_t prev = inst->has.active_index; in active_index_update()
367 inst->has.active_index = net_buf_simple_pull_u8(&buf); in active_index_update()
369 LOG_DBG("conn %p index 0x%02x", (void *)inst->conn, inst->has.active_index); in active_index_update()
410 if (client_cb && client_cb->preset_switch && inst->has.active_index != prev) { in active_preset_notify_cb()
411 client_cb->preset_switch(&inst->has, 0, inst->has.active_index); in active_preset_notify_cb()
618 inst->has.features = net_buf_simple_pull_u8(&buf); in features_update()
620 LOG_DBG("conn %p features 0x%02x", (void *)inst->conn, inst->has.features); in features_update()
870 int bt_has_client_conn_get(const struct bt_has *has, struct bt_conn **conn) in bt_has_client_conn_get() argument
872 struct bt_has_client *inst = HAS_INST(has); in bt_has_client_conn_get()
879 int bt_has_client_presets_read(struct bt_has *has, uint8_t start_index, uint8_t count) in bt_has_client_presets_read() argument
881 struct bt_has_client *inst = HAS_INST(has); in bt_has_client_presets_read()
911 int bt_has_client_preset_set(struct bt_has *has, uint8_t index, bool sync) in bt_has_client_preset_set() argument
913 struct bt_has_client *inst = HAS_INST(has); in bt_has_client_preset_set()
926 if (sync && (inst->has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) == 0) { in bt_has_client_preset_set()
940 int bt_has_client_preset_next(struct bt_has *has, bool sync) in bt_has_client_preset_next() argument
942 struct bt_has_client *inst = HAS_INST(has); in bt_has_client_preset_next()
951 if (sync && (inst->has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) == 0) { in bt_has_client_preset_next()
965 int bt_has_client_preset_prev(struct bt_has *has, bool sync) in bt_has_client_preset_prev() argument
967 struct bt_has_client *inst = HAS_INST(has); in bt_has_client_preset_prev()
976 if (sync && (inst->has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) == 0) { in bt_has_client_preset_prev()