Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_vcp_vol_ctlr_cb Struct Reference

Struct to hold the Volume Controller callbacks. More...

#include <vcp.h>

Data Fields

void(* state )(struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t volume, uint8_t mute)
 Callback function for Volume Control Profile volume state.
 
void(* flags )(struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t flags)
 Callback function for Volume Control Profile volume flags.
 
void(* discover )(struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t vocs_count, uint8_t aics_count)
 Callback function for bt_vcp_vol_ctlr_discover().
 
void(* vol_down )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_vol_down().
 
void(* vol_up )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_vol_up().
 
void(* mute )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_mute().
 
void(* unmute )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_unmute().
 
void(* vol_down_unmute )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_vol_down_unmute().
 
void(* vol_up_unmute )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_vol_up_unmute().
 
void(* vol_set )(struct bt_vcp_vol_ctlr *vol_ctlr, int err)
 Callback function for bt_vcp_vol_ctlr_vol_set().
 
struct bt_vocs_cb vocs_cb
 Volume Offset Control Service callbacks.
 
struct bt_aics_cb aics_cb
 Audio Input Control Service callbacks.
 

Detailed Description

Struct to hold the Volume Controller callbacks.

These can be registered for usage with bt_vcp_vol_ctlr_cb_register().

Field Documentation

◆ aics_cb

struct bt_aics_cb bt_vcp_vol_ctlr_cb::aics_cb

Audio Input Control Service callbacks.

◆ discover

void(* bt_vcp_vol_ctlr_cb::discover) (struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t vocs_count, uint8_t aics_count)

Callback function for bt_vcp_vol_ctlr_discover().

This callback is called once the discovery procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.
vocs_countNumber of Volume Offset Control Service instances on the remote Volume Renderer.
aics_countNumber of Audio Input Control Service instances the remote Volume Renderer.

◆ flags

void(* bt_vcp_vol_ctlr_cb::flags) (struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t flags)

Callback function for Volume Control Profile volume flags.

Called when the value is remotely read as the Volume Controller. Called if the value is changed by the Volume Renderer.

A non-zero value indicates the volume has been changed on the Volume Renderer since it was booted.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.
flagsThe flags of the Volume Renderer.

◆ mute

void(* bt_vcp_vol_ctlr_cb::mute) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_mute().

Called when the mute procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ state

void(* bt_vcp_vol_ctlr_cb::state) (struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t volume, uint8_t mute)

Callback function for Volume Control Profile volume state.

Called when the value is remotely read as the Volume Controller. Called if the value is changed by either the Volume Renderer or Volume Controller, and notified to the to Volume Controller.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.
volumeThe volume of the Volume Renderer.
muteThe mute setting of the Volume Renderer.

◆ unmute

void(* bt_vcp_vol_ctlr_cb::unmute) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_unmute().

Called when the unmute procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ vocs_cb

struct bt_vocs_cb bt_vcp_vol_ctlr_cb::vocs_cb

Volume Offset Control Service callbacks.

◆ vol_down

void(* bt_vcp_vol_ctlr_cb::vol_down) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_vol_down().

Called when the volume down procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ vol_down_unmute

void(* bt_vcp_vol_ctlr_cb::vol_down_unmute) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_vol_down_unmute().

Called when the volume down and unmute procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ vol_set

void(* bt_vcp_vol_ctlr_cb::vol_set) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_vol_set().

Called when the set absolute volume procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ vol_up

void(* bt_vcp_vol_ctlr_cb::vol_up) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_vol_up().

Called when the volume up procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

◆ vol_up_unmute

void(* bt_vcp_vol_ctlr_cb::vol_up_unmute) (struct bt_vcp_vol_ctlr *vol_ctlr, int err)

Callback function for bt_vcp_vol_ctlr_vol_up_unmute().

Called when the volume up and unmute procedure is completed.

Parameters
vol_ctlrVolume Controller instance pointer.
errError value. 0 on success, GATT error on positive value or errno on negative value.

The documentation for this struct was generated from the following file: