Bluetooth: Audio: Make HAS optional notify characteristics optional

Added Kconfig options to make HAS characteristics that has notify as
optional property selectable and thus optional. These settings are
global, meaning that a chosen notify property will be used for all
registered has instances.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
This commit is contained in:
Fredrik Danebjer 2023-05-11 12:30:19 +02:00 committed by Anas Nashif
commit 7457bcf0a2
9 changed files with 345 additions and 79 deletions

View file

@ -75,7 +75,7 @@ int has_server_preset_init(void)
return 0;
}
static struct bt_has_register_param param = {
static struct bt_has_features_param features = {
.type = BT_HAS_HEARING_AID_TYPE_MONAURAL,
.preset_sync_support = false,
.independent_presets = false
@ -86,12 +86,12 @@ int has_server_init(void)
int err;
if (IS_ENABLED(CONFIG_HAP_HA_HEARING_AID_BINAURAL)) {
param.type = BT_HAS_HEARING_AID_TYPE_BINAURAL;
features.type = BT_HAS_HEARING_AID_TYPE_BINAURAL;
} else if (IS_ENABLED(CONFIG_HAP_HA_HEARING_AID_BANDED)) {
param.type = BT_HAS_HEARING_AID_TYPE_BANDED;
features.type = BT_HAS_HEARING_AID_TYPE_BANDED;
}
err = bt_has_register(&param);
err = bt_has_register(&features);
if (err) {
return err;
}