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

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

#include <vcp.h>

Data Fields

void(* state )(struct bt_conn *conn, int err, uint8_t volume, uint8_t mute)
 Callback function for Volume Control Service volume state.
 
void(* flags )(struct bt_conn *conn, int err, uint8_t flags)
 Callback function for Volume Control Service flags.
 

Detailed Description

Struct to hold the Volume Renderer callbacks.

These can be registered for usage with bt_vcp_vol_rend_register().

Field Documentation

◆ flags

void(* bt_vcp_vol_rend_cb::flags) (struct bt_conn *conn, int err, uint8_t flags)

Callback function for Volume Control Service flags.

Called when the value is locally read as the server. Called when the value is remotely read as the client. Called if the value is changed by either the server or client.

Parameters
connPointer to the connection to a remote device if the change was caused by it, otherwise NULL.
errError value. 0 on success, GATT error on positive value or errno on negative value.
flagsThe flags of the Volume Control Service server.

◆ state

void(* bt_vcp_vol_rend_cb::state) (struct bt_conn *conn, int err, uint8_t volume, uint8_t mute)

Callback function for Volume Control Service volume state.

Called when the value is locally read with bt_vcp_vol_rend_get_state(), or if the state is changed by either the Volume Renderer or a remote Volume Controller.

Parameters
connPointer to the connection to a remote device if the change was caused by it, otherwise NULL.
errError value. 0 on success, GATT error on positive value or errno on negative value.
volumeThe volume of the Volume Control Service server.
muteThe mute setting of the Volume Control Service server.

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