nRF Connect SDK API
3.4.99
Toggle main menu visibility
Loading...
Searching...
No Matches
gattp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5
*/
6
7
#ifndef BT_GATTP_H_
8
#define BT_GATTP_H_
9
17
18
#include <zephyr/bluetooth/gatt.h>
19
#include <zephyr/bluetooth/conn.h>
20
#include <
bluetooth/gatt_dm.h
>
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
27
struct
bt_gattp_handle_range
{
29
uint16_t
start_handle
;
30
32
uint16_t
end_handle
;
33
};
34
35
struct
bt_gattp
;
36
44
typedef
void (*
bt_gattp_indicate_cb
)(
45
struct
bt_gattp
*gattp,
46
const
struct
bt_gattp_handle_range
*handle_range,
47
int
err);
48
50
struct
bt_gattp
{
52
struct
bt_conn *
conn
;
53
55
uint16_t
handle_sc
;
56
58
uint16_t
handle_sc_ccc
;
59
61
struct
bt_gatt_subscribe_params
indicate_params
;
62
64
bt_gattp_indicate_cb
indicate_cb
;
65
67
atomic_t
state
;
68
};
69
77
int
bt_gattp_init
(
struct
bt_gattp
*gattp);
78
92
int
bt_gattp_handles_assign
(
struct
bt_gatt_dm *dm,
93
struct
bt_gattp
*gattp);
94
103
int
bt_gattp_subscribe_service_changed
(
struct
bt_gattp
*gattp,
104
bt_gattp_indicate_cb
func);
105
113
int
bt_gattp_unsubscribe_service_changed
(
struct
bt_gattp
*gattp);
114
115
#ifdef __cplusplus
116
}
117
#endif
118
122
123
#endif
/* BT_GATTP_H_ */
gatt_dm.h
bt_gattp_init
int bt_gattp_init(struct bt_gattp *gattp)
Initialize the GATT profile instance.
bt_gattp_indicate_cb
void(* bt_gattp_indicate_cb)(struct bt_gattp *gattp, const struct bt_gattp_handle_range *handle_range, int err)
Service Changed Indication callback function.
Definition
gattp.h:44
bt_gattp_handles_assign
int bt_gattp_handles_assign(struct bt_gatt_dm *dm, struct bt_gattp *gattp)
Assign handles to the GATT profile instance.
bt_gattp_unsubscribe_service_changed
int bt_gattp_unsubscribe_service_changed(struct bt_gattp *gattp)
Unsubscribe from the Service Changed indication.
bt_gattp_subscribe_service_changed
int bt_gattp_subscribe_service_changed(struct bt_gattp *gattp, bt_gattp_indicate_cb func)
Subscribe to the Service Changed indication.
bt_gattp_handle_range::end_handle
uint16_t end_handle
Definition
gattp.h:32
bt_gattp_handle_range::start_handle
uint16_t start_handle
Definition
gattp.h:29
bt_gattp_handle_range
Structure for Service Changed handle range.
Definition
gattp.h:27
bt_gattp::indicate_params
struct bt_gatt_subscribe_params indicate_params
Definition
gattp.h:61
bt_gattp::conn
struct bt_conn * conn
Definition
gattp.h:52
bt_gattp::state
atomic_t state
Definition
gattp.h:67
bt_gattp::handle_sc
uint16_t handle_sc
Definition
gattp.h:55
bt_gattp::handle_sc_ccc
uint16_t handle_sc_ccc
Definition
gattp.h:58
bt_gattp::indicate_cb
bt_gattp_indicate_cb indicate_cb
Definition
gattp.h:64
bt_gattp
GATT profile instance.
Definition
gattp.h:50
include
bluetooth
services
gattp.h
Generated on
for nRF Connect SDK API by
1.17.0