nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
latency_client.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_CLIENT_H_
8#define BT_LATENCY_CLIENT_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_response)(const void *buf, uint16_t len);
39};
40
44 uint16_t handle;
45
47 struct bt_gatt_write_params latency_params;
48
50 struct bt_conn *conn;
51
53 atomic_t state;
54};
55
69 const struct bt_latency_client_cb *cb);
70
89int bt_latency_handles_assign(struct bt_gatt_dm *dm,
90 struct bt_latency_client *latency);
91
104 const void *data, uint16_t len);
105
106#ifdef __cplusplus
107}
108#endif
109
114#endif /* BT_LATENCY_CLIENT_H_ */
int bt_latency_handles_assign(struct bt_gatt_dm *dm, struct bt_latency_client *latency)
Assign handles to the latency client instance.
int bt_latency_client_init(struct bt_latency_client *latency, const struct bt_latency_client_cb *cb)
Initialize the GATT latency client.
int bt_latency_request(struct bt_latency_client *latency, const void *data, uint16_t len)
Write data to the server.
void(* latency_response)(const void *buf, uint16_t len)
Latency received callback.
Definition: latency_client.h:38
Latency client callback structure.
Definition: latency_client.h:26
atomic_t state
Definition: latency_client.h:53
struct bt_gatt_write_params latency_params
Definition: latency_client.h:47
uint16_t handle
Definition: latency_client.h:44
struct bt_conn * conn
Definition: latency_client.h:50
Latency client structure.
Definition: latency_client.h:42