ble_event.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file ble_event.h
5 *
6 * @brief BLE event 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_EVENT BLE Event
45 @{
46 @brief BLE Event interface.
47 */
48 #ifndef __BLE_EVENT_H__
49 #define __BLE_EVENT_H__
50
51 #include "ble_gapm.h"
52 #include "ble_gapc.h"
53 #include "ble_gatts.h"
54 #include "ble_gattc.h"
55 #include "ble_sec.h"
56 #include "ble_l2cap.h"
57
58 /** @addtogroup BLE_EVENT_DEFINES Defines
59 * @{
60 */
61 /** @defgroup BLE_EVENT_BASE BLE Event Base
62 * @{ */
63 #define BLE_COMMON_EVT_BASE 0x0100 /**< BLE Common Event base. */
64 #define BLE_GAPM_EVT_BASE 0x0200 /**< BLE GAP Management Event base. */
65 #define BLE_GAPC_EVT_BASE 0x0300 /**< BLE GAP Connection Control Event base. */
66 #define BLE_GATTS_EVT_BASE 0x0400 /**< BLE GATTS Event base. */
67 #define BLE_GATTC_EVT_BASE 0x0500 /**< BLE GATTC Event base. */
68 #define BLE_GATT_COMMON_EVT_BASE 0x0600 /**< BLE GATT Event base. */
69 #define BLE_SEC_EVT_BASE 0x0700 /**< BLE Security Event base. */
70 #define BLE_L2CAP_EVT_BASE 0x0800 /**< BLE L2CAP Event base. */
71 /** @} */
72 /** @} */
73
74 /**
75 * @defgroup BLE_EVENT_ENUM Enumerations
76 * @{
77 */
78 /**
79 * @brief BLE Common Events.
80 */
81 enum BLE_COMMON_EVTS
82 {
83 BLE_COMMON_EVT_STACK_INIT = BLE_COMMON_EVT_BASE, /**< BLE Stack init complete event. */
84 BLE_COMMON_EVT_MAX,
85 };
86
87 /**@brief BLE GAP Managerment Events. */
88 enum BLE_GAPM_EVTS
89 {
90 BLE_GAPM_EVT_CH_MAP_SET = BLE_GAPM_EVT_BASE, /**< Channel Map Set complete event. */
91 BLE_GAPM_EVT_WHITELIST_SET, /**< Whitelist Set complete event. */
92 BLE_GAPM_EVT_PER_ADV_LIST_SET, /**< Periodic Advertising List Set complete event. */
93 BLE_GAPM_EVT_PRIVACY_MODE_SET, /**< Privacy Mode for Peer Device Set complete event. */
94 BLE_GAPM_EVT_LEPSM_REGISTER, /**< LEPSM Register complete event. */
95 BLE_GAPM_EVT_LEPSM_UNREGISTER, /**< LEPSM Unregister complete event. */
96 BLE_GAPM_EVT_DEV_INFO_GOT, /**< Device Info Get event. */
97 BLE_GAPM_EVT_ADV_START, /**< Advertising Start complete event. */
98 BLE_GAPM_EVT_ADV_STOP, /**< Advertising Stop complete event. */
99 BLE_GAPM_EVT_SCAN_REQUEST, /**< Scan Request event. */
100 BLE_GAPM_EVT_ADV_DATA_UPDATE, /**< Advertising Data update event. */
101 BLE_GAPM_EVT_SCAN_START, /**< Scan Start complete event. */
102 BLE_GAPM_EVT_SCAN_STOP, /**< Scan Stop complete event. */
103 BLE_GAPM_EVT_ADV_REPORT, /**< Advertising Report event. */
104 BLE_GAPM_EVT_SYNC_ESTABLISH, /**< Periodic Advertising Synchronization Establish event. */
105 BLE_GAPM_EVT_SYNC_STOP, /**< Periodic Advertising Synchronization Stop event. */
106 BLE_GAPM_EVT_SYNC_LOST, /**< Periodic Advertising Synchronization Lost event. */
107 BLE_GAPM_EVT_READ_RSLV_ADDR, /**< Read Resolvable Address event. */
108 BLE_GAPM_EVT_RSLV_ADDR_REPORT, /**< Resolvable Address report event. */
109 BLE_GAPM_EVT_MAX,
110 };
111
112 /**@brief BLE GAP Connection Control Events. */
113 enum BLE_GAPC_EVTS
114 {
115 BLE_GAPC_EVT_PHY_UPDATED = BLE_GAPC_EVT_BASE, /**< PHY Update event. */
116 BLE_GAPC_EVT_CONNECTED, /**< Connected event. */
117 BLE_GAPC_EVT_DISCONNECTED, /**< Disconnected event. */
118 BLE_GAPC_EVT_CONNECT_CANCLE, /**< Connect Cancle event. */
119 BLE_GAPC_EVT_AUTO_CONN_TIMEOUT, /**< Auto Connect Timeout event. */
120 BLE_GAPC_EVT_CONN_PARAM_UPDATED, /**< Connect Parameter Updated event. */
121 BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ, /**< Connect Parameter Request event. */
122 BLE_GAPC_EVT_PEER_NAME_GOT, /**< peer Name Get event. */
123 BLE_GAPC_EVT_CONN_INFO_GOT, /**< Connect Info Get event. */
124 BLE_GAPC_EVT_PEER_INFO_GOT, /**< Peer Info Get event. */
125 BLE_GAPC_EVT_DATA_LENGTH_UPDATED, /**< Data Length Updated event. */
126 BLE_GAPC_EVT_DEV_INFO_SET, /**< Device Info Set event. */
127 BLE_GAPC_EVT_CONNECT_IQ_REPORT, /**< Connection IQ Report info event. */
128 BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT, /**< Connectionless IQ Report info event. */
129 BLE_GAPC_EVT_LOCAL_TX_POWER_READ, /**< Local transmit power read indication info event. */
130 BLE_GAPC_EVT_REMOTE_TX_POWER_READ, /**< Remote transmit power read indication info event. */
131 BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT, /**< Transmit power change reporting info event. */
132 BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT, /**< Path loss threshold reporting info event. */
133 BLE_GAPC_EVT_RANGING_IND, /**< Ranging indication event. */
134 BLE_GAPC_EVT_RANGING_SAMPLE_REPORT, /**< Ranging sample report event. */
135 BLE_GAPC_EVT_RANGING_CMP_IND, /**< Ranging complete indication event. */
136 BLE_GAPC_EVT_DFT_SUBRATE_SET, /**< Default subrate param set complete event. */
137 BLE_GAPC_EVT_SUBRATE_CHANGE_IND, /**< Subrate change indication event. */
138 BLE_GAPC_EVT_MAX,
139 };
140
141 /**@brief BLE GATT Common Events. */
142 enum
143 {
144 BLE_GATT_COMMON_EVT_MTU_EXCHANGE = BLE_GATT_COMMON_EVT_BASE, /**< MTU Exchange event. */
145 BLE_GATT_COMMON_EVT_PRF_REGISTER, /**< Service Register event. */
146 BLE_GATT_COMMON_EVT_MAX,
147 };
148
149 /**@brief BLE GATTS Events. */
150 enum BLE_GATTS_EVTS
151 {
152 BLE_GATTS_EVT_READ_REQUEST = BLE_GATTS_EVT_BASE, /**< GATTS Read Request event .*/
153 BLE_GATTS_EVT_WRITE_REQUEST, /**< GATTS Write Request event .*/
154 BLE_GATTS_EVT_PREP_WRITE_REQUEST, /**< GATTS Prepare Write Request event .*/
155 BLE_GATTS_EVT_NTF_IND, /**< GATTS Notify or Indicate Complete event .*/
156 BLE_GATTS_EVT_CCCD_RECOVERY, /**< GATTS CCCD Recovery event .*/
157 BLE_GATTS_EVT_MULT_NTF, /**< GATTS Multiple Notifications event .*/
158 BLE_GATTS_EVT_ENH_READ_REQUEST, /**< GATTS Enhance Read Request event .*/
159 BLE_GATTS_EVT_ENH_WRITE_REQUEST, /**< GATTS Enhance Write Request event .*/
160 BLE_GATTS_EVT_ENH_PREP_WRITE_REQUEST, /**< GATTS Enhance Prepare Write Request event .*/
161 BLE_GATTS_EVT_ENH_NTF_IND, /**< GATTS Enhance Notify or Indicate Complete event .*/
162 BLE_GATTS_EVT_ENH_CCCD_RECOVERY, /**< GATTS Enhance CCCD Recovery event .*/
163 BLE_GATTS_EVT_ENH_MULT_NTF, /**< GATTS Enhance Multiple Notifications event .*/
164 BLE_GATTS_EVT_DATABASE_INITED_IND,
165 BLE_GATTS_EVT_MAX,
166 };
167
168 /**@brief BLE GATTC Events. */
169 enum BLE_GATTC_EVTS
170 {
171 BLE_GATTC_EVT_SRVC_BROWSE = BLE_GATTC_EVT_BASE, /**< GATTC Service Browse event .*/
172 BLE_GATTC_EVT_PRIMARY_SRVC_DISC, /**< GATTC Primary Service Discovery event .*/
173 BLE_GATTC_EVT_INCLUDE_SRVC_DISC, /**< GATTC Include Service Discovery event .*/
174 BLE_GATTC_EVT_CHAR_DISC, /**< GATTC Characteristic Discovery event .*/
175 BLE_GATTC_EVT_CHAR_DESC_DISC, /**< GATTC Characteristic Descriptor Discovery event .*/
176 BLE_GATTC_EVT_READ_RSP, /**< GATTC Read Response event. */
177 BLE_GATTC_EVT_WRITE_RSP, /**< GATTC Write Response event. */
178 BLE_GATTC_EVT_NTF_IND, /**< GATTC Notify or Indicate Receive event. */
179 BLE_GATTC_EVT_CACHE_UPDATE, /**< GATTC Cache Update event. */
180 BLE_GATTC_EVT_ENH_SRVC_BROWSE, /**< GATTC Service Browse event .*/
181 BLE_GATTC_EVT_ENH_PRIMARY_SRVC_DISC, /**< GATTC Primary Service Discovery event .*/
182 BLE_GATTC_EVT_ENH_INCLUDE_SRVC_DISC, /**< GATTC Include Service Discovery event .*/
183 BLE_GATTC_EVT_ENH_CHAR_DISC, /**< GATTC Characteristic Discovery event .*/
184 BLE_GATTC_EVT_ENH_CHAR_DESC_DISC, /**< GATTC Characteristic Descriptor Discovery event .*/
185 BLE_GATTC_EVT_ENH_READ_RSP, /**< GATTC Read Response event. */
186 BLE_GATTC_EVT_ENH_WRITE_RSP, /**< GATTC Write Response event. */
187 BLE_GATTC_EVT_ENH_NTF_IND, /**< GATTC Notify or Indicate Receive event. */
188 BLE_GATTC_EVT_MAX,
189 };
190
191 /**@brief BLE SEC Events. */
192 enum BLE_SEC_EVTS
193 {
194 BLE_SEC_EVT_LINK_ENC_REQUEST = BLE_SEC_EVT_BASE, /**< Link Encrypte Request event. */
195 BLE_SEC_EVT_LINK_ENCRYPTED, /**< Link Encrypted event. */
196 BLE_SEC_EVT_KEY_PRESS_NTF, /**< Key Press event. */
197 BLE_SEC_EVT_KEY_MISSING, /**< Key Missing event. */
198 BLE_SEC_EVT_MAX,
199 };
200
201 /**@brief BLE L2CAP Events. */
202 enum BLE_L2CAP_EVTS
203 {
204 BLE_L2CAP_EVT_CONN_REQ = BLE_L2CAP_EVT_BASE, /**< L2cap Connect Request event. */
205 BLE_L2CAP_EVT_CONN_IND, /**< L2cap Connected Indicate event. */
206 BLE_L2CAP_EVT_ADD_CREDITS_IND, /**< L2cap Credits Add Indicate event. */
207 BLE_L2CAP_EVT_DISCONNECTED, /**< L2cap Disconnected event. */
208 BLE_L2CAP_EVT_SDU_RECV, /**< L2cap SDU Receive event. */
209 BLE_L2CAP_EVT_SDU_SEND, /**< L2cap SDU Send event. */
210 BLE_L2CAP_EVT_ADD_CREDITS_CPLT, /**< L2cap Credits Add Completed event. */
211 BLE_L2CAP_EVT_ENH_CONN_REQ, /**< L2cap Enhanced Connect Request event. */
212 BLE_L2CAP_EVT_ENH_CONN_IND, /**< L2cap Enhanced Connected Indicate event. */
213 BLE_L2CAP_EVT_ENH_RECONFIG_CPLT, /**< L2cap Enhanced Reconfig Completed event. */
214 BLE_L2CAP_EVT_ENH_RECONFIG_IND, /**< L2cap Enhanced Reconfig Indicate event. */
215 BLE_L2CAP_EVT_MAX,
216 };
217 /** @} */
218
219 /** @addtogroup BLE_COMMEN_STRUCTURES Structures
220 * @{
221 */
222 /**@brief BLE Event Information. */
223 typedef struct
224 {
225 uint16_t evt_id; /**< Event ID. */
226 uint16_t evt_status; /**< Event Status. */
227 union
228 {
229 ble_gapm_evt_t gapm_evt; /**< BLE GAP Management Event. */
230 ble_gapc_evt_t gapc_evt; /**< BLE GAP Connection Control Event. */
231 ble_gatts_evt_t gatts_evt; /**< BLE GATT Server Event. */
232 ble_gattc_evt_t gattc_evt; /**< BLE GATT Client Event. */
233 ble_gatt_common_evt_t gatt_common_evt; /**< BLE GATT Common Event. */
234 ble_sec_evt_t sec_evt; /**< BLE Security Event. */
235 ble_l2cap_evt_t l2cap_evt; /**< BLE L2CAP Event. */
236 } evt; /**< BLE Event parameter. */
237 } ble_evt_t;
238 /** @} */
239
240 /** @addtogroup BLE_EVENT_TYPEDEF Typedefs
241 * @{
242 */
243 /**@brief The BLE event handler type. */
244 typedef void (*ble_evt_handler_t)(const ble_evt_t *p_evt);
245 /** @} */
246
247 #endif
248 /** @} */
249 /** @} */
250
251
252
253
BLE_GAPM_EVT_PRIVACY_MODE_SET
@ BLE_GAPM_EVT_PRIVACY_MODE_SET
Privacy Mode for Peer Device Set complete event.
Definition: ble_event.h:93
BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT
@ BLE_GAPC_EVT_PATH_LOSS_THRESHOLD_REPORT
Path loss threshold reporting info event.
Definition: ble_event.h:132
BLE_GAPM_EVTS
BLE_GAPM_EVTS
BLE GAP Managerment Events.
Definition: ble_event.h:89
BLE_GAPM_EVT_SCAN_REQUEST
@ BLE_GAPM_EVT_SCAN_REQUEST
Scan Request event.
Definition: ble_event.h:99
BLE_GATTC_EVT_READ_RSP
@ BLE_GATTC_EVT_READ_RSP
GATTC Read Response event.
Definition: ble_event.h:176
BLE_GAPM_EVT_ADV_START
@ BLE_GAPM_EVT_ADV_START
Advertising Start complete event.
Definition: ble_event.h:97
BLE_GAPM_EVT_BASE
#define BLE_GAPM_EVT_BASE
BLE GAP Management Event base.
Definition: ble_event.h:64
BLE_GATTC_EVT_MAX
@ BLE_GATTC_EVT_MAX
Definition: ble_event.h:188
BLE_GAPM_EVT_ADV_STOP
@ BLE_GAPM_EVT_ADV_STOP
Advertising Stop complete event.
Definition: ble_event.h:98
BLE_GATTC_EVT_ENH_NTF_IND
@ BLE_GATTC_EVT_ENH_NTF_IND
GATTC Notify or Indicate Receive event.
Definition: ble_event.h:187
BLE_GATTC_EVT_ENH_CHAR_DESC_DISC
@ BLE_GATTC_EVT_ENH_CHAR_DESC_DISC
GATTC Characteristic Descriptor Discovery event .
Definition: ble_event.h:184
BLE_GATTS_EVT_PREP_WRITE_REQUEST
@ BLE_GATTS_EVT_PREP_WRITE_REQUEST
GATTS Prepare Write Request event .
Definition: ble_event.h:154
BLE_SEC_EVT_MAX
@ BLE_SEC_EVT_MAX
Definition: ble_event.h:198
BLE_GAPC_EVT_CONN_INFO_GOT
@ BLE_GAPC_EVT_CONN_INFO_GOT
Connect Info Get event.
Definition: ble_event.h:123
BLE_GATTC_EVT_WRITE_RSP
@ BLE_GATTC_EVT_WRITE_RSP
GATTC Write Response event.
Definition: ble_event.h:177
BLE_SEC_EVT_BASE
#define BLE_SEC_EVT_BASE
BLE Security Event base.
Definition: ble_event.h:69
BLE_GAPM_EVT_ADV_REPORT
@ BLE_GAPM_EVT_ADV_REPORT
Advertising Report event.
Definition: ble_event.h:103
BLE_GAPM_EVT_RSLV_ADDR_REPORT
@ BLE_GAPM_EVT_RSLV_ADDR_REPORT
Resolvable Address report event.
Definition: ble_event.h:108
BLE_GATTC_EVT_NTF_IND
@ BLE_GATTC_EVT_NTF_IND
GATTC Notify or Indicate Receive event.
Definition: ble_event.h:178
ble_evt_t::l2cap_evt
ble_l2cap_evt_t l2cap_evt
BLE L2CAP Event.
Definition: ble_event.h:235
BLE_GAPC_EVT_DISCONNECTED
@ BLE_GAPC_EVT_DISCONNECTED
Disconnected event.
Definition: ble_event.h:117
BLE_L2CAP_EVT_CONN_REQ
@ BLE_L2CAP_EVT_CONN_REQ
L2cap Connect Request event.
Definition: ble_event.h:204
BLE_GATTS_EVT_ENH_CCCD_RECOVERY
@ BLE_GATTS_EVT_ENH_CCCD_RECOVERY
GATTS Enhance CCCD Recovery event .
Definition: ble_event.h:162
ble_evt_t::evt_status
uint16_t evt_status
Event Status.
Definition: ble_event.h:226
BLE_L2CAP_EVT_BASE
#define BLE_L2CAP_EVT_BASE
BLE L2CAP Event base.
Definition: ble_event.h:70
BLE_GAPC_EVT_RANGING_SAMPLE_REPORT
@ BLE_GAPC_EVT_RANGING_SAMPLE_REPORT
Ranging sample report event.
Definition: ble_event.h:134
ble_evt_t::gatts_evt
ble_gatts_evt_t gatts_evt
BLE GATT Server Event.
Definition: ble_event.h:231
ble_gatts.h
BLE GATTS API.
BLE_L2CAP_EVT_ENH_RECONFIG_IND
@ BLE_L2CAP_EVT_ENH_RECONFIG_IND
L2cap Enhanced Reconfig Indicate event.
Definition: ble_event.h:214
ble_l2cap_evt_t
BLE L2CAP event structure.
Definition: ble_l2cap.h:272
BLE_GATTS_EVT_ENH_PREP_WRITE_REQUEST
@ BLE_GATTS_EVT_ENH_PREP_WRITE_REQUEST
GATTS Enhance Prepare Write Request event .
Definition: ble_event.h:160
BLE_GAPM_EVT_MAX
@ BLE_GAPM_EVT_MAX
Definition: ble_event.h:109
BLE_GATTS_EVT_WRITE_REQUEST
@ BLE_GATTS_EVT_WRITE_REQUEST
GATTS Write Request event .
Definition: ble_event.h:153
ble_evt_t::sec_evt
ble_sec_evt_t sec_evt
BLE Security Event.
Definition: ble_event.h:234
BLE_GAPC_EVT_SUBRATE_CHANGE_IND
@ BLE_GAPC_EVT_SUBRATE_CHANGE_IND
Subrate change indication event.
Definition: ble_event.h:137
BLE_GAPC_EVT_DEV_INFO_SET
@ BLE_GAPC_EVT_DEV_INFO_SET
Device Info Set event.
Definition: ble_event.h:126
BLE_GAPC_EVT_CONN_PARAM_UPDATED
@ BLE_GAPC_EVT_CONN_PARAM_UPDATED
Connect Parameter Updated event.
Definition: ble_event.h:120
BLE_SEC_EVT_LINK_ENCRYPTED
@ BLE_SEC_EVT_LINK_ENCRYPTED
Link Encrypted event.
Definition: ble_event.h:195
BLE_GATTS_EVT_NTF_IND
@ BLE_GATTS_EVT_NTF_IND
GATTS Notify or Indicate Complete event .
Definition: ble_event.h:155
BLE_GAPC_EVT_CONNECTED
@ BLE_GAPC_EVT_CONNECTED
Connected event.
Definition: ble_event.h:116
BLE_L2CAP_EVT_ADD_CREDITS_CPLT
@ BLE_L2CAP_EVT_ADD_CREDITS_CPLT
L2cap Credits Add Completed event.
Definition: ble_event.h:210
ble_l2cap.h
BLE L2CAP API.
BLE_L2CAP_EVTS
BLE_L2CAP_EVTS
BLE L2CAP Events.
Definition: ble_event.h:203
BLE_GAPM_EVT_SYNC_STOP
@ BLE_GAPM_EVT_SYNC_STOP
Periodic Advertising Synchronization Stop event.
Definition: ble_event.h:105
BLE_GAPM_EVT_PER_ADV_LIST_SET
@ BLE_GAPM_EVT_PER_ADV_LIST_SET
Periodic Advertising List Set complete event.
Definition: ble_event.h:92
BLE_GATT_COMMON_EVT_BASE
#define BLE_GATT_COMMON_EVT_BASE
BLE GATT Event base.
Definition: ble_event.h:68
BLE_GATTC_EVT_CACHE_UPDATE
@ BLE_GATTC_EVT_CACHE_UPDATE
GATTC Cache Update event.
Definition: ble_event.h:179
BLE_GAPC_EVT_DFT_SUBRATE_SET
@ BLE_GAPC_EVT_DFT_SUBRATE_SET
Default subrate param set complete event.
Definition: ble_event.h:136
BLE_GAPC_EVT_BASE
#define BLE_GAPC_EVT_BASE
BLE GAP Connection Control Event base.
Definition: ble_event.h:65
BLE_GAPC_EVT_PEER_INFO_GOT
@ BLE_GAPC_EVT_PEER_INFO_GOT
Peer Info Get event.
Definition: ble_event.h:124
BLE_GATT_COMMON_EVT_PRF_REGISTER
@ BLE_GATT_COMMON_EVT_PRF_REGISTER
Service Register event.
Definition: ble_event.h:145
BLE_GATTS_EVT_MAX
@ BLE_GATTS_EVT_MAX
Definition: ble_event.h:165
ble_gapm_evt_t
BLE GAPM event structure.
Definition: ble_gapm.h:933
ble_sec.h
BLE SEC API.
BLE_GAPC_EVT_REMOTE_TX_POWER_READ
@ BLE_GAPC_EVT_REMOTE_TX_POWER_READ
Remote transmit power read indication info event.
Definition: ble_event.h:130
BLE_GATTC_EVTS
BLE_GATTC_EVTS
BLE GATTC Events.
Definition: ble_event.h:170
BLE_GATTS_EVT_ENH_READ_REQUEST
@ BLE_GATTS_EVT_ENH_READ_REQUEST
GATTS Enhance Read Request event .
Definition: ble_event.h:158
BLE_GAPM_EVT_LEPSM_UNREGISTER
@ BLE_GAPM_EVT_LEPSM_UNREGISTER
LEPSM Unregister complete event.
Definition: ble_event.h:95
BLE_COMMON_EVT_MAX
@ BLE_COMMON_EVT_MAX
Definition: ble_event.h:84
BLE_SEC_EVT_KEY_MISSING
@ BLE_SEC_EVT_KEY_MISSING
Key Missing event.
Definition: ble_event.h:197
ble_gapc.h
BLE GAPC API.
BLE_GATTC_EVT_ENH_SRVC_BROWSE
@ BLE_GATTC_EVT_ENH_SRVC_BROWSE
GATTC Service Browse event .
Definition: ble_event.h:180
BLE_L2CAP_EVT_SDU_RECV
@ BLE_L2CAP_EVT_SDU_RECV
L2cap SDU Receive event.
Definition: ble_event.h:208
BLE_L2CAP_EVT_MAX
@ BLE_L2CAP_EVT_MAX
Definition: ble_event.h:215
BLE_GATTS_EVT_CCCD_RECOVERY
@ BLE_GATTS_EVT_CCCD_RECOVERY
GATTS CCCD Recovery event .
Definition: ble_event.h:156
BLE_GATTC_EVT_ENH_CHAR_DISC
@ BLE_GATTC_EVT_ENH_CHAR_DISC
GATTC Characteristic Discovery event .
Definition: ble_event.h:183
BLE_GATTS_EVT_ENH_WRITE_REQUEST
@ BLE_GATTS_EVT_ENH_WRITE_REQUEST
GATTS Enhance Write Request event .
Definition: ble_event.h:159
BLE_COMMON_EVTS
BLE_COMMON_EVTS
BLE Common Events.
Definition: ble_event.h:82
BLE_GAPM_EVT_WHITELIST_SET
@ BLE_GAPM_EVT_WHITELIST_SET
Whitelist Set complete event.
Definition: ble_event.h:91
BLE_GATTS_EVT_BASE
#define BLE_GATTS_EVT_BASE
BLE GATTS Event base.
Definition: ble_event.h:66
BLE_GAPM_EVT_DEV_INFO_GOT
@ BLE_GAPM_EVT_DEV_INFO_GOT
Device Info Get event.
Definition: ble_event.h:96
BLE_COMMON_EVT_STACK_INIT
@ BLE_COMMON_EVT_STACK_INIT
BLE Stack init complete event.
Definition: ble_event.h:83
BLE_GAPM_EVT_SYNC_ESTABLISH
@ BLE_GAPM_EVT_SYNC_ESTABLISH
Periodic Advertising Synchronization Establish event.
Definition: ble_event.h:104
BLE_GAPC_EVT_LOCAL_TX_POWER_READ
@ BLE_GAPC_EVT_LOCAL_TX_POWER_READ
Local transmit power read indication info event.
Definition: ble_event.h:129
BLE_GAPC_EVTS
BLE_GAPC_EVTS
BLE GAP Connection Control Events.
Definition: ble_event.h:114
BLE_GATTC_EVT_CHAR_DESC_DISC
@ BLE_GATTC_EVT_CHAR_DESC_DISC
GATTC Characteristic Descriptor Discovery event .
Definition: ble_event.h:175
BLE_GATTC_EVT_PRIMARY_SRVC_DISC
@ BLE_GATTC_EVT_PRIMARY_SRVC_DISC
GATTC Primary Service Discovery event .
Definition: ble_event.h:172
BLE_GATTS_EVT_DATABASE_INITED_IND
@ BLE_GATTS_EVT_DATABASE_INITED_IND
Definition: ble_event.h:164
BLE_L2CAP_EVT_ADD_CREDITS_IND
@ BLE_L2CAP_EVT_ADD_CREDITS_IND
L2cap Credits Add Indicate event.
Definition: ble_event.h:206
BLE_SEC_EVTS
BLE_SEC_EVTS
BLE SEC Events.
Definition: ble_event.h:193
BLE_COMMON_EVT_BASE
#define BLE_COMMON_EVT_BASE
BLE Common Event base.
Definition: ble_event.h:63
BLE_GATT_COMMON_EVT_MTU_EXCHANGE
@ BLE_GATT_COMMON_EVT_MTU_EXCHANGE
MTU Exchange event.
Definition: ble_event.h:144
BLE_GAPC_EVT_CONNECT_IQ_REPORT
@ BLE_GAPC_EVT_CONNECT_IQ_REPORT
Connection IQ Report info event.
Definition: ble_event.h:127
ble_evt_t::gapc_evt
ble_gapc_evt_t gapc_evt
BLE GAP Connection Control Event.
Definition: ble_event.h:230
BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ
@ BLE_GAPC_EVT_CONN_PARAM_UPDATE_REQ
Connect Parameter Request event.
Definition: ble_event.h:121
BLE_GAPM_EVT_ADV_DATA_UPDATE
@ BLE_GAPM_EVT_ADV_DATA_UPDATE
Advertising Data update event.
Definition: ble_event.h:100
BLE_L2CAP_EVT_SDU_SEND
@ BLE_L2CAP_EVT_SDU_SEND
L2cap SDU Send event.
Definition: ble_event.h:209
BLE_GATTS_EVTS
BLE_GATTS_EVTS
BLE GATTS Events.
Definition: ble_event.h:151
BLE_GAPM_EVT_SCAN_START
@ BLE_GAPM_EVT_SCAN_START
Scan Start complete event.
Definition: ble_event.h:101
ble_gapc_evt_t
BLE GAPC event structure.
Definition: ble_gapc.h:902
BLE_GATTC_EVT_BASE
#define BLE_GATTC_EVT_BASE
BLE GATTC Event base.
Definition: ble_event.h:67
BLE_GATTS_EVT_ENH_MULT_NTF
@ BLE_GATTS_EVT_ENH_MULT_NTF
GATTS Enhance Multiple Notifications event .
Definition: ble_event.h:163
BLE_GATTC_EVT_CHAR_DISC
@ BLE_GATTC_EVT_CHAR_DISC
GATTC Characteristic Discovery event .
Definition: ble_event.h:174
BLE_GATTC_EVT_ENH_INCLUDE_SRVC_DISC
@ BLE_GATTC_EVT_ENH_INCLUDE_SRVC_DISC
GATTC Include Service Discovery event .
Definition: ble_event.h:182
ble_gatts_evt_t
BLE GATTS event structure.
Definition: ble_gatts.h:471
ble_gapm.h
BLE GAPM API.
BLE_GATTS_EVT_ENH_NTF_IND
@ BLE_GATTS_EVT_ENH_NTF_IND
GATTS Enhance Notify or Indicate Complete event .
Definition: ble_event.h:161
BLE_GATTS_EVT_MULT_NTF
@ BLE_GATTS_EVT_MULT_NTF
GATTS Multiple Notifications event .
Definition: ble_event.h:157
BLE_GATT_COMMON_EVT_MAX
@ BLE_GATT_COMMON_EVT_MAX
Definition: ble_event.h:146
BLE_SEC_EVT_KEY_PRESS_NTF
@ BLE_SEC_EVT_KEY_PRESS_NTF
Key Press event.
Definition: ble_event.h:196
BLE_GATTC_EVT_INCLUDE_SRVC_DISC
@ BLE_GATTC_EVT_INCLUDE_SRVC_DISC
GATTC Include Service Discovery event .
Definition: ble_event.h:173
BLE_GATTC_EVT_SRVC_BROWSE
@ BLE_GATTC_EVT_SRVC_BROWSE
GATTC Service Browse event .
Definition: ble_event.h:171
ble_gatt_common_evt_t
GATT Common structure.
Definition: ble_gatt.h:104
BLE_L2CAP_EVT_CONN_IND
@ BLE_L2CAP_EVT_CONN_IND
L2cap Connected Indicate event.
Definition: ble_event.h:205
BLE_GATTC_EVT_ENH_READ_RSP
@ BLE_GATTC_EVT_ENH_READ_RSP
GATTC Read Response event.
Definition: ble_event.h:185
BLE_SEC_EVT_LINK_ENC_REQUEST
@ BLE_SEC_EVT_LINK_ENC_REQUEST
Link Encrypte Request event.
Definition: ble_event.h:194
BLE_GAPC_EVT_PHY_UPDATED
@ BLE_GAPC_EVT_PHY_UPDATED
PHY Update event.
Definition: ble_event.h:115
ble_evt_handler_t
void(* ble_evt_handler_t)(const ble_evt_t *p_evt)
The BLE event handler type.
Definition: ble_event.h:244
BLE_GAPC_EVT_CONNECT_CANCLE
@ BLE_GAPC_EVT_CONNECT_CANCLE
Connect Cancle event.
Definition: ble_event.h:118
BLE_GAPC_EVT_MAX
@ BLE_GAPC_EVT_MAX
Definition: ble_event.h:138
ble_evt_t
BLE Event Information.
Definition: ble_event.h:224
ble_gattc.h
BLE GATTC API.
BLE_GAPC_EVT_RANGING_IND
@ BLE_GAPC_EVT_RANGING_IND
Ranging indication event.
Definition: ble_event.h:133
BLE_GAPC_EVT_RANGING_CMP_IND
@ BLE_GAPC_EVT_RANGING_CMP_IND
Ranging complete indication event.
Definition: ble_event.h:135
BLE_L2CAP_EVT_ENH_CONN_IND
@ BLE_L2CAP_EVT_ENH_CONN_IND
L2cap Enhanced Connected Indicate event.
Definition: ble_event.h:212
BLE_GAPC_EVT_AUTO_CONN_TIMEOUT
@ BLE_GAPC_EVT_AUTO_CONN_TIMEOUT
Auto Connect Timeout event.
Definition: ble_event.h:119
BLE_GAPM_EVT_SCAN_STOP
@ BLE_GAPM_EVT_SCAN_STOP
Scan Stop complete event.
Definition: ble_event.h:102
ble_evt_t::gattc_evt
ble_gattc_evt_t gattc_evt
BLE GATT Client Event.
Definition: ble_event.h:232
BLE_GATTS_EVT_READ_REQUEST
@ BLE_GATTS_EVT_READ_REQUEST
GATTS Read Request event .
Definition: ble_event.h:152
ble_evt_t::gapm_evt
ble_gapm_evt_t gapm_evt
BLE GAP Management Event.
Definition: ble_event.h:229
BLE_GAPM_EVT_READ_RSLV_ADDR
@ BLE_GAPM_EVT_READ_RSLV_ADDR
Read Resolvable Address event.
Definition: ble_event.h:107
BLE_GAPM_EVT_CH_MAP_SET
@ BLE_GAPM_EVT_CH_MAP_SET
Channel Map Set complete event.
Definition: ble_event.h:90
BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT
@ BLE_GAPC_EVT_CONNECTLESS_IQ_REPORT
Connectionless IQ Report info event.
Definition: ble_event.h:128
BLE_L2CAP_EVT_ENH_CONN_REQ
@ BLE_L2CAP_EVT_ENH_CONN_REQ
L2cap Enhanced Connect Request event.
Definition: ble_event.h:211
BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT
@ BLE_GAPC_EVT_TX_POWER_CHANGE_REPORT
Transmit power change reporting info event.
Definition: ble_event.h:131
BLE_L2CAP_EVT_ENH_RECONFIG_CPLT
@ BLE_L2CAP_EVT_ENH_RECONFIG_CPLT
L2cap Enhanced Reconfig Completed event.
Definition: ble_event.h:213
ble_sec_evt_t
BLE Security event structure.
Definition: ble_sec.h:227
BLE_GATTC_EVT_ENH_WRITE_RSP
@ BLE_GATTC_EVT_ENH_WRITE_RSP
GATTC Write Response event.
Definition: ble_event.h:186
BLE_GAPC_EVT_PEER_NAME_GOT
@ BLE_GAPC_EVT_PEER_NAME_GOT
peer Name Get event.
Definition: ble_event.h:122
BLE_GATTC_EVT_ENH_PRIMARY_SRVC_DISC
@ BLE_GATTC_EVT_ENH_PRIMARY_SRVC_DISC
GATTC Primary Service Discovery event .
Definition: ble_event.h:181
BLE_L2CAP_EVT_DISCONNECTED
@ BLE_L2CAP_EVT_DISCONNECTED
L2cap Disconnected event.
Definition: ble_event.h:207
BLE_GAPC_EVT_DATA_LENGTH_UPDATED
@ BLE_GAPC_EVT_DATA_LENGTH_UPDATED
Data Length Updated event.
Definition: ble_event.h:125
BLE_GAPM_EVT_LEPSM_REGISTER
@ BLE_GAPM_EVT_LEPSM_REGISTER
LEPSM Register complete event.
Definition: ble_event.h:94
BLE_GAPM_EVT_SYNC_LOST
@ BLE_GAPM_EVT_SYNC_LOST
Periodic Advertising Synchronization Lost event.
Definition: ble_event.h:106
ble_evt_t::gatt_common_evt
ble_gatt_common_evt_t gatt_common_evt
BLE GATT Common Event.
Definition: ble_event.h:233
ble_evt_t::evt_id
uint16_t evt_id
Event ID.
Definition: ble_event.h:225
ble_gattc_evt_t
BLE GATTC event structure.
Definition: ble_gattc.h:390