ESP-IDF
Select one of the symbols to view example projects that use it.
Symbol previews are coming soon...
Outline
#define __BTC_GATTS_H__
#include "btc/btc_task.h"
#include "esp_bt_defs.h"
#include "esp_gatt_defs.h"
#include "esp_gatts_api.h"
#include "osi/future.h"
btc_gatts_act_t
BTC_GATTS_ACT_APP_REGISTER
BTC_GATTS_ACT_APP_UNREGISTER
BTC_GATTS_ACT_CREATE_SERVICE
BTC_GATTS_ACT_CREATE_ATTR_TAB
BTC_GATTS_ACT_DELETE_SERVICE
BTC_GATTS_ACT_START_SERVICE
BTC_GATTS_ACT_STOP_SERVICE
BTC_GATTS_ACT_ADD_INCLUDE_SERVICE
BTC_GATTS_ACT_ADD_CHAR
BTC_GATTS_ACT_ADD_CHAR_DESCR
BTC_GATTS_ACT_SEND_INDICATE
BTC_GATTS_ACT_SEND_RESPONSE
BTC_GATTS_ACT_SET_ATTR_VALUE
BTC_GATTS_ACT_OPEN
BTC_GATTS_ACT_CLOSE
BTC_GATTS_ACT_SEND_SERVICE_CHANGE
BTC_GATTS_ACT_SHOW_LOCAL_DATABASE
btc_ble_gatts_args_t
app_reg_args
app_id
app_reg
app_unreg_args
gatts_if
app_unreg
create_srvc_args
gatts_if
service_id
num_handle
create_srvc
create_attr_tab_args
gatts_if
srvc_inst_id
max_nb_attr
gatts_attr_db
create_attr_tab
delete_srvc_args
service_handle
delete_srvc
start_srvc_args
service_handle
start_srvc
stop_srvc_args
service_handle
stop_srvc
add_incl_srvc_args
service_handle
included_service_handle
add_incl_srvc
add_char_args
service_handle
char_uuid
perm
property
attr_control
char_val
add_char
add_descr_args
service_handle
descr_uuid
perm
attr_control
descr_val
add_descr
send_indicate_args
conn_id
attr_handle
need_confirm
value_len
value
send_ind
send_rsp_args
conn_id
trans_id
status
rsp
send_rsp
set_attr_val_args
handle
length
value
set_attr_val
open_args
gatts_if
remote_bda
is_direct
open
close_args
conn_id
close
send_service_change_args
gatts_if
remote_bda
send_service_change
esp_btc_creat_tab_t
complete_future
svc_start_hdl
svc_uuid
is_tab_creat_svc
is_use_svc
num_handle
handle_idx
handles
#define btc_creat_tab_env
btc_gatts_call_handler(btc_msg_t *);
btc_gatts_cb_handler(btc_msg_t *);
btc_gatts_arg_deep_copy(btc_msg_t *, void *, void *);
btc_gatts_arg_deep_free(btc_msg_t *);
btc_gatts_get_attr_value(uint16_t, uint16_t *, uint8_t **);
btc_gatts_show_local_database();
Files
loading...
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
components/bt/host/bluedroid/btc/profile/std/include/btc_gatts.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ... */
#ifndef
__BTC_GATTS_H__
#define
__BTC_GATTS_H__
#include
"
btc
/
btc_task.h"
#include
"
esp_bt_defs.h"
#include
"
esp_gatt_defs.h"
#include
"
esp_gatts_api.h"
#include
"
osi
/
future.h"
5 includes
typedef
enum
{
BTC_GATTS_ACT_APP_REGISTER
=
0
,
BTC_GATTS_ACT_APP_UNREGISTER
,
BTC_GATTS_ACT_CREATE_SERVICE
,
BTC_GATTS_ACT_CREATE_ATTR_TAB
,
BTC_GATTS_ACT_DELETE_SERVICE
,
BTC_GATTS_ACT_START_SERVICE
,
BTC_GATTS_ACT_STOP_SERVICE
,
BTC_GATTS_ACT_ADD_INCLUDE_SERVICE
,
BTC_GATTS_ACT_ADD_CHAR
,
BTC_GATTS_ACT_ADD_CHAR_DESCR
,
BTC_GATTS_ACT_SEND_INDICATE
,
BTC_GATTS_ACT_SEND_RESPONSE
,
BTC_GATTS_ACT_SET_ATTR_VALUE
,
BTC_GATTS_ACT_OPEN
,
BTC_GATTS_ACT_CLOSE
,
BTC_GATTS_ACT_SEND_SERVICE_CHANGE
,
BTC_GATTS_ACT_SHOW_LOCAL_DATABASE
,
}
{ ... }
btc_gatts_act_t
;
/* btc_ble_gatts_args_t */
typedef
union
{
//BTC_GATTS_ACT_APP_REGISTER = 0,
struct
app_reg_args
{
uint16_t
app_id
;
}
{ ... }
app_reg
;
//BTC_GATTS_ACT_APP_UNREGISTER,
struct
app_unreg_args
{
esp_gatt_if_t
gatts_if
;
}
{ ... }
app_unreg
;
//BTC_GATTS_ACT_CREATE_SERVICE,
struct
create_srvc_args
{
esp_gatt_if_t
gatts_if
;
esp_gatt_srvc_id_t
service_id
;
uint16_t
num_handle
;
}
{ ... }
create_srvc
;
//BTC_GATTS_ACT_CREATE_ATTR_TAB
struct
create_attr_tab_args
{
esp_gatt_if_t
gatts_if
;
uint8_t
srvc_inst_id
;
uint16_t
max_nb_attr
;
esp_gatts_attr_db_t
*
gatts_attr_db
;
}
{ ... }
create_attr_tab
;
//BTC_GATTS_ACT_DELETE_SERVICE,
struct
delete_srvc_args
{
uint16_t
service_handle
;
}
{ ... }
delete_srvc
;
//BTC_GATTS_ACT_START_SERVICE,
struct
start_srvc_args
{
uint16_t
service_handle
;
}
{ ... }
start_srvc
;
//BTC_GATTS_ACT_STOP_SERVICE,
struct
stop_srvc_args
{
uint16_t
service_handle
;
}
{ ... }
stop_srvc
;
//BTC_GATTS_ACT_ADD_INCLUDE_SERVICE,
struct
add_incl_srvc_args
{
uint16_t
service_handle
;
uint16_t
included_service_handle
;
}
{ ... }
add_incl_srvc
;
//BTC_GATTS_ACT_ADD_CHAR,
struct
add_char_args
{
uint16_t
service_handle
;
esp_bt_uuid_t
char_uuid
;
esp_gatt_perm_t
perm
;
esp_gatt_char_prop_t
property
;
esp_attr_control_t
attr_control
;
esp_attr_value_t
char_val
;
}
{ ... }
add_char
;
//BTC_GATTS_ACT_ADD_CHAR_DESCR,
struct
add_descr_args
{
uint16_t
service_handle
;
esp_bt_uuid_t
descr_uuid
;
esp_gatt_perm_t
perm
;
esp_attr_control_t
attr_control
;
esp_attr_value_t
descr_val
;
}
{ ... }
add_descr
;
//BTC_GATTS_ACT_SEND_INDICATE,
struct
send_indicate_args
{
uint16_t
conn_id
;
uint16_t
attr_handle
;
bool
need_confirm
;
uint16_t
value_len
;
uint8_t
*
value
;
}
{ ... }
send_ind
;
//BTC_GATTS_ACT_SEND_RESPONSE,
struct
send_rsp_args
{
uint16_t
conn_id
;
uint32_t
trans_id
;
esp_gatt_status_t
status
;
esp_gatt_rsp_t
*
rsp
;
}
{ ... }
send_rsp
;
//BTC_GATTS_SET_ATTR_VALUE
struct
set_attr_val_args
{
uint16_t
handle
;
uint16_t
length
;
uint8_t
*
value
;
}
{ ... }
set_attr_val
;
//BTC_GATTS_ACT_OPEN,
struct
open_args
{
esp_gatt_if_t
gatts_if
;
esp_bd_addr_t
remote_bda
;
bool
is_direct
;
}
{ ... }
open
;
//BTC_GATTS_ACT_CLOSE,
struct
close_args
{
uint16_t
conn_id
;
}
{ ... }
close
;
//BTC_GATTS_ACT_SEND_SERVICE_CHANGE,
struct
send_service_change_args
{
esp_gatt_if_t
gatts_if
;
esp_bd_addr_t
remote_bda
;
}
{ ... }
send_service_change
;
}
{ ... }
btc_ble_gatts_args_t
;
typedef
struct
{
future_t
*
complete_future
;
uint16_t
svc_start_hdl
;
esp_bt_uuid_t
svc_uuid
;
bool
is_tab_creat_svc
;
bool
is_use_svc
;
uint16_t
num_handle
;
uint16_t
handle_idx
;
uint16_t
handles
[
ESP_GATT_ATTR_HANDLE_MAX
]
;
}
{ ... }
esp_btc_creat_tab_t
;
#if
GATT_DYNAMIC_MEMORY
==
TRUE
extern
esp_btc_creat_tab_t
*
btc_creat_tab_env_ptr
;
#define
btc_creat_tab_env
(
*
btc_creat_tab_env_ptr
)
/* ... */
#endif
void
btc_gatts_call_handler
(
btc_msg_t
*
msg
)
;
void
btc_gatts_cb_handler
(
btc_msg_t
*
msg
)
;
void
btc_gatts_arg_deep_copy
(
btc_msg_t
*
msg
,
void
*
p_dest
,
void
*
p_src
)
;
void
btc_gatts_arg_deep_free
(
btc_msg_t
*
msg
)
;
esp_gatt_status_t
btc_gatts_get_attr_value
(
uint16_t
attr_handle
,
uint16_t
*
length
,
uint8_t
*
*
value
)
;
esp_gatt_status_t
btc_gatts_show_local_database
(
void
)
;
/* ... */
#endif
/* __BTC_GATTS_H__ */
Details
Show:
from
Types:
Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.
btc_gatts_arg_deep_free()
btc_gatts_arg_deep_copy()
btc_gatts_call_handler()
btc_gatts_cb_handler()
btc_gatts_get_attr_value()
btc_gatts_show_local_database()
TRUE
esp_bd_addr_t
esp_gatt_if_t
btc_ble_gatts_args_t
esp_gatt_char_prop_t
btc_ble_gatts_args_t::add_char
btc_ble_gatts_args_t::add_descr
btc_ble_gatts_args_t::send_ind
btc_ble_gatts_args_t::send_rsp
esp_gatt_perm_t
btc_ble_gatts_args_t::set_attr_val
btc_ble_gatts_args_t::create_attr_tab
add_char_args::char_val
add_descr_args::descr_val
btc_gatts_arg_deep_copy()::msg
send_indicate_args::value
set_attr_val_args::value
create_attr_tab_args::gatts_attr_db
send_rsp_args::rsp
GATT_DYNAMIC_MEMORY
esp_btc_creat_tab_t
btc_ble_gatts_args_t::create_srvc
btc_ble_gatts_args_t::open
esp_btc_creat_tab_t::svc_start_hdl
esp_btc_creat_tab_t::handles
send_indicate_args::value_len
send_rsp_args::conn_id
set_attr_val_args::length
btc_ble_gatts_args_t::send_service_change
esp_btc_creat_tab_t::handle_idx
btc_gatts_act_t::BTC_GATTS_ACT_CREATE_ATTR_TAB
btc_gatts_act_t::BTC_GATTS_ACT_ADD_CHAR
btc_gatts_act_t::BTC_GATTS_ACT_ADD_CHAR_DESCR
btc_gatts_act_t::BTC_GATTS_ACT_SEND_INDICATE
btc_gatts_act_t::BTC_GATTS_ACT_SEND_RESPONSE
btc_gatts_act_t::BTC_GATTS_ACT_SET_ATTR_VALUE
btc_ble_gatts_args_t::add_incl_srvc
close_args::conn_id
btc_ble_gatts_args_t::close
esp_btc_creat_tab_t::is_use_svc
btc_gatts_call_handler()::msg
btc_gatts_cb_handler()::msg
btc_gatts_arg_deep_free()::msg
btc_gatts_act_t::BTC_GATTS_ACT_CLOSE
create_attr_tab_args::max_nb_attr
send_rsp_args::trans_id
send_rsp_args::status
send_service_change_args::remote_bda
esp_btc_creat_tab_t::complete_future
esp_btc_creat_tab_t::is_tab_creat_svc
btc_gatts_act_t
btc_gatts_act_t::BTC_GATTS_ACT_APP_REGISTER
btc_gatts_act_t::BTC_GATTS_ACT_APP_UNREGISTER
btc_gatts_act_t::BTC_GATTS_ACT_CREATE_SERVICE
btc_gatts_act_t::BTC_GATTS_ACT_DELETE_SERVICE
btc_gatts_act_t::BTC_GATTS_ACT_START_SERVICE
btc_gatts_act_t::BTC_GATTS_ACT_STOP_SERVICE
btc_gatts_act_t::BTC_GATTS_ACT_ADD_INCLUDE_SERVICE
btc_gatts_act_t::BTC_GATTS_ACT_OPEN
btc_gatts_act_t::BTC_GATTS_ACT_SEND_SERVICE_CHANGE
btc_gatts_act_t::BTC_GATTS_ACT_SHOW_LOCAL_DATABASE
app_reg_args::app_id
btc_ble_gatts_args_t::app_reg
app_unreg_args::gatts_if
btc_ble_gatts_args_t::app_unreg
create_srvc_args::gatts_if
create_srvc_args::service_id
create_srvc_args::num_handle
create_attr_tab_args::gatts_if
create_attr_tab_args::srvc_inst_id
delete_srvc_args::service_handle
btc_ble_gatts_args_t::delete_srvc
start_srvc_args::service_handle
btc_ble_gatts_args_t::start_srvc
stop_srvc_args::service_handle
btc_ble_gatts_args_t::stop_srvc
add_incl_srvc_args::service_handle
add_incl_srvc_args::included_service_handle
add_char_args::service_handle
add_char_args::char_uuid
add_char_args::perm
add_char_args::property
add_char_args::attr_control
add_descr_args::service_handle
add_descr_args::descr_uuid
add_descr_args::perm
add_descr_args::attr_control
send_indicate_args::conn_id
send_indicate_args::attr_handle
send_indicate_args::need_confirm
set_attr_val_args::handle
open_args::gatts_if
open_args::remote_bda
open_args::is_direct
send_service_change_args::gatts_if
esp_btc_creat_tab_t::svc_uuid
ESP_GATT_ATTR_HANDLE_MAX
btc_gatts_arg_deep_copy()::p_dest
btc_gatts_arg_deep_copy()::p_src
btc_gatts_get_attr_value()::attr_handle
btc_gatts_get_attr_value()::length
btc_gatts_get_attr_value()::value
app_reg_args
app_unreg_args
create_srvc_args
create_attr_tab_args
delete_srvc_args
start_srvc_args
stop_srvc_args
add_incl_srvc_args
add_char_args
add_descr_args
send_indicate_args
send_rsp_args
set_attr_val_args
open_args
close_args
send_service_change_args
esp_btc_creat_tab_t::num_handle
__BTC_GATTS_H__
btc_gatts_act_t
esp_gatt_srvc_id_t
esp_gatts_attr_db_t
esp_bt_uuid_t
esp_attr_control_t
esp_attr_value_t
esp_gatt_status_t
esp_gatt_rsp_t
btc_ble_gatts_args_t
future_t
esp_btc_creat_tab_t
btc_msg_t