Select one of the symbols to view example projects that use it.
 
Outline
#define BTSTACK_MEMORY_H
#include "btstack_config.h"
#include "hci.h"
#include "l2cap.h"
#include "classic/avdtp_sink.h"
#include "classic/avdtp_source.h"
#include "classic/avrcp.h"
#include "classic/bnep.h"
#include "classic/btstack_link_key_db.h"
#include "classic/btstack_link_key_db_memory.h"
#include "classic/goep_server.h"
#include "classic/hfp.h"
#include "classic/hid_host.h"
#include "classic/rfcomm.h"
#include "classic/sdp_server.h"
#include "ble/gatt-service/battery_service_client.h"
#include "ble/gatt-service/hids_client.h"
#include "ble/gatt-service/scan_parameters_service_client.h"
#include "ble/gatt_client.h"
#include "ble/sm.h"
#include "mesh/mesh_network.h"
#include "mesh/mesh_keys.h"
#include "mesh/mesh_virtual_addresses.h"
btstack_memory_init();
btstack_memory_deinit();
btstack_memory_hci_connection_get();
btstack_memory_hci_connection_free(hci_connection_t *);
btstack_memory_l2cap_service_get();
btstack_memory_l2cap_service_free(l2cap_service_t *);
btstack_memory_l2cap_channel_get();
btstack_memory_l2cap_channel_free(l2cap_channel_t *);
btstack_memory_battery_service_client_get();
btstack_memory_battery_service_client_free(battery_service_client_t *);
btstack_memory_gatt_client_get();
btstack_memory_gatt_client_free(gatt_client_t *);
btstack_memory_hids_client_get();
btstack_memory_hids_client_free(hids_client_t *);
btstack_memory_scan_parameters_service_client_get();
btstack_memory_scan_parameters_service_client_free(scan_parameters_service_client_t *);
btstack_memory_sm_lookup_entry_get();
btstack_memory_sm_lookup_entry_free(sm_lookup_entry_t *);
btstack_memory_whitelist_entry_get();
btstack_memory_whitelist_entry_free(whitelist_entry_t *);
btstack_memory_periodic_advertiser_list_entry_get();
btstack_memory_periodic_advertiser_list_entry_free(periodic_advertiser_list_entry_t *);
Files
loading...
SourceVuRaspberry Pi Pico SDK and ExamplesBluetooth LE Stacksrc/btstack_memory.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * Copyright (C) 2014 BlueKitchen GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * 4. Any redistribution, use, or modification is done solely for * personal benefit and not for any commercial purpose or for * monetary gain. * * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * Please inquire about commercial licensing options at * contact@bluekitchen-gmbh.com * *//* ... */ /* * btstack_memory.h * * @brief BTstack memory management using configurable memory pools * *//* ... */ #ifndef BTSTACK_MEMORY_H #define BTSTACK_MEMORY_H #if defined __cplusplus extern "C" { #endif #include "btstack_config.h" // Core #include "hci.h" #include "l2cap.h" // Classic #ifdef ENABLE_CLASSIC #include "classic/avdtp_sink.h" #include "classic/avdtp_source.h" #include "classic/avrcp.h" #include "classic/bnep.h" #include "classic/btstack_link_key_db.h" #include "classic/btstack_link_key_db_memory.h" #include "classic/goep_server.h" #include "classic/hfp.h" #include "classic/hid_host.h" #include "classic/rfcomm.h" #include "classic/sdp_server.h" /* ... */#endif // BLE #ifdef ENABLE_BLE #include "ble/gatt-service/battery_service_client.h" #include "ble/gatt-service/hids_client.h" #include "ble/gatt-service/scan_parameters_service_client.h" #include "ble/gatt_client.h" #include "ble/sm.h" /* ... */#endif #ifdef ENABLE_MESH #include "mesh/mesh_network.h" #include "mesh/mesh_keys.h" #include "mesh/mesh_virtual_addresses.h" /* ... */#endif /* API_START */ /** * @brief Initializes BTstack memory pools. *//* ... */ void btstack_memory_init(void); /** * @brief Deinitialize BTstack memory pools * @note if HAVE_MALLOC is defined, all previously allocated buffers are free'd *//* ... */ void btstack_memory_deinit(void); /* API_END */ hci_connection_t * btstack_memory_hci_connection_get(void); void btstack_memory_hci_connection_free(hci_connection_t *hci_connection); l2cap_service_t * btstack_memory_l2cap_service_get(void); void btstack_memory_l2cap_service_free(l2cap_service_t *l2cap_service); l2cap_channel_t * btstack_memory_l2cap_channel_get(void); void btstack_memory_l2cap_channel_free(l2cap_channel_t *l2cap_channel); #ifdef ENABLE_CLASSIC rfcomm_multiplexer_t * btstack_memory_rfcomm_multiplexer_get(void); void btstack_memory_rfcomm_multiplexer_free(rfcomm_multiplexer_t *rfcomm_multiplexer); rfcomm_service_t * btstack_memory_rfcomm_service_get(void); void btstack_memory_rfcomm_service_free(rfcomm_service_t *rfcomm_service); rfcomm_channel_t * btstack_memory_rfcomm_channel_get(void); void btstack_memory_rfcomm_channel_free(rfcomm_channel_t *rfcomm_channel); btstack_link_key_db_memory_entry_t * btstack_memory_btstack_link_key_db_memory_entry_get(void); void btstack_memory_btstack_link_key_db_memory_entry_free(btstack_link_key_db_memory_entry_t *btstack_link_key_db_memory_entry); bnep_service_t * btstack_memory_bnep_service_get(void); void btstack_memory_bnep_service_free(bnep_service_t *bnep_service); bnep_channel_t * btstack_memory_bnep_channel_get(void); void btstack_memory_bnep_channel_free(bnep_channel_t *bnep_channel); goep_server_service_t * btstack_memory_goep_server_service_get(void); void btstack_memory_goep_server_service_free(goep_server_service_t *goep_server_service); goep_server_connection_t * btstack_memory_goep_server_connection_get(void); void btstack_memory_goep_server_connection_free(goep_server_connection_t *goep_server_connection); hfp_connection_t * btstack_memory_hfp_connection_get(void); void btstack_memory_hfp_connection_free(hfp_connection_t *hfp_connection); hid_host_connection_t * btstack_memory_hid_host_connection_get(void); void btstack_memory_hid_host_connection_free(hid_host_connection_t *hid_host_connection); service_record_item_t * btstack_memory_service_record_item_get(void); void btstack_memory_service_record_item_free(service_record_item_t *service_record_item); avdtp_stream_endpoint_t * btstack_memory_avdtp_stream_endpoint_get(void); void btstack_memory_avdtp_stream_endpoint_free(avdtp_stream_endpoint_t *avdtp_stream_endpoint); avdtp_connection_t * btstack_memory_avdtp_connection_get(void); void btstack_memory_avdtp_connection_free(avdtp_connection_t *avdtp_connection); avrcp_connection_t * btstack_memory_avrcp_connection_get(void); void btstack_memory_avrcp_connection_free(avrcp_connection_t *avrcp_connection); avrcp_browsing_connection_t * btstack_memory_avrcp_browsing_connection_get(void); void btstack_memory_avrcp_browsing_connection_free(avrcp_browsing_connection_t *avrcp_browsing_connection); /* ... */ #endif #ifdef ENABLE_BLE battery_service_client_t * btstack_memory_battery_service_client_get(void); void btstack_memory_battery_service_client_free(battery_service_client_t *battery_service_client); gatt_client_t * btstack_memory_gatt_client_get(void); void btstack_memory_gatt_client_free(gatt_client_t *gatt_client); hids_client_t * btstack_memory_hids_client_get(void); void btstack_memory_hids_client_free(hids_client_t *hids_client); scan_parameters_service_client_t * btstack_memory_scan_parameters_service_client_get(void); void btstack_memory_scan_parameters_service_client_free(scan_parameters_service_client_t *scan_parameters_service_client); sm_lookup_entry_t * btstack_memory_sm_lookup_entry_get(void); void btstack_memory_sm_lookup_entry_free(sm_lookup_entry_t *sm_lookup_entry); whitelist_entry_t * btstack_memory_whitelist_entry_get(void); void btstack_memory_whitelist_entry_free(whitelist_entry_t *whitelist_entry); periodic_advertiser_list_entry_t * btstack_memory_periodic_advertiser_list_entry_get(void); void btstack_memory_periodic_advertiser_list_entry_free(periodic_advertiser_list_entry_t *periodic_advertiser_list_entry); /* ... */ #endif #ifdef ENABLE_MESH mesh_network_pdu_t * btstack_memory_mesh_network_pdu_get(void); void btstack_memory_mesh_network_pdu_free(mesh_network_pdu_t *mesh_network_pdu); mesh_segmented_pdu_t * btstack_memory_mesh_segmented_pdu_get(void); void btstack_memory_mesh_segmented_pdu_free(mesh_segmented_pdu_t *mesh_segmented_pdu); mesh_upper_transport_pdu_t * btstack_memory_mesh_upper_transport_pdu_get(void); void btstack_memory_mesh_upper_transport_pdu_free(mesh_upper_transport_pdu_t *mesh_upper_transport_pdu); mesh_network_key_t * btstack_memory_mesh_network_key_get(void); void btstack_memory_mesh_network_key_free(mesh_network_key_t *mesh_network_key); mesh_transport_key_t * btstack_memory_mesh_transport_key_get(void); void btstack_memory_mesh_transport_key_free(mesh_transport_key_t *mesh_transport_key); mesh_virtual_address_t * btstack_memory_mesh_virtual_address_get(void); void btstack_memory_mesh_virtual_address_free(mesh_virtual_address_t *mesh_virtual_address); mesh_subnet_t * btstack_memory_mesh_subnet_get(void); void btstack_memory_mesh_subnet_free(mesh_subnet_t *mesh_subnet); /* ... */ #endif #ifdef ENABLE_LE_ISOCHRONOUS_STREAMS hci_iso_stream_t * btstack_memory_hci_iso_stream_get(void); void btstack_memory_hci_iso_stream_free(hci_iso_stream_t *hci_iso_stream); /* ... */ #endif #if defined __cplusplus }extern "C" { ... } #endif /* ... */ #endif // BTSTACK_MEMORY_H
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.