nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches
zbus_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _ZBUS_COMMON_H_
8#define _ZBUS_COMMON_H_
9
10#include <zephyr/bluetooth/audio/audio.h>
11
12#include "le_audio.h"
13
14#define ZBUS_READ_TIMEOUT_MS K_MSEC(100)
15#define ZBUS_ADD_OBS_TIMEOUT_MS K_MSEC(200)
16#define ZBUS_STREAMS_NUM_MAX 8
17
18/***** Messages for zbus ******/
19
23
28
40
43 struct bt_conn *conn;
44 struct bt_le_per_adv_sync *pa_sync;
45 enum bt_audio_dir dir;
46 uint8_t set_size;
47 uint8_t const *sirk;
49 struct bt_bap_stream *stream;
50};
51
53 STATUS_NOT_SET = 0, /* Initial status */
54 STATUS_SENT_WITH_TS, /* Data sent with timestamp */
55 STATUS_SENT_WITHOUT_TS, /* Data sent without timestamp */
56 STATUS_OVERRUN_FLUSHED, /* Data overrun, flushed */
57 STATUS_UNDERRUN_EMPTY_SDU_ON_AIR, /* Data underrun, empty SDU on air */
58 STATUS_ERROR, /* Error occurred (e.g. failed to send) */
59};
60
74
87
90 struct bt_conn *conn;
91 uint8_t index;
92 struct bt_le_ext_adv *ext_adv;
93 struct bt_le_per_adv_sync *pa_sync;
94 uint32_t broadcast_id;
96 bt_addr_le_t addr;
97 bt_addr_le_t identity;
98};
99
107
110 uint8_t volume;
111};
112
117
121
122#endif /* _ZBUS_COMMON_H_ */
bt_addr_le_t identity
Definition zbus_common.h:97
struct bt_le_per_adv_sync * pa_sync
Definition zbus_common.h:93
bt_addr_le_t addr
Definition zbus_common.h:96
struct bt_conn * conn
Definition zbus_common.h:90
enum bt_mgmt_evt_type event
Definition zbus_common.h:89
uint8_t index
Definition zbus_common.h:91
uint32_t broadcast_id
Definition zbus_common.h:94
uint8_t pa_sync_term_reason
Definition zbus_common.h:95
struct bt_le_ext_adv * ext_adv
Definition zbus_common.h:92
Definition zbus_common.h:88
uint32_t button_pin
Definition zbus_common.h:25
enum button_action button_action
Definition zbus_common.h:26
Definition zbus_common.h:24
enum content_control_evt_type event
Definition zbus_common.h:119
Definition zbus_common.h:118
struct bt_le_per_adv_sync * pa_sync
Definition zbus_common.h:44
struct bt_bap_stream * stream
Definition zbus_common.h:49
uint8_t set_size
Definition zbus_common.h:46
struct bt_conn * conn
Definition zbus_common.h:43
enum le_audio_evt_type event
Definition zbus_common.h:42
uint8_t const * sirk
Definition zbus_common.h:47
struct stream_index idx
Definition zbus_common.h:48
enum bt_audio_dir dir
Definition zbus_common.h:45
Definition zbus_common.h:41
uint32_t curr_ts_us
Definition zbus_common.h:68
uint32_t tx_sync_ts_us
Definition zbus_common.h:66
bool tx_sync_ts_us_valid
Definition zbus_common.h:67
struct stream_index idx[8]
Definition zbus_common.h:71
enum tx_data_status status
Definition zbus_common.h:69
bool adjust
Definition zbus_common.h:70
uint8_t num_idx
Definition zbus_common.h:72
Definition zbus_common.h:65
Stream index structure for identifying audio streams.
Definition le_audio.h:75
enum volume_evt_type event
Definition zbus_common.h:109
uint8_t volume
Definition zbus_common.h:110
Definition zbus_common.h:108
le_audio_evt_type
Definition zbus_common.h:29
@ LE_AUDIO_EVT_STREAMING
Definition zbus_common.h:32
@ LE_AUDIO_EVT_NOT_STREAMING
Definition zbus_common.h:33
@ LE_AUDIO_EVT_COORD_SET_DISCOVERED
Definition zbus_common.h:37
@ LE_AUDIO_EVT_NO_VALID_CFG
Definition zbus_common.h:36
@ LE_AUDIO_EVT_CONFIG_RECEIVED
Definition zbus_common.h:30
@ LE_AUDIO_EVT_STREAM_SENT
Definition zbus_common.h:34
@ LE_AUDIO_EVT_SYNC_LOST
Definition zbus_common.h:35
@ LE_AUDIO_EVT_DISCOVERY_COMPLETE
Definition zbus_common.h:38
@ LE_AUDIO_EVT_PRES_DELAY_SET
Definition zbus_common.h:31
button_action
Definition zbus_common.h:20
@ BUTTON_PRESS
Definition zbus_common.h:21
bt_mgmt_evt_type
Definition zbus_common.h:75
@ BT_MGMT_BROADCAST_CODE_RECEIVED
Definition zbus_common.h:85
@ BT_MGMT_EXT_ADV_WITH_PA_READY
Definition zbus_common.h:76
@ BT_MGMT_SECURITY_CHANGED
Definition zbus_common.h:78
@ BT_MGMT_DISCONNECTED
Definition zbus_common.h:83
@ BT_MGMT_PA_SYNCED
Definition zbus_common.h:81
@ BT_MGMT_PA_SYNC_LOST
Definition zbus_common.h:82
@ BT_MGMT_BROADCAST_SINK_DISABLE
Definition zbus_common.h:84
@ BT_MGMT_CONNECTED
Definition zbus_common.h:77
@ BT_MGMT_BOND_DELETED
Definition zbus_common.h:80
@ BT_MGMT_PAIRING_COMPLETE
Definition zbus_common.h:79
#define ZBUS_STREAMS_NUM_MAX
Definition zbus_common.h:16
volume_evt_type
Definition zbus_common.h:100
@ VOLUME_DOWN
Definition zbus_common.h:102
@ VOLUME_SET
Definition zbus_common.h:103
@ VOLUME_MUTE
Definition zbus_common.h:104
@ VOLUME_UP
Definition zbus_common.h:101
@ VOLUME_UNMUTE
Definition zbus_common.h:105
tx_data_status
Definition zbus_common.h:52
@ STATUS_SENT_WITH_TS
Definition zbus_common.h:54
@ STATUS_UNDERRUN_EMPTY_SDU_ON_AIR
Definition zbus_common.h:57
@ STATUS_ERROR
Definition zbus_common.h:58
@ STATUS_SENT_WITHOUT_TS
Definition zbus_common.h:55
@ STATUS_OVERRUN_FLUSHED
Definition zbus_common.h:56
@ STATUS_NOT_SET
Definition zbus_common.h:53
content_control_evt_type
Definition zbus_common.h:113
@ MEDIA_START
Definition zbus_common.h:114
@ MEDIA_STOP
Definition zbus_common.h:115