ble.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file ble.h
5  *
6  * @brief include all ble sdk header files
7  *
8  ****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 
38  /**
39  * @addtogroup BLE
40  * @{
41  */
42 
43 /**
44  @addtogroup BLE_COMMEN BLE Common
45  @{
46  @brief BLE Common interface.
47  */
48 
49 #ifndef __BLE_H__
50 #define __BLE_H__
51 
52 #include "ble_att.h"
53 #include "ble_error.h"
54 #include "ble_gapc.h"
55 #include "ble_gapm.h"
56 #include "ble_gatt.h"
57 #include "ble_gattc.h"
58 #include "ble_gatts.h"
59 #include "ble_l2cap.h"
60 #include "ble_prf.h"
61 #include "ble_enh_prf.h"
62 #include "ble_sec.h"
63 #include "ble_event.h"
64 #include "ble_gattc_cache.h"
65 
66 #include <stdio.h>
67 
68 /** @addtogroup BLE_COMMEN_ENUM Enumerations
69  * @{
70  */
71 
72 /**
73  * @brief RF TX mode.
74  */
75 typedef enum
76 {
81 
82 /**
83  * @brief The resistance value (ohm) of the RF match circuit.
84  */
85 typedef enum
86 {
90 
91 /**
92  * @brief RF RX performace/power selection.
93  */
94 typedef enum
95 {
99 
100 /**
101  ****************************************************************************************
102  * @brief Call back definition of the function that can handle result of an AES based algorithm
103  *
104  * @param[in] status Execution status
105  * @param[in] aes_res 16 bytes block result
106  * @param[in] src_info Information provided by requester
107  ****************************************************************************************
108  */
109 typedef void (*aes_result_cb) (uint8_t status, const uint8_t* aes_res, uint32_t src_info);
110 
111 /**@brief Receive controller pachet callback type. */
112 typedef void (*ble_hci_host_recv_cb_t)(uint8_t *p_data, uint16_t length);
113 
114 /** @} */
115 
116 /** @addtogroup BLE_COMMEN_STRUCTURES Structures
117  * @{
118  */
119 /**@brief The table contains the pointers to four arrays which are used
120  * as heap memory by BLE stack in ROM. The size of four arrays depends on
121  * the number of connections and the number of attributes of profiles. */
122 typedef struct
123 {
124  uint32_t *env_ret; /**< Pointer to the array for environment heap */
125  uint32_t *db_ret; /**< Pointer to the array for ATT DB heap */
126  uint32_t *msg_ret; /**< Pointer to the array for message heap */
127  uint32_t *non_ret; /**< Pointer to the array for non-retention heap */
128  uint32_t env_ret_size; /**< The size of the array for environment heap */
129  uint32_t db_ret_size; /**< The size of the array for ATT DB heap */
130  uint32_t msg_ret_size; /**< The size of the array for message heap */
131  uint32_t non_ret_size; /**< The size of the array for non-retention heap */
132  uint8_t *prf_buf; /**< Pointer to the array for profile heap */
133  uint32_t buf_size; /**< The size of the array for profile heap */
134  uint8_t *bm_buf; /**< Pointer to the array for bond manager heap */
135  uint32_t bm_size; /**< The size of the array for bond manager heap */
136  uint8_t *conn_buf; /**< Pointer to the array for connection heap */
137  uint32_t conn_size; /**< The size of the array for connection heap */
138 
139  uint16_t em_ble_act_num; /**< The number of ble maxium activities */
140  uint16_t em_ble_ral_num; /**< The number of ble maxium resolvable address list */
141  uint16_t em_ble_adv_buf_nb_tx; /**< The number of advertising data buffers */
142  uint16_t em_ble_adv_frag_nb_tx; /**< The number of advertising or scan response data fragments in extended advertising PDU chain */
143  uint16_t em_common_offset; /**< Start offset of the common EM part */
145 
146 /**@brief BLE HCI RX Channel (Host send packet to controller). */
147 typedef struct
148 {
149  uint8_t *p_channel; /**< Pointer to buffer for controller receive cache. */
150  uint16_t cache_size; /**< Size of the cache buffer. */
152 
153 /**@brief Extended LLCP. */
155 {
156  void (*llc_ext_llcp_proc_error_cb) (uint8_t link_id, uint8_t error_type, void* param); /**< Handler of Extended llcp procedure error. */
157  void (*llc_ext_llcp_req_proc_done_cb) (uint8_t link_id, uint8_t status, uint8_t ext_opcode, uint8_t *per_param); /**< Report the Extended llcp procedure done. */
158  uint8_t (*llc_ext_llcp_req_handler_cb) (uint8_t link_id, uint8_t *req_param, uint8_t *rsp_param); /**< Handle the Extended llcp request. */
159 };
160 
161 /** @} */
162 
163 /** @addtogroup BLE_COMMEN_FUNCTIONS Functions
164  * @{ */
165 /**
166  *****************************************************************************************
167  * @brief Initialize BLE Stack.
168  *
169  * @param[in] evt_handler: Pointer to the ble event handler.
170  * @param[in] p_heaps_table: Pointer to the BLE stack heaps table.
171  *****************************************************************************************
172  */
173 uint16_t ble_stack_init(ble_evt_handler_t evt_handler, stack_heaps_table_t *p_heaps_table);
174 
175 
176 /**
177  *****************************************************************************************
178  * @brief Initialize BLE Stack controller.
179  *
180  * @param[in] p_heaps_table: Pointer to the BLE stack heaps table.
181  *
182  * @note: This function should be called if only as a controller.
183  *****************************************************************************************
184  */
186 
187 /**
188  *****************************************************************************************
189  * @brief Initialize ble hci adapter module.
190  *
191  * @param[in] p_rx_channel: Pointer to hci adapter rx channel
192  * @param[in] host_recv_cb: Callback to receive controller packet.
193  *
194  * @return Result of initializing.
195  *****************************************************************************************
196  */
198 
199 /**
200  *****************************************************************************************
201  * @brief BLE HCI adapter host send packet.
202  *
203  * @param[in] p_data: Pointer to packet data.
204  * @param[in] length: Length of packet data.
205  *
206  * @return Result of send.
207  *****************************************************************************************
208  */
209 sdk_err_t ble_hci_host_packet_send(uint8_t *p_data, uint16_t length);
210 
211 /**
212  *****************************************************************************************
213  * @brief Get surplus space of controller receive channel.
214  *
215  * @return Result of get.
216  *****************************************************************************************
217  */
219 
220 /**
221  *****************************************************************************************
222  * @brief Register BLE idle time notification callback function.
223  *
224  * @param[in] callback: function pointer of BLE idle time notification function.
225  * @note hs: the idle time of BLE in half slot (312.5us).
226  * Callback will be called by BLE ISR to notify the rest idle time if there are some BLE activities.
227  * It should be realized as simlpe as you can.
228  * It's not suitable for ISO activities.
229  *****************************************************************************************
230  */
231 void ble_idle_time_notify_cb_register(void (*callback)(uint32_t hs));
232 
233 /**
234  *****************************************************************************************
235  * @brief Register BLE activity start notification callback function.
236  *
237  * @param[in] callback: function pointer of BLE activity start notification function.
238  * @note e_role: the role of activity, @ref ble_gap_actv_role_t for possible roles.
239  * index: The index parameter is interpreted by role.
240  * If role is @ref BLE_GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising.
241  * If role is @ref BLE_GAP_ACTIVITY_ROLE_CON, it's the index of Connection.
242  * For all other roles, it should be ignored.
243  * Callback will be called by BLE ISR when the BLE activity starts every time.
244  * It should be realized as simlpe as you can. You'd better to define it in the RAM space
245  * It's not suitable for ISO activities.
246  *****************************************************************************************
247  */
248 void ble_activity_start_notify_cb_register(void (*callback)(ble_gap_actv_role_t e_role, uint8_t index));
249 
250 /**
251  *****************************************************************************************
252  * @brief Register BLE activity end notification callback function.
253  *
254  * @param[in] callback: function pointer of BLE activity end notification function.
255  * @note e_role: the role of activity, refer to @ref ble_gap_actv_role_t for possible roles.
256  * index: The index parameter is interpreted by role.
257  * If role is @ref BLE_GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising.
258  * If role is @ref BLE_GAP_ACTIVITY_ROLE_CON, it's the index of Connection.
259  * For all other roles, it should be ignored.
260  * Callback will be called by BLE ISR when the BLE activity ends every time.
261  * It should be realized as simlpe as you can. You'd better to define it in the RAM space
262  * It's not suitable for ISO activities.
263  *****************************************************************************************
264  */
265 void ble_activity_end_notify_cb_register(void (*callback)(ble_gap_actv_role_t e_role, uint8_t index));
266 
267 /**
268  *****************************************************************************************
269  * @brief Change the RF TX mode of LP or ULP.
270  *
271  * @param[in] e_rf_tx_mode: Refer to @ref ble_rf_tx_mode_t.
272  *
273  * @note This function should be called before BLE stack init.
274  *
275  * @return SDK_SUCCESS: Successfully set tx mode.
276  * SDK_ERR_DISALLOWED: Failed to set tx mode.
277  *****************************************************************************************
278  */
279 uint8_t ble_rf_tx_mode_set(ble_rf_tx_mode_t e_rf_tx_mode);
280 
281 /**
282  *****************************************************************************************
283  * @brief Get the RF TX mode of LP or ULP.
284  *
285  * @return Refer to @ref ble_rf_tx_mode_t.
286  *
287  *****************************************************************************************
288  */
290 
291 /**
292  *****************************************************************************************
293  * @brief Add an option to improve rf rx performance, and the current during rx will increase a bit
294  *
295  * @param[in] selection: The choice of prefer better rf rx performance or better power consumption.
296  *
297  * @note This function should be called after BLE stack init.
298  *****************************************************************************************
299  */
301 
302 /**
303  *****************************************************************************************
304  * @brief Set the resistance value of the RF match circuit (unit: ohm).
305  *
306  * @param[in] e_ohm: The resistance value (ohm) of the RF match circuit according to the board,
307  * Refer to @ref ble_rf_match_circuit_t.
308  * BLE_RF_MATCH_CIRCUIT_25OHM: 25 ohm.
309  * BLE_RF_MATCH_CIRCUIT_100OHM: 100 ohm.
310  * Others: invalid.
311  *
312  * @note This function should be called before BLE stack init.
313  *****************************************************************************************
314  */
316 
317 /**
318  *****************************************************************************************
319  * @brief Get the resistance value of the RF match circuit (unit: ohm).
320  *
321  * @return The resistance value (ohm) of the RF match circuit according to the board (ohm).
322  * BLE_RF_MATCH_CIRCUIT_25OHM: 25 ohm.
323  * BLE_RF_MATCH_CIRCUIT_100OHM: 100 ohm.
324  * Others: invalid.
325  *****************************************************************************************
326  */
328 
329 /**
330  *****************************************************************************************
331  * @brief Start a extended llcp procedure.
332  * @param[in] conn_idx: function pointer of BLE activity end notification function.
333  * @param[in] param: Pointer to a param which intializer supply.
334  * @param[in] ext_opcode: Extended llcp opcode.
335  * @return The result of this function.
336  *****************************************************************************************
337  */
338 uint8_t ble_ext_llcp_send(uint16_t conn_idx, uint8_t *param, uint8_t ext_opcode);
339 
340 /**
341  *****************************************************************************************
342  * @brief Registered the extended llcp procedure callback.
343  * @param[in] func: @ref ble_ext_llcp_cb_func_t.
344  * @return The result of this function.
345  *****************************************************************************************
346  */
348 
349 /**
350  *****************************************************************************************
351  * @brief Perform an AES encryption - result within callback
352  * @param[in] key Key used for the encryption
353  * @param[in] val Value to encrypt using AES
354  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
355  * @param[in] src_info Information used retrieve requester
356  * @return void.
357  *****************************************************************************************
358  */
359 void ble_aes_encrypt(const uint8_t * key, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
360 
361 /**
362  *****************************************************************************************
363  * @brief Perform an AES dencryption - result within callback
364  * @param[in] key Key used for the dencryption
365  * @param[in] val Value to decrypt using AES
366  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
367  * @param[in] src_info Information used retrieve requester
368  * @return void.
369  *****************************************************************************************
370  */
371 void ble_aes_decrypt(const uint8_t * key, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
372 
373 /**
374  *****************************************************************************************
375  * @brief Perform an AES ecb encryption - result within callback
376  * @param[in] key Key used for the encryption
377  * @param[in] val Value to encrypt using AES
378  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
379  * @param[in] src_info Information used retrieve requester
380  * @return void.
381  *****************************************************************************************
382  */
383 void ble_aes_ecb_encrypt(const uint8_t * key, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
384 
385 /**
386  *****************************************************************************************
387  * @brief Perform an AES ecb dencryption - result within callback
388  * @param[in] key Key used for the dencryption
389  * @param[in] val Value to decrypt using AES
390  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
391  * @param[in] src_info Information used retrieve requester
392  * @return void.
393  *****************************************************************************************
394  */
395 void ble_aes_ecb_decrypt(const uint8_t * key, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
396 
397 /**
398  *****************************************************************************************
399  * @brief Perform an AES cbc encryption - result within callback
400  * @param[in] key Key used for the encryption
401  * @param[in] iv IV used for the cbc encryption.only first block need to be present, continue block shall be null.
402  * @param[in] val Value to encrypt using AES
403  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
404  * @param[in] src_info Information used retrieve requester
405  * @return void.
406  *****************************************************************************************
407  */
408 void ble_aes_cbc_encrypt(const uint8_t * key, const uint8_t * iv, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
409 
410 /**
411  *****************************************************************************************
412  * @brief Perform an AES cbc dencryption - result within callback
413  * @param[in] key Key used for the decryption
414  * @param[in] iv IV used for the cbc decryption.only first block need to be present, continue block shall be null.
415  * @param[in] val Value to decrypt using AES
416  * @param[in] res_cb Function that will handle the AES based result (16 bytes)
417  * @param[in] src_info Information used retrieve requester
418  * @return void.
419  *****************************************************************************************
420  */
421 void ble_aes_cbc_decrypt(const uint8_t * key, const uint8_t * iv, const uint8_t * val, aes_result_cb res_cb, uint32_t src_info);
422 /** @} */
423 #endif
424 /** @} */
425 /** @} */
426 
ble_hci_host_recv_cb_t
void(* ble_hci_host_recv_cb_t)(uint8_t *p_data, uint16_t length)
Receive controller pachet callback type.
Definition: ble.h:112
ble_stack_init
uint16_t ble_stack_init(ble_evt_handler_t evt_handler, stack_heaps_table_t *p_heaps_table)
Initialize BLE Stack.
ble_rf_rx_performance_selection
void ble_rf_rx_performance_selection(rf_rx_performance_selection_t selection)
Add an option to improve rf rx performance, and the current during rx will increase a bit.
stack_heaps_table_t::em_ble_ral_num
uint16_t em_ble_ral_num
Definition: ble.h:140
ble_hci_init
sdk_err_t ble_hci_init(ble_hci_rx_channel_t *p_rx_channel, ble_hci_host_recv_cb_t host_recv_cb)
Initialize ble hci adapter module.
ble_hci_host_packet_send
sdk_err_t ble_hci_host_packet_send(uint8_t *p_data, uint16_t length)
BLE HCI adapter host send packet.
ble_hci_rx_channel_t::p_channel
uint8_t * p_channel
Definition: ble.h:149
stack_heaps_table_t::prf_buf
uint8_t * prf_buf
Definition: ble.h:132
ble_hci_rx_channel_t::cache_size
uint16_t cache_size
Definition: ble.h:150
ble_ext_llcp_cb_func_t
Extended LLCP.
Definition: ble.h:155
stack_heaps_table_t::db_ret_size
uint32_t db_ret_size
Definition: ble.h:129
stack_heaps_table_t::env_ret_size
uint32_t env_ret_size
Definition: ble.h:128
ble_gatts.h
BLE GATTS API.
ble_rf_match_circuit_t
ble_rf_match_circuit_t
The resistance value (ohm) of the RF match circuit.
Definition: ble.h:86
ble_gap_actv_role_t
ble_gap_actv_role_t
Possible roles of the activity.
Definition: ble_gapm.h:548
stack_heaps_table_t::conn_size
uint32_t conn_size
Definition: ble.h:137
ble_ext_llcp_cb_func_t::llc_ext_llcp_proc_error_cb
void(* llc_ext_llcp_proc_error_cb)(uint8_t link_id, uint8_t error_type, void *param)
Definition: ble.h:156
stack_heaps_table_t::msg_ret
uint32_t * msg_ret
Definition: ble.h:126
ble_gatt.h
BLE GATT.
rf_rx_performance_selection_t
rf_rx_performance_selection_t
RF RX performace/power selection.
Definition: ble.h:95
BLE_RF_TX_MODE_LP_MODE
@ BLE_RF_TX_MODE_LP_MODE
Definition: ble.h:78
ble_ext_llcp_send
uint8_t ble_ext_llcp_send(uint16_t conn_idx, uint8_t *param, uint8_t ext_opcode)
Start a extended llcp procedure.
BLE_RF_TX_MODE_INVALID
@ BLE_RF_TX_MODE_INVALID
Definition: ble.h:77
ble_l2cap.h
BLE L2CAP API.
ble_activity_start_notify_cb_register
void ble_activity_start_notify_cb_register(void(*callback)(ble_gap_actv_role_t e_role, uint8_t index))
Register BLE activity start notification callback function.
BLE_RF_MATCH_CIRCUIT_25OHM
@ BLE_RF_MATCH_CIRCUIT_25OHM
Definition: ble.h:87
ble_enh_prf.h
BLE PRF ENHANCED API.
ble_sec.h
BLE SEC API.
stack_heaps_table_t::bm_size
uint32_t bm_size
Definition: ble.h:135
ble_aes_encrypt
void ble_aes_encrypt(const uint8_t *key, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES encryption - result within callback.
BLE_RF_MATCH_CIRCUIT_100OHM
@ BLE_RF_MATCH_CIRCUIT_100OHM
Definition: ble.h:88
ble_hci_rx_channel_t
BLE HCI RX Channel (Host send packet to controller).
Definition: ble.h:148
stack_heaps_table_t::bm_buf
uint8_t * bm_buf
Definition: ble.h:134
ble_error.h
File that contains error codes.
ble_gapc.h
BLE GAPC API.
stack_heaps_table_t::em_ble_adv_buf_nb_tx
uint16_t em_ble_adv_buf_nb_tx
Definition: ble.h:141
ble_aes_ecb_encrypt
void ble_aes_ecb_encrypt(const uint8_t *key, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES ecb encryption - result within callback.
ble_prf.h
BLE PRF API.
ble_hci_rx_channel_surplus_space_get
uint16_t ble_hci_rx_channel_surplus_space_get(void)
Get surplus space of controller receive channel.
PRIOR_RF_RX_POWER
@ PRIOR_RF_RX_POWER
Definition: ble.h:97
ble_rf_match_circuit_get
ble_rf_match_circuit_t ble_rf_match_circuit_get(void)
Get the resistance value of the RF match circuit (unit: ohm).
stack_heaps_table_t::buf_size
uint32_t buf_size
Definition: ble.h:133
ble_rf_match_circuit_set
void ble_rf_match_circuit_set(ble_rf_match_circuit_t e_ohm)
Set the resistance value of the RF match circuit (unit: ohm).
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:273
stack_heaps_table_t::em_ble_act_num
uint16_t em_ble_act_num
Definition: ble.h:139
ble_ext_llcp_cb_reg
uint8_t ble_ext_llcp_cb_reg(struct ble_ext_llcp_cb_func_t *func)
Registered the extended llcp procedure callback.
aes_result_cb
void(* aes_result_cb)(uint8_t status, const uint8_t *aes_res, uint32_t src_info)
Call back definition of the function that can handle result of an AES based algorithm.
Definition: ble.h:109
ble_aes_decrypt
void ble_aes_decrypt(const uint8_t *key, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES dencryption - result within callback.
ble_event.h
BLE event header files.
stack_heaps_table_t::em_common_offset
uint16_t em_common_offset
Definition: ble.h:143
ble_rf_tx_mode_t
ble_rf_tx_mode_t
RF TX mode.
Definition: ble.h:76
ble_stack_controller_init
void ble_stack_controller_init(stack_heaps_table_t *p_heaps_table)
Initialize BLE Stack controller.
ble_aes_cbc_encrypt
void ble_aes_cbc_encrypt(const uint8_t *key, const uint8_t *iv, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES cbc encryption - result within callback.
ble_gapm.h
BLE GAPM API.
PRIOR_RF_RX_PERFORMANCE
@ PRIOR_RF_RX_PERFORMANCE
Definition: ble.h:96
ble_ext_llcp_cb_func_t::llc_ext_llcp_req_proc_done_cb
void(* llc_ext_llcp_req_proc_done_cb)(uint8_t link_id, uint8_t status, uint8_t ext_opcode, uint8_t *per_param)
Definition: ble.h:157
ble_activity_end_notify_cb_register
void ble_activity_end_notify_cb_register(void(*callback)(ble_gap_actv_role_t e_role, uint8_t index))
Register BLE activity end notification callback function.
stack_heaps_table_t::conn_buf
uint8_t * conn_buf
Definition: ble.h:136
ble_rf_tx_mode_set
uint8_t ble_rf_tx_mode_set(ble_rf_tx_mode_t e_rf_tx_mode)
Change the RF TX mode of LP or ULP.
ble_ext_llcp_cb_func_t::llc_ext_llcp_req_handler_cb
uint8_t(* llc_ext_llcp_req_handler_cb)(uint8_t link_id, uint8_t *req_param, uint8_t *rsp_param)
Definition: ble.h:158
stack_heaps_table_t::non_ret_size
uint32_t non_ret_size
Definition: ble.h:131
ble_att.h
Attribute Protocol.
stack_heaps_table_t::em_ble_adv_frag_nb_tx
uint16_t em_ble_adv_frag_nb_tx
Definition: ble.h:142
ble_idle_time_notify_cb_register
void ble_idle_time_notify_cb_register(void(*callback)(uint32_t hs))
Register BLE idle time notification callback function.
ble_evt_handler_t
void(* ble_evt_handler_t)(const ble_evt_t *p_evt)
The BLE event handler type.
Definition: ble_event.h:243
BLE_RF_TX_MODE_ULP_MODE
@ BLE_RF_TX_MODE_ULP_MODE
Definition: ble.h:79
ble_gattc.h
BLE GATTC API.
stack_heaps_table_t::msg_ret_size
uint32_t msg_ret_size
Definition: ble.h:130
ble_rf_tx_mode_get
ble_rf_tx_mode_t ble_rf_tx_mode_get(void)
Get the RF TX mode of LP or ULP.
ble_aes_ecb_decrypt
void ble_aes_ecb_decrypt(const uint8_t *key, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES ecb dencryption - result within callback.
stack_heaps_table_t::non_ret
uint32_t * non_ret
Definition: ble.h:127
stack_heaps_table_t::env_ret
uint32_t * env_ret
Definition: ble.h:124
stack_heaps_table_t::db_ret
uint32_t * db_ret
Definition: ble.h:125
stack_heaps_table_t
The table contains the pointers to four arrays which are used as heap memory by BLE stack in ROM....
Definition: ble.h:123
ble_aes_cbc_decrypt
void ble_aes_cbc_decrypt(const uint8_t *key, const uint8_t *iv, const uint8_t *val, aes_result_cb res_cb, uint32_t src_info)
Perform an AES cbc dencryption - result within callback.
ble_gattc_cache.h
BLE GATTC API.