Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
has.h File Reference

Go to the source code of this file.

Data Structures

struct  bt_has_features_param
 Structure for registering features of a Hearing Access Service instance. More...
 
struct  bt_has_preset_record
 Preset record definition. More...
 
struct  bt_has_client_cb
 Hearing Access Service Client callback structure. More...
 
struct  bt_has_preset_ops
 Preset operations structure. More...
 
struct  bt_has_preset_register_param
 Register structure for preset. More...
 

Macros

#define BT_HAS_PRESET_INDEX_NONE   0x00
 Preset index definitions.
 
#define BT_HAS_PRESET_INDEX_FIRST   0x01
 
#define BT_HAS_PRESET_INDEX_LAST   0xFF
 
#define BT_HAS_PRESET_NAME_MIN   1
 Preset name minimum length.
 
#define BT_HAS_PRESET_NAME_MAX   40
 Preset name maximum length.
 

Typedefs

typedef uint8_t(* bt_has_preset_func_t) (uint8_t index, enum bt_has_properties properties, const char *name, void *user_data)
 Preset iterator callback.
 

Enumerations

enum  bt_has_hearing_aid_type { BT_HAS_HEARING_AID_TYPE_BINAURAL = 0x00 , BT_HAS_HEARING_AID_TYPE_MONAURAL = 0x01 , BT_HAS_HEARING_AID_TYPE_BANDED = 0x02 }
 Hearing Aid device type. More...
 
enum  bt_has_properties { BT_HAS_PROP_NONE = 0 , BT_HAS_PROP_WRITABLE = BIT(0) , BT_HAS_PROP_AVAILABLE = BIT(1) }
 Preset Properties values. More...
 
enum  bt_has_capabilities { BT_HAS_PRESET_SUPPORT = BIT(0) }
 Hearing Aid device capablilities. More...
 
enum  { BT_HAS_PRESET_ITER_STOP = 0 , BT_HAS_PRESET_ITER_CONTINUE }
 

Functions

int bt_has_client_cb_register (const struct bt_has_client_cb *cb)
 Registers the callbacks used by the Hearing Access Service client.
 
int bt_has_client_discover (struct bt_conn *conn)
 Discover Hearing Access Service on a remote device.
 
int bt_has_client_conn_get (const struct bt_has *has, struct bt_conn **conn)
 Get the Bluetooth connection object of the service object.
 
int bt_has_client_presets_read (struct bt_has *has, uint8_t index, uint8_t max_count)
 Read Preset Records.
 
int bt_has_client_preset_set (struct bt_has *has, uint8_t index, bool sync)
 Set Active Preset.
 
int bt_has_client_preset_next (struct bt_has *has, bool sync)
 Activate Next Preset.
 
int bt_has_client_preset_prev (struct bt_has *has, bool sync)
 Activate Previous Preset.
 
int bt_has_register (const struct bt_has_features_param *features)
 Register the Hearing Access Service instance.
 
int bt_has_preset_register (const struct bt_has_preset_register_param *param)
 Register preset.
 
int bt_has_preset_unregister (uint8_t index)
 Unregister Preset.
 
int bt_has_preset_available (uint8_t index)
 Set the preset as available.
 
int bt_has_preset_unavailable (uint8_t index)
 Set the preset as unavailable.
 
void bt_has_preset_foreach (uint8_t index, bt_has_preset_func_t func, void *user_data)
 Preset iterator.
 
int bt_has_preset_active_set (uint8_t index)
 Set active preset.
 
uint8_t bt_has_preset_active_get (void)
 Get active preset.
 
static int bt_has_preset_active_clear (void)
 Clear out active preset.
 
int bt_has_preset_name_change (uint8_t index, const char *name)
 Change the Preset Name.
 
int bt_has_features_set (const struct bt_has_features_param *features)
 Change the Hearing Aid Features.