Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vcs.h File Reference

Go to the source code of this file.

Data Structures

struct  bt_vcs_register_param
 
struct  bt_vcs_included
 Volume Control Service included services. More...
 
struct  bt_vcs_cb
 

Macros

#define BT_VCS_VOCS_CNT   0
 
#define BT_VCS_AICS_CNT   0
 
#define BT_VCS_ERR_INVALID_COUNTER   0x80
 
#define BT_VCS_ERR_OP_NOT_SUPPORTED   0x81
 
#define BT_VCS_STATE_UNMUTED   0x00
 
#define BT_VCS_STATE_MUTED   0x01
 

Typedefs

typedef void(* bt_vcs_discover_cb) (struct bt_vcs *vcs, int err, uint8_t vocs_count, uint8_t aics_count)
 Callback function for bt_vcs_discover. More...
 
typedef void(* bt_vcs_state_cb) (struct bt_vcs *vcs, int err, uint8_t volume, uint8_t mute)
 Callback function for Volume Control Service volume state. More...
 
typedef void(* bt_vcs_flags_cb) (struct bt_vcs *vcs, int err, uint8_t flags)
 Callback function for Volume Control Service flags. More...
 
typedef void(* bt_vcs_write_cb) (struct bt_vcs *vcs, int err)
 Callback function for writes. More...
 

Functions

int bt_vcs_register (struct bt_vcs_register_param *param, struct bt_vcs **vcs)
 Register the Volume Control Service. More...
 
int bt_vcs_included_get (struct bt_vcs *vcs, struct bt_vcs_included *included)
 Get Volume Control Service included services. More...
 
int bt_vcs_client_conn_get (const struct bt_vcs *vcs, struct bt_conn **conn)
 Get the connection pointer of a client instance. More...
 
int bt_vcs_discover (struct bt_conn *conn, struct bt_vcs **vcs)
 Discover Volume Control Service and included services. More...
 
int bt_vcs_vol_step_set (uint8_t volume_step)
 Set the Volume Control Service volume step size. More...
 
int bt_vcs_vol_get (struct bt_vcs *vcs)
 Read the Volume Control Service volume state. More...
 
int bt_vcs_flags_get (struct bt_vcs *vcs)
 Read the Volume Control Service flags. More...
 
int bt_vcs_vol_down (struct bt_vcs *vcs)
 Turn the volume down by one step on the server. More...
 
int bt_vcs_vol_up (struct bt_vcs *vcs)
 Turn the volume up by one step on the server. More...
 
int bt_vcs_unmute_vol_down (struct bt_vcs *vcs)
 Turn the volume down and unmute the server. More...
 
int bt_vcs_unmute_vol_up (struct bt_vcs *vcs)
 Turn the volume up and unmute the server. More...
 
int bt_vcs_vol_set (struct bt_vcs *vcs, uint8_t volume)
 Set the volume on the server. More...
 
int bt_vcs_unmute (struct bt_vcs *vcs)
 Unmute the server. More...
 
int bt_vcs_mute (struct bt_vcs *vcs)
 Mute the server. More...
 
int bt_vcs_vocs_state_get (struct bt_vcs *vcs, struct bt_vocs *inst)
 Read the Volume Offset Control Service offset state. More...
 
int bt_vcs_vocs_location_get (struct bt_vcs *vcs, struct bt_vocs *inst)
 Read the Volume Offset Control Service location. More...
 
int bt_vcs_vocs_location_set (struct bt_vcs *vcs, struct bt_vocs *inst, uint8_t location)
 Set the Volume Offset Control Service location. More...
 
int bt_vcs_vocs_state_set (struct bt_vcs *vcs, struct bt_vocs *inst, int16_t offset)
 Set the Volume Offset Control Service offset state. More...
 
int bt_vcs_vocs_description_get (struct bt_vcs *vcs, struct bt_vocs *inst)
 Read the Volume Offset Control Service output description. More...
 
int bt_vcs_vocs_description_set (struct bt_vcs *vcs, struct bt_vocs *inst, const char *description)
 Set the Volume Offset Control Service description. More...
 
int bt_vcs_aics_deactivate (struct bt_vcs *vcs, struct bt_aics *inst)
 Deactivates an Audio Input Control Service instance. More...
 
int bt_vcs_aics_activate (struct bt_vcs *vcs, struct bt_aics *inst)
 Activates an Audio Input Control Service instance. More...
 
int bt_vcs_aics_state_get (struct bt_vcs *vcs, struct bt_aics *inst)
 Read the Audio Input Control Service input state. More...
 
int bt_vcs_aics_gain_setting_get (struct bt_vcs *vcs, struct bt_aics *inst)
 Read the Audio Input Control Service gain settings. More...
 
int bt_vcs_aics_type_get (struct bt_vcs *vcs, struct bt_aics *inst)
 Read the Audio Input Control Service input type. More...
 
int bt_vcs_aics_status_get (struct bt_vcs *vcs, struct bt_aics *inst)
 Read the Audio Input Control Service input status. More...
 
int bt_vcs_aics_mute (struct bt_vcs *vcs, struct bt_aics *inst)
 Mute the Audio Input Control Service input. More...
 
int bt_vcs_aics_unmute (struct bt_vcs *vcs, struct bt_aics *inst)
 Unmute the Audio Input Control Service input. More...
 
int bt_vcs_aics_manual_gain_set (struct bt_vcs *vcs, struct bt_aics *inst)
 Set input gain to manual. More...
 
int bt_vcs_aics_automatic_gain_set (struct bt_vcs *vcs, struct bt_aics *inst)
 Set the input gain to automatic. More...
 
int bt_vcs_aics_gain_set (struct bt_vcs *vcs, struct bt_aics *inst, int8_t gain)
 Set the input gain. More...
 
int bt_vcs_aics_description_get (struct bt_vcs *vcs, struct bt_aics *inst)
 Read the Audio Input Control Service description. More...
 
int bt_vcs_aics_description_set (struct bt_vcs *vcs, struct bt_aics *inst, const char *description)
 Set the Audio Input Control Service description. More...
 
int bt_vcs_client_cb_register (struct bt_vcs_cb *cb)
 Registers the callbacks used by the Volume Control Service client. More...