Zephyr Project API  3.3.0
A Scalable Open Source RTOS
has.h File Reference

Go to the source code of this file.

Data Structures

struct  bt_has_register_param
 Structure for registering 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
 
#define BT_HAS_PRESET_INDEX_FIRST   0x01
 
#define BT_HAS_PRESET_INDEX_LAST   0xFF
 
#define BT_HAS_PRESET_NAME_MIN   1
 
#define BT_HAS_PRESET_NAME_MAX   40
 

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. More...
 

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 }
 
enum  bt_has_properties { BT_HAS_PROP_NONE = 0 , BT_HAS_PROP_WRITABLE = BIT(0) , BT_HAS_PROP_AVAILABLE = BIT(1) }
 
enum  bt_has_capabilities { BT_HAS_PRESET_SUPPORT = BIT(0) }
 
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. More...
 
int bt_has_client_discover (struct bt_conn *conn)
 Discover Hearing Access Service on a remote device. More...
 
int bt_has_client_conn_get (const struct bt_has *has, struct bt_conn **conn)
 Get the Bluetooth connection object of the service object. More...
 
int bt_has_client_presets_read (struct bt_has *has, uint8_t index, uint8_t max_count)
 Read Preset Records. More...
 
int bt_has_client_preset_set (struct bt_has *has, uint8_t index, bool sync)
 Set Active Preset. More...
 
int bt_has_client_preset_next (struct bt_has *has, bool sync)
 Activate Next Preset. More...
 
int bt_has_client_preset_prev (struct bt_has *has, bool sync)
 Activate Previous Preset. More...
 
int bt_has_register (const struct bt_has_register_param *param)
 Register the Hearing Access Service instance. More...
 
int bt_has_preset_register (const struct bt_has_preset_register_param *param)
 Register preset. More...
 
int bt_has_preset_unregister (uint8_t index)
 Unregister Preset. More...
 
int bt_has_preset_available (uint8_t index)
 Set the preset as available. More...
 
int bt_has_preset_unavailable (uint8_t index)
 Set the preset as unavailable. More...
 
void bt_has_preset_foreach (uint8_t index, bt_has_preset_func_t func, void *user_data)
 Preset iterator. More...
 
int bt_has_preset_active_set (uint8_t index)
 Set active preset. More...
 
uint8_t bt_has_preset_active_get (void)
 Get active preset. More...
 
static int bt_has_preset_active_clear (void)
 Clear out active preset. More...
 
int bt_has_preset_name_change (uint8_t index, const char *name)
 Change the Preset Name. More...