nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches
bt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _DULT_BT_H_
8#define _DULT_BT_H_
9
10#include <stdint.h>
11#include <stddef.h>
12#include <zephyr/bluetooth/bluetooth.h>
13
14#include <dult/dult.h>
15
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34#define DULT_BT_ADV_PROPRIETARY_DATA_MAX_LEN_WITH_FLAGS (22)
35
49#define DULT_BT_ADV_PROPRIETARY_DATA_MAX_LEN_NO_FLAGS (25)
50
61
63 struct {
65 uint8_t *buf;
66
73 size_t len;
75};
76
86#define DULT_BT_ADV_DATA_INIT(_flags_present, _proprietary_buf, _proprietary_len) \
87 { \
88 .flags_present = (_flags_present), \
89 .proprietary = { \
90 .buf = (_proprietary_buf), \
91 .len = (_proprietary_len), \
92 }, \
93 }
94
106#define DULT_BT_ADV_DATA_PROPRIETARY_INIT(_flags_present, _proprietary_buf) \
107 DULT_BT_ADV_DATA_INIT(_flags_present, _proprietary_buf, ARRAY_SIZE(_proprietary_buf))
108
116#define DULT_BT_ADV_DATA_NO_PROPRIETARY_INIT \
117 DULT_BT_ADV_DATA_INIT(false, NULL, 0)
118
140int dult_bt_adv_data_fill(const struct dult_user *user, struct bt_data *bt_adv_data,
141 uint8_t *buf, size_t buf_size, const struct dult_bt_adv_data *adv_data);
142
181 bool (*access_verify)(struct bt_conn *conn);
182};
183
202int dult_bt_anos_cb_register(const struct dult_user *user, const struct dult_bt_anos_cb *cb);
203
204#ifdef __cplusplus
205}
206#endif
207
212#endif /* _DULT_BT_H_ */
int dult_bt_anos_cb_register(const struct dult_user *user, const struct dult_bt_anos_cb *cb)
Register DULT Bluetooth ANOS callback structure.
int dult_bt_adv_data_fill(const struct dult_user *user, struct bt_data *bt_adv_data, uint8_t *buf, size_t buf_size, const struct dult_bt_adv_data *adv_data)
Encode the DULT location-enabled Bluetooth advertising payload.
struct dult_bt_adv_data::@199 proprietary
uint8_t * buf
Definition bt.h:65
size_t len
Definition bt.h:73
bool flags_present
Definition bt.h:60
Definition bt.h:52
bool(* access_verify)(struct bt_conn *conn)
Verify whether a connection may access ANOS opcodes.
Definition bt.h:181
Definition bt.h:144
Definition dult.h:74