Lines Matching full:features

37 	!BITS_CHANGED(_new_value, (has.features & BT_HAS_FEAT_HEARING_AID_TYPE_MASK))
39 !BITS_CHANGED(_new_value, ((has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) != 0 ? 1 : 0))
41 !BITS_CHANGED(_new_value, ((has.features & BT_HAS_FEAT_INDEPENDENT_PRESETS) != 0 ? 1 : 0))
95 if (offset > sizeof(has.features)) { in read_features()
99 return bt_gatt_attr_read(conn, attr, buf, len, offset, &has.features, in read_features()
100 sizeof(has.features)); in read_features()
162 /* Features notification work */
994 if ((has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) != 0) { in handle_control_point_op()
1000 if ((has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) != 0) { in handle_control_point_op()
1006 if ((has.features & BT_HAS_FEAT_PRESET_SYNC_SUPP) != 0) { in handle_control_point_op()
1252 static int has_features_register(const struct bt_has_features_param *features) in has_features_register() argument
1254 /* Initialize the supported features characteristic value */ in has_features_register()
1255 has.features = features->type; in has_features_register()
1258 has.features |= BT_HAS_FEAT_DYNAMIC_PRESETS; in has_features_register()
1260 if (features->preset_sync_support) { in has_features_register()
1261 if (features->type != BT_HAS_HEARING_AID_TYPE_BINAURAL) { in has_features_register()
1267 has.features |= BT_HAS_FEAT_PRESET_SYNC_SUPP; in has_features_register()
1270 if (features->independent_presets) { in has_features_register()
1271 if (features->type != BT_HAS_HEARING_AID_TYPE_BINAURAL) { in has_features_register()
1277 has.features |= BT_HAS_FEAT_INDEPENDENT_PRESETS; in has_features_register()
1282 has.features |= BT_HAS_FEAT_WRITABLE_PRESETS_SUPP; in has_features_register()
1300 err = bt_gatt_notify(client->conn, FEATURES_ATTR, &has.features, in features_work_process()
1301 sizeof(has.features)); in features_work_process()
1303 LOG_DBG("failed to notify features for %p: %d", client->conn, err); in features_work_process()
1309 int bt_has_features_set(const struct bt_has_features_param *features) in bt_has_features_set() argument
1318 /* Check whether any features will change, otherwise we don't want to notify clients */ in bt_has_features_set()
1319 if (FEATURE_DEVICE_TYPE_UNCHANGED(features->type) && in bt_has_features_set()
1320 FEATURE_SYNC_SUPPORT_UNCHANGED(features->preset_sync_support) && in bt_has_features_set()
1321 FEATURE_IND_PRESETS_UNCHANGED(features->independent_presets)) { in bt_has_features_set()
1325 tmp_features = has.features; in bt_has_features_set()
1327 err = has_features_register(features); in bt_has_features_set()
1329 LOG_DBG("Failed to register features"); in bt_has_features_set()
1352 has.features = tmp_features; in bt_has_features_set()
1361 int bt_has_register(const struct bt_has_features_param *features) in bt_has_register() argument
1365 LOG_DBG("features %p", features); in bt_has_register()
1367 CHECKIF(!features) { in bt_has_register()
1376 err = has_features_register(features); in bt_has_register()
1378 LOG_DBG("HAS service failed to register features: %d", err); in bt_has_register()