nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
adv_prov.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef BT_ADV_PROV_H_
12#define BT_ADV_PROV_H_
13
14#include <zephyr/bluetooth/bluetooth.h>
15
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31
38
44
49
55 uint8_t adv_handle;
56};
57
67};
68
81typedef int (*bt_le_adv_prov_data_get)(struct bt_data *d,
82 const struct bt_le_adv_prov_adv_state *state,
83 struct bt_le_adv_prov_feedback *fb);
84
89};
90
99#define BT_LE_ADV_PROV_AD_PROVIDER_REGISTER(pname, get_data_fn) \
100 STRUCT_SECTION_ITERABLE_ALTERNATE(bt_le_adv_prov_ad, bt_le_adv_prov_provider, pname) = { \
101 .get_data = get_data_fn, \
102 }
103
112#define BT_LE_ADV_PROV_SD_PROVIDER_REGISTER(pname, get_data_fn) \
113 STRUCT_SECTION_ITERABLE_ALTERNATE(bt_le_adv_prov_sd, bt_le_adv_prov_provider, pname) = { \
114 .get_data = get_data_fn, \
115 }
116
125
135
149int bt_le_adv_prov_get_ad(struct bt_data *ad, size_t *ad_len,
150 const struct bt_le_adv_prov_adv_state *state,
151 struct bt_le_adv_prov_feedback *fb);
152
166int bt_le_adv_prov_get_sd(struct bt_data *sd, size_t *sd_len,
167 const struct bt_le_adv_prov_adv_state *state,
168 struct bt_le_adv_prov_feedback *fb);
169
170#ifdef __cplusplus
171}
172#endif
173
178#endif /* BT_ADV_PROV_H_ */
size_t bt_le_adv_prov_get_sd_prov_cnt(void)
int bt_le_adv_prov_get_ad(struct bt_data *ad, size_t *ad_len, const struct bt_le_adv_prov_adv_state *state, struct bt_le_adv_prov_feedback *fb)
int(* bt_le_adv_prov_data_get)(struct bt_data *d, const struct bt_le_adv_prov_adv_state *state, struct bt_le_adv_prov_feedback *fb)
Definition: adv_prov.h:81
size_t bt_le_adv_prov_get_ad_prov_cnt(void)
int bt_le_adv_prov_get_sd(struct bt_data *sd, size_t *sd_len, const struct bt_le_adv_prov_adv_state *state, struct bt_le_adv_prov_feedback *fb)
bool in_grace_period
Definition: adv_prov.h:37
uint8_t adv_handle
Definition: adv_prov.h:55
bool rpa_rotated
Definition: adv_prov.h:43
bool pairing_mode
Definition: adv_prov.h:30
bool new_adv_session
Definition: adv_prov.h:48
Definition: adv_prov.h:28
size_t grace_period_s
Definition: adv_prov.h:66
Definition: adv_prov.h:59
bt_le_adv_prov_data_get get_data
Definition: adv_prov.h:88
Definition: adv_prov.h:86
enum state_type state