-
-
Notifications
You must be signed in to change notification settings - Fork 284
/
Copy pathBLECallbacks.h
98 lines (81 loc) · 4.24 KB
/
BLECallbacks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Copyright (c) 2016 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __BLECALLBACKS_H__
#define __BLECALLBACKS_H__
uint8_t profile_notify_process (bt_conn_t *conn,
bt_gatt_subscribe_params_t *params,
const void *data, uint16_t length);
uint8_t profile_read_rsp_process(bt_conn_t *conn,
uint8_t err,
bt_gatt_read_params_t *params,
const void *data,
uint16_t length);
uint8_t profile_descriptor_read_rsp_process(bt_conn_t *conn,
uint8_t err,
bt_gatt_read_params_t *params,
const void *data,
uint16_t length);
int profile_longflush_process(struct bt_conn *conn,
const struct bt_gatt_attr *attr,
uint8_t flags);
ssize_t profile_longwrite_process(struct bt_conn *conn,
const struct bt_gatt_attr *attr,
const void *buf, uint16_t len,
uint16_t offset,
uint8_t flags);
ssize_t profile_write_process(bt_conn_t *conn,
const bt_gatt_attr_t *attr,
const void *buf, uint16_t len,
uint16_t offset,
uint8_t flags);
ssize_t profile_read_process(bt_conn_t *conn,
const bt_gatt_attr_t *attr,
void *buf, uint16_t len,
uint16_t offset);
uint8_t profile_discover_process(bt_conn_t *conn,
const bt_gatt_attr_t *attr,
bt_gatt_discover_params_t *params);
void bleConnectEventHandler(bt_conn_t *conn,
uint8_t err,
void *param);
void bleDisconnectEventHandler(bt_conn_t *conn,
uint8_t reason,
void *param);
void bleParamUpdatedEventHandler(bt_conn_t *conn,
uint16_t interval,
uint16_t latency,
uint16_t timeout,
void *param);
void ble_central_device_found(const bt_addr_le_t *addr,
int8_t rssi,
uint8_t type,
const uint8_t *ad,
uint8_t len);
uint8_t profile_service_read_rsp_process(bt_conn_t *conn,
uint8_t err,
bt_gatt_read_params_t *params,
const void *data,
uint16_t length);
void ble_on_write_no_rsp_complete(struct bt_conn *conn, uint8_t err,
const void *data);
uint8_t profile_characteristic_read_rsp_process(bt_conn_t *conn,
uint8_t err,
bt_gatt_read_params_t *params,
const void *data,
uint16_t length);
void prfile_cccd_cfg_changed(void *user_data, uint16_t value);
#endif