nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
latency.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef BT_LATENCY_H_
8#define BT_LATENCY_H_
9
17#include <zephyr/bluetooth/uuid.h>
18#include <zephyr/bluetooth/conn.h>
19#include <bluetooth/gatt_dm.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
38 void (*latency_request)(const void *buf, uint16_t len);
39};
40
42struct bt_latency {
44 uint16_t handle;
45
47 struct bt_conn *conn;
48
50 atomic_t state;
51};
52
55#define BT_UUID_LATENCY_VAL \
56 BT_UUID_128_ENCODE(0x67136e01, 0x58db, 0xf39b, 0x3446, 0xfdde58c0813a)
57
58#define BT_UUID_LATENCY BT_UUID_DECLARE_128(BT_UUID_LATENCY_VAL)
59
60#define BT_UUID_LATENCY_CHAR_VAL \
61 BT_UUID_128_ENCODE(0x67136e02, 0x58db, 0xf39b, 0x3446, 0xfdde58c0813a)
62
64#define BT_UUID_LATENCY_CHAR BT_UUID_DECLARE_128(BT_UUID_LATENCY_CHAR_VAL)
65
78int bt_latency_init(struct bt_latency *latency,
79 const struct bt_latency_cb *cb);
80
81#ifdef __cplusplus
82}
83#endif
84
89#endif /* BT_LATENCY_H_ */
int bt_latency_init(struct bt_latency *latency, const struct bt_latency_cb *cb)
Initialize the GATT latency service.
void(* latency_request)(const void *buf, uint16_t len)
Latency received callback.
Definition: latency.h:38
Latency callback structure.
Definition: latency.h:26
atomic_t state
Definition: latency.h:50
struct bt_conn * conn
Definition: latency.h:47
uint16_t handle
Definition: latency.h:44
Latency structure.
Definition: latency.h:42