xref: /btstack/src/btstack_defines.h (revision d4d8445570fbeab6a48c397749444927f1b272ee)
1 /*
2  * Copyright (C) 2015 BlueKitchen GmbH
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holders nor the names of
14  *    contributors may be used to endorse or promote products derived
15  *    from this software without specific prior written permission.
16  * 4. Any redistribution, use, or modification is done solely for
17  *    personal benefit and not for any commercial purpose or for
18  *    monetary gain.
19  *
20  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  * Please inquire about commercial licensing options at
34  * [email protected]
35  *
36  */
37 
38 /*
39  * btstack-defines.h
40  *
41  * BTstack definitions, events, and error codes */
42 
43 #ifndef __BTSTACK_DEFINES_H
44 #define __BTSTACK_DEFINES_H
45 
46 #include <stdint.h>
47 #include "btstack_linked_list.h"
48 
49 
50 // UNUSED macro
51 #define UNUSED(x) (void)(sizeof(x))
52 
53 // TYPES
54 
55 // packet handler
56 typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
57 
58 // packet callback supporting multiple registrations
59 typedef struct {
60     btstack_linked_item_t    item;
61     btstack_packet_handler_t callback;
62 } btstack_packet_callback_registration_t;
63 
64 // context callback supporting multiple registrations
65 typedef struct {
66   btstack_linked_item_t * item;
67   void (*callback)(void * context);
68   void * context;
69 } btstack_context_callback_registration_t;
70 
71 /**
72  * @brief 128 bit key used with AES128 in Security Manager
73  */
74 typedef uint8_t sm_key_t[16];
75 
76 // DEFINES
77 
78 // hci con handles (12 bit): 0x0000..0x0fff
79 #define HCI_CON_HANDLE_INVALID 0xffff
80 
81 
82 #define DAEMON_EVENT_PACKET     0x05
83 
84 // L2CAP data
85 #define L2CAP_DATA_PACKET       0x06
86 
87 // RFCOMM data
88 #define RFCOMM_DATA_PACKET      0x07
89 
90 // Attribute protocol data
91 #define ATT_DATA_PACKET         0x08
92 
93 // Security Manager protocol data
94 #define SM_DATA_PACKET          0x09
95 
96 // SDP query result - only used by daemon
97 // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k)
98 #define SDP_CLIENT_PACKET       0x0a
99 
100 // BNEP data
101 #define BNEP_DATA_PACKET        0x0b
102 
103 // Unicast Connectionless Data
104 #define UCD_DATA_PACKET         0x0c
105 
106 // GOEP data
107 #define GOEP_DATA_PACKET        0x0d
108 
109 // PBAP data
110 #define PBAP_DATA_PACKET        0x0e
111 
112 // debug log messages
113 #define LOG_MESSAGE_PACKET      0xfc
114 
115 
116 // ERRORS
117 
118 // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors
119 #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED              0x50
120 #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH         0x51
121 #define BTSTACK_ACTIVATION_POWERON_FAILED                  0x52
122 #define BTSTACK_ACTIVATION_FAILED_UNKNOWN                  0x53
123 #define BTSTACK_NOT_ACTIVATED                              0x54
124 #define BTSTACK_BUSY                                       0x55
125 #define BTSTACK_MEMORY_ALLOC_FAILED                        0x56
126 #define BTSTACK_ACL_BUFFERS_FULL                           0x57
127 
128 // l2cap errors - enumeration by the command that created them
129 #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60
130 #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61
131 #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62
132 
133 #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL        0x63
134 #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING           0x64
135 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM       0x65
136 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY  0x66
137 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67
138 #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT       0x68
139 
140 #define L2CAP_SERVICE_ALREADY_REGISTERED                   0x69
141 #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU                  0x6A
142 #define L2CAP_SERVICE_DOES_NOT_EXIST                       0x6B
143 #define L2CAP_LOCAL_CID_DOES_NOT_EXIST                     0x6C
144 
145 #define RFCOMM_MULTIPLEXER_STOPPED                         0x70
146 #define RFCOMM_CHANNEL_ALREADY_REGISTERED                  0x71
147 #define RFCOMM_NO_OUTGOING_CREDITS                         0x72
148 #define RFCOMM_AGGREGATE_FLOW_OFF                          0x73
149 #define RFCOMM_DATA_LEN_EXCEEDS_MTU                        0x74
150 
151 #define SDP_HANDLE_ALREADY_REGISTERED                      0x80
152 #define SDP_QUERY_INCOMPLETE                               0x81
153 #define SDP_SERVICE_NOT_FOUND                              0x82
154 #define SDP_HANDLE_INVALID                                 0x83
155 #define SDP_QUERY_BUSY                                     0x84
156 
157 #define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS            0x90
158 #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT                0x91
159 
160 #define GATT_CLIENT_NOT_CONNECTED                          0x93
161 #define GATT_CLIENT_BUSY                                   0x94
162 #define GATT_CLIENT_IN_WRONG_STATE                         0x95
163 #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96
164 #define GATT_CLIENT_VALUE_TOO_LONG                         0x97
165 #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98
166 #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED   0x99
167 
168 #define BNEP_SERVICE_ALREADY_REGISTERED                    0xA0
169 #define BNEP_CHANNEL_NOT_CONNECTED                         0xA1
170 #define BNEP_DATA_LEN_EXCEEDS_MTU                          0xA2
171 
172 // DAEMON COMMANDS
173 
174 #define OGF_BTSTACK 0x3d
175 
176 // cmds for BTstack
177 // get state: @returns HCI_STATE
178 #define BTSTACK_GET_STATE                                  0x01
179 
180 // set power mode: param HCI_POWER_MODE
181 #define BTSTACK_SET_POWER_MODE                             0x02
182 
183 // set capture mode: param on
184 #define BTSTACK_SET_ACL_CAPTURE_MODE                       0x03
185 
186 // get BTstack version
187 #define BTSTACK_GET_VERSION                                0x04
188 
189 // get system Bluetooth state
190 #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED               0x05
191 
192 // set system Bluetooth state
193 #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED               0x06
194 
195 // enable inquiry scan for this client
196 #define BTSTACK_SET_DISCOVERABLE                           0x07
197 
198 // set global Bluetooth state
199 #define BTSTACK_SET_BLUETOOTH_ENABLED                      0x08
200 
201 // create l2cap channel: param bd_addr(48), psm (16)
202 #define L2CAP_CREATE_CHANNEL                               0x20
203 
204 // disconnect l2cap disconnect, param channel(16), reason(8)
205 #define L2CAP_DISCONNECT                                   0x21
206 
207 // register l2cap service: param psm(16), mtu (16)
208 #define L2CAP_REGISTER_SERVICE                             0x22
209 
210 // unregister l2cap disconnect, param psm(16)
211 #define L2CAP_UNREGISTER_SERVICE                           0x23
212 
213 // accept connection param bd_addr(48), dest cid (16)
214 #define L2CAP_ACCEPT_CONNECTION                            0x24
215 
216 // decline l2cap disconnect,param bd_addr(48), dest cid (16), reason(8)
217 #define L2CAP_DECLINE_CONNECTION                           0x25
218 
219 // create l2cap channel: param bd_addr(48), psm (16), mtu (16)
220 #define L2CAP_CREATE_CHANNEL_MTU                           0x26
221 
222 // register SDP Service Record: service record (size)
223 #define SDP_REGISTER_SERVICE_RECORD                        0x30
224 
225 // unregister SDP Service Record
226 #define SDP_UNREGISTER_SERVICE_RECORD                      0x31
227 
228 // Get remote RFCOMM services
229 #define SDP_CLIENT_QUERY_RFCOMM_SERVICES                   0x32
230 
231 // Get remote SDP services
232 #define SDP_CLIENT_QUERY_SERVICES                          0x33
233 
234 // RFCOMM "HCI" Commands
235 #define RFCOMM_CREATE_CHANNEL       0x40
236 #define RFCOMM_DISCONNECT     0x41
237 #define RFCOMM_REGISTER_SERVICE     0x42
238 #define RFCOMM_UNREGISTER_SERVICE   0x43
239 #define RFCOMM_ACCEPT_CONNECTION    0x44
240 #define RFCOMM_DECLINE_CONNECTION   0x45
241 #define RFCOMM_PERSISTENT_CHANNEL   0x46
242 #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS   0x47
243 #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48
244 #define RFCOMM_GRANT_CREDITS                 0x49
245 
246 // GAP Classic 0x50
247 #define GAP_DISCONNECT              0x50
248 
249 // GAP LE      0x60
250 #define GAP_LE_SCAN_START           0x60
251 #define GAP_LE_SCAN_STOP            0x61
252 #define GAP_LE_CONNECT              0x62
253 #define GAP_LE_CONNECT_CANCEL       0x63
254 #define GAP_LE_SET_SCAN_PARAMETERS  0x64
255 
256 // GATT (Client) 0x70
257 #define GATT_DISCOVER_ALL_PRIMARY_SERVICES                       0x70
258 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16                 0x71
259 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128                0x72
260 #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE                  0x73
261 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE                0x74
262 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128     0x75
263 #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS                 0x76
264 #define GATT_READ_VALUE_OF_CHARACTERISTIC                        0x77
265 #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC                   0x78
266 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE      0x79
267 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC                       0x7A
268 #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC                  0x7B
269 #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC         0x7C
270 #define GATT_READ_CHARACTERISTIC_DESCRIPTOR                      0X7D
271 #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR                 0X7E
272 #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR                     0X7F
273 #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR                0X80
274 #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION           0X81
275 #define GATT_GET_MTU                                             0x82
276 
277 // OBEX ERRORS
278 #define OBEX_UNKNOWN_ERROR       0x90
279 #define OBEX_CONNECT_FAILED      0x91
280 #define OBEX_DISCONNECTED        0x92
281 #define OBEX_NOT_FOUND           0x93
282 
283 // EVENTS
284 
285 /**
286  * @format 1
287  * @param state
288  */
289 #define BTSTACK_EVENT_STATE                                0x60
290 
291 /**
292  * @format 1
293  * @param number_connections
294  */
295 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED               0x61
296 
297 /**
298  * @format
299  */
300 #define BTSTACK_EVENT_POWERON_FAILED                       0x62
301 
302 /**
303  * @format 1
304  * @param discoverable
305  */
306 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED                 0x66
307 
308 // Daemon Events
309 
310 /**
311  * @format 112
312  * @param major
313  * @param minor
314  @ @param revision
315  */
316 #define DAEMON_EVENT_VERSION                               0x63
317 
318 // data: system bluetooth on/off (bool)
319 /**
320  * @format 1
321  * param system_bluetooth_enabled
322  */
323 #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED              0x64
324 
325 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes)
326 
327 /*
328  * @format 1BT
329  * @param status == 0 to match read_remote_name_request
330  * @param address
331  * @param name
332  */
333 #define DAEMON_EVENT_REMOTE_NAME_CACHED                    0x65
334 
335 // internal - data: event(8)
336 #define DAEMON_EVENT_CONNECTION_OPENED                     0x67
337 
338 // internal - data: event(8)
339 #define DAEMON_EVENT_CONNECTION_CLOSED                     0x68
340 
341 // data: event(8), len(8), local_cid(16), credits(8)
342 #define DAEMON_EVENT_L2CAP_CREDITS                         0x74
343 
344 /**
345  * @format 12
346  * @param status
347  * @param psm
348  */
349 #define DAEMON_EVENT_L2CAP_SERVICE_REGISTERED              0x75
350 
351 /**
352  * @format 21
353  * @param rfcomm_cid
354  * @param credits
355  */
356 #define DAEMON_EVENT_RFCOMM_CREDITS                        0x84
357 
358 /**
359  * @format 11
360  * @param status
361  * @param channel_id
362  */
363 #define DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED             0x85
364 
365 /**
366  * @format 11
367  * @param status
368  * @param server_channel_id
369  */
370 #define DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL             0x86
371 
372 /**
373   * @format 14
374   * @param status
375   * @param service_record_handle
376   */
377 #define DAEMON_EVENT_SDP_SERVICE_REGISTERED                0x90
378 
379 
380 
381 // additional HCI events
382 
383 /**
384  * @brief Indicates HCI transport enters/exits Sleep mode
385  * @format 1
386  * @param active
387  */
388 #define HCI_EVENT_TRANSPORT_SLEEP_MODE                     0x69
389 
390 /**
391  * @brief Outgoing packet
392  */
393 #define HCI_EVENT_TRANSPORT_PACKET_SENT                    0x6E
394 
395 /**
396  * @format B
397  * @param handle
398  */
399 #define HCI_EVENT_SCO_CAN_SEND_NOW                         0x6F
400 
401 
402 // L2CAP EVENTS
403 
404 /**
405  * @format 1BH2222221
406  * @param status
407  * @param address
408  * @param handle
409  * @param psm
410  * @param local_cid
411  * @param remote_cid
412  * @param local_mtu
413  * @param remote_mtu
414  * @param flush_timeout
415  * @param incoming
416  */
417 #define L2CAP_EVENT_CHANNEL_OPENED                         0x70
418 
419 /*
420  * @format 2
421  * @param local_cid
422  */
423 #define L2CAP_EVENT_CHANNEL_CLOSED                         0x71
424 
425 /**
426  * @format BH222
427  * @param address
428  * @param handle
429  * @param psm
430  * @param local_cid
431  * @param remote_cid
432  */
433 #define L2CAP_EVENT_INCOMING_CONNECTION                    0x72
434 
435 // ??
436 // data: event(8), len(8), handle(16)
437 #define L2CAP_EVENT_TIMEOUT_CHECK                          0x73
438 
439 /**
440  * @format H2222
441  * @param handle
442  * @param interval_min
443  * @param interval_max
444  * @param latencey
445  * @param timeout_multiplier
446  */
447 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST    0x76
448 
449 // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail)
450  /**
451   * @format H2
452   * @param handle
453   * @param result
454   */
455 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE   0x77
456 
457 /**
458  * @format 2
459  * @param local_cid
460  */
461 #define L2CAP_EVENT_CAN_SEND_NOW                           0x78
462 
463 // LE Data Channels
464 
465 /**
466  * @format 1BH2222
467  * @param address_type
468  * @param address
469  * @param handle
470  * @param psm
471  * @param local_cid
472  * @param remote_cid
473  * @param remote_mtu
474  */
475 #define L2CAP_EVENT_LE_INCOMING_CONNECTION                 0x79
476 
477 /**
478  * @format 11BH122222
479  * @param status
480  * @param address_type
481  * @param address
482  * @param handle
483  * @param incoming
484  * @param psm
485  * @param local_cid
486  * @param remote_cid
487  * @param local_mtu
488  * @param remote_mtu
489  */
490 #define L2CAP_EVENT_LE_CHANNEL_OPENED                      0x7a
491 
492 /*
493  * @format 2
494  * @param local_cid
495  */
496 #define L2CAP_EVENT_LE_CHANNEL_CLOSED                      0x7b
497 
498 /*
499  * @format 2
500  * @param local_cid
501  */
502 #define L2CAP_EVENT_LE_CAN_SEND_NOW                        0x7c
503 
504 /*
505  * @format 2
506  * @param local_cid
507  */
508 #define L2CAP_EVENT_LE_PACKET_SENT                         0x7d
509 
510 
511 // RFCOMM EVENTS
512 
513 /**
514  * @format 1B21221
515  * @param status
516  * @param bd_addr
517  * @param con_handle
518  * @param server_channel
519  * @param rfcomm_cid
520  * @param max_frame_size
521  * @param incoming
522  */
523 #define RFCOMM_EVENT_CHANNEL_OPENED                        0x80
524 
525 /**
526  * @format 2
527  * @param rfcomm_cid
528  */
529 #define RFCOMM_EVENT_CHANNEL_CLOSED                        0x81
530 
531 /**
532  * @format B12
533  * @param bd_addr
534  * @param server_channel
535  * @param rfcomm_cid
536  */
537 #define RFCOMM_EVENT_INCOMING_CONNECTION                   0x82
538 
539 /**
540  * @format 21
541  * @param rfcomm_cid
542  * @param line_status
543  */
544 #define RFCOMM_EVENT_REMOTE_LINE_STATUS                    0x83
545 
546 /**
547  * @format 21
548  * @param rfcomm_cid
549  * @param modem_status
550  */
551 #define RFCOMM_EVENT_REMOTE_MODEM_STATUS                   0x87
552 
553  /**
554   * TODO: format for variable data 2?
555   * param rfcomm_cid
556   * param rpn_data
557   */
558 #define RFCOMM_EVENT_PORT_CONFIGURATION                    0x88
559 
560 /**
561  * @format 2
562  * @param rfcomm_cid
563  */
564 #define RFCOMM_EVENT_CAN_SEND_NOW                          0x89
565 
566 
567 /**
568  * @format 1
569  * @param status
570  */
571 #define SDP_EVENT_QUERY_COMPLETE                                 0x91
572 
573 /**
574  * @format 1T
575  * @param rfcomm_channel
576  * @param name
577  */
578 #define SDP_EVENT_QUERY_RFCOMM_SERVICE                           0x92
579 
580 /**
581  * @format 22221
582  * @param record_id
583  * @param attribute_id
584  * @param attribute_length
585  * @param data_offset
586  * @param data
587  */
588 #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE                           0x93
589 
590 /**
591  * @format 22LV
592  * @param record_id
593  * @param attribute_id
594  * @param attribute_length
595  * @param attribute_value
596  */
597 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE                          0x94
598 
599 /**
600  * @format 224
601  * @param total_count
602  * @param record_index
603  * @param record_handle
604  * @note Not provided by daemon, only used for internal testing
605  */
606 #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE                    0x95
607 
608 /**
609  * @format H1
610  * @param handle
611  * @param status
612  */
613 #define GATT_EVENT_QUERY_COMPLETE                                0xA0
614 
615 /**
616  * @format HX
617  * @param handle
618  * @param service
619  */
620 #define GATT_EVENT_SERVICE_QUERY_RESULT                          0xA1
621 
622 /**
623  * @format HY
624  * @param handle
625  * @param characteristic
626  */
627 #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT                   0xA2
628 
629 /**
630  * @format H2X
631  * @param handle
632  * @param include_handle
633  * @param service
634  */
635 #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT                 0xA3
636 
637 /**
638  * @format HZ
639  * @param handle
640  * @param characteristic_descriptor
641  */
642 #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT   0xA4
643 
644 /**
645  * @format H2LV
646  * @param handle
647  * @param value_handle
648  * @param value_length
649  * @param value
650  */
651 #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT             0xA5
652 
653 /**
654  * @format H22LV
655  * @param handle
656  * @param value_handle
657  * @param value_offset
658  * @param value_length
659  * @param value
660  */
661 #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT        0xA6
662 
663 /**
664  * @format H2LV
665  * @param handle
666  * @param value_handle
667  * @param value_length
668  * @param value
669  */
670 #define GATT_EVENT_NOTIFICATION                                  0xA7
671 
672 /**
673  * @format H2LV
674  * @param handle
675  * @param value_handle
676  * @param value_length
677  * @param value
678  */
679 #define GATT_EVENT_INDICATION                                    0xA8
680 
681 /**
682  * @format H2LV
683  * @param handle
684  * @param descriptor_handle
685  * @param descriptor_length
686  * @param descriptor
687  */
688 #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT        0xA9
689 
690 /**
691  * @format H2LV
692  * @param handle
693  * @param descriptor_offset
694  * @param descriptor_length
695  * @param descriptor
696  */
697 #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT   0xAA
698 
699 /**
700  * @format H2
701  * @param handle
702  * @param MTU
703  */
704 #define GATT_EVENT_MTU                                           0xAB
705 
706 /**
707  * @format H2
708  * @param handle
709  * @param MTU
710  */
711 #define ATT_EVENT_MTU_EXCHANGE_COMPLETE                          0xB5
712 
713  /**
714   * @format 1H2
715   * @param status
716   * @param conn_handle
717   * @param attribute_handle
718   */
719 #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE               0xB6
720 
721 /**
722  * @format
723  */
724 #define ATT_EVENT_CAN_SEND_NOW                                   0xB7
725 
726 // TODO: daemon only event
727 
728 /**
729  * @format 12
730  * @param status
731  * @param service_uuid
732  */
733  #define BNEP_EVENT_SERVICE_REGISTERED                      0xC0
734 
735 /**
736  * @format 12222B
737  * @param status
738  * @param bnep_cid
739  * @param source_uuid
740  * @param destination_uuid
741  * @param mtu
742  * @param remote_address
743  */
744  #define BNEP_EVENT_CHANNEL_OPENED                   0xC1
745 
746 /**
747  * @format 222B
748  * @param bnep_cid
749  * @param source_uuid
750  * @param destination_uuid
751  * @param remote_address
752  */
753  #define BNEP_EVENT_CHANNEL_CLOSED                          0xC2
754 
755 /**
756  * @format 222B1
757  * @param bnep_cid
758  * @param source_uuid
759  * @param destination_uuid
760  * @param remote_address
761  * @param channel_state
762  */
763 #define BNEP_EVENT_CHANNEL_TIMEOUT                         0xC3
764 
765 /**
766  * @format 222B
767  * @param bnep_cid
768  * @param source_uuid
769  * @param destination_uuid
770  * @param remote_address
771  */
772  #define BNEP_EVENT_CAN_SEND_NOW                           0xC4
773 
774  /**
775   * @format H1B
776   * @param handle
777   * @param addr_type
778   * @param address
779   */
780 #define SM_EVENT_JUST_WORKS_REQUEST                              0xD0
781 
782  /**
783   * @format H1B
784   * @param handle
785   * @param addr_type
786   * @param address
787   */
788 #define SM_EVENT_JUST_WORKS_CANCEL                               0xD1
789 
790  /**
791   * @format H1B4
792   * @param handle
793   * @param addr_type
794   * @param address
795   * @param passkey
796   */
797 #define SM_EVENT_PASSKEY_DISPLAY_NUMBER                          0xD2
798 
799  /**
800   * @format H1B
801   * @param handle
802   * @param addr_type
803   * @param address
804   */
805 #define SM_EVENT_PASSKEY_DISPLAY_CANCEL                          0xD3
806 
807  /**
808   * @format H1B
809   * @param handle
810   * @param addr_type
811   * @param address
812   */
813 #define SM_EVENT_PASSKEY_INPUT_NUMBER                            0xD4
814 
815  /**
816   * @format H1B
817   * @param handle
818   * @param addr_type
819   * @param address
820   */
821 #define SM_EVENT_PASSKEY_INPUT_CANCEL                            0xD5
822 
823  /**
824   * @format H1B4
825   * @param handle
826   * @param addr_type
827   * @param address
828   * @param passkey
829   */
830 #define SM_EVENT_NUMERIC_COMPARISON_REQUEST                      0xD6
831 
832  /**
833   * @format H1B
834   * @param handle
835   * @param addr_type
836   * @param address
837   */
838 #define SM_EVENT_NUMERIC_COMPARISON_CANCEL                       0xD7
839 
840  /**
841   * @format H1B
842   * @param handle
843   * @param addr_type
844   * @param address
845   */
846 #define SM_EVENT_IDENTITY_RESOLVING_STARTED                      0xD8
847 
848  /**
849   * @format H1B
850   * @param handle
851   * @param addr_type
852   * @param address
853   */
854 #define SM_EVENT_IDENTITY_RESOLVING_FAILED                       0xD9
855 
856  /**
857   * @brief Identify resolving succeeded
858   *
859   * @format H1B1B2
860   * @param handle
861   * @param addr_type
862   * @param address
863   * @param identity_addr_type
864   * @param identity_address
865   * @param index_internal
866   *
867   */
868 #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED                    0xDA
869 
870  /**
871   * @format H1B
872   * @param handle
873   * @param addr_type
874   * @param address
875   */
876 #define SM_EVENT_AUTHORIZATION_REQUEST                           0xDB
877 
878  /**
879   * @format H1B1
880   * @param handle
881   * @param addr_type
882   * @param address
883   * @param authorization_result
884   */
885 #define SM_EVENT_AUTHORIZATION_RESULT                            0xDC
886 
887  /**
888   * @format H1
889   * @param handle
890   * @param action see SM_KEYPRESS_*
891   */
892 #define SM_EVENT_KEYPRESS_NOTIFICATION                           0xDD
893 
894  /**
895   * @brief Emitted during pairing to inform app about address used as identity
896   *
897   * @format H1B1B
898   * @param handle
899   * @param addr_type
900   * @param address
901   * @param identity_addr_type
902   * @param identity_address
903   */
904 #define SM_EVENT_IDENTITY_CREATED                                0xDE
905 
906 // GAP
907 
908 /**
909  * @format H1
910  * @param handle
911  * @param security_level
912  */
913 #define GAP_EVENT_SECURITY_LEVEL                                 0xE0
914 
915 /**
916  * @format 1B
917  * @param status
918  * @param address
919  */
920 #define GAP_EVENT_DEDICATED_BONDING_COMPLETED                    0xE1
921 
922 /**
923  * @format 11B1JV
924  * @param advertising_event_type
925  * @param address_type
926  * @param address
927  * @param rssi
928  * @param data_length
929  * @param data
930  */
931 #define GAP_EVENT_ADVERTISING_REPORT                          0xE2
932 
933 
934 // Meta Events, see below for sub events
935 #define HCI_EVENT_HSP_META                                 0xE8
936 #define HCI_EVENT_HFP_META                                 0xE9
937 #define HCI_EVENT_ANCS_META                                0xEA
938 #define HCI_EVENT_AVDTP_META                               0xEB
939 #define HCI_EVENT_AVRCP_META                               0xEC
940 #define HCI_EVENT_GOEP_META                                0xED
941 #define HCI_EVENT_PBAP_META                                0xEE
942 #define HCI_EVENT_HID_META                                 0xEF
943 
944 // Potential other meta groups
945  // #define HCI_EVENT_BNEP_META                                0xxx
946 // #define HCI_EVENT_GAP_META                                 0xxx
947 // #define HCI_EVENT_GATT_META                                0xxx
948 // #define HCI_EVENT_PAN_META                                 0xxx
949 // #define HCI_EVENT_SDP_META                                 0xxx
950 // #define HCI_EVENT_SM_META                                  0xxx
951 
952 
953 /** HSP Subevent */
954 
955 /**
956  * @format 11
957  * @param subevent_code
958  * @param status 0 == OK
959  */
960 #define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE             0x01
961 
962 /**
963  * @format 11
964  * @param subevent_code
965  * @param status 0 == OK
966  */
967 #define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE           0x02
968 
969 
970 /**
971  * @format 11H
972  * @param subevent_code
973  * @param status 0 == OK
974  * @param handle
975  */
976 #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE             0x03
977 
978 /**
979  * @format 11
980  * @param subevent_code
981  * @param status 0 == OK
982  */
983 #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE          0x04
984 
985 /**
986  * @format 1
987  * @param subevent_code
988  */
989 #define HSP_SUBEVENT_RING                                  0x05
990 
991 /**
992  * @format 11
993  * @param subevent_code
994  * @param gain Valid range: [0,15]
995  */
996 #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED               0x06
997 
998 /**
999  * @format 11
1000  * @param subevent_code
1001  * @param gain Valid range: [0,15]
1002  */
1003 #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED                  0x07
1004 
1005 /**
1006  * @format 1JV
1007  * @param subevent_code
1008  * @param value_length
1009  * @param value
1010  */
1011 #define HSP_SUBEVENT_HS_COMMAND                            0x08
1012 
1013 /**
1014  * @format 1JV
1015  * @param subevent_code
1016  * @param value_length
1017  * @param value
1018  */
1019 #define HSP_SUBEVENT_AG_INDICATION                         0x09
1020 
1021 
1022 /** HFP Subevent */
1023 
1024 /**
1025  * @format 11HB
1026  * @param subevent_code
1027  * @param status 0 == OK
1028  * @param con_handle
1029  * @param bd_addr
1030  */
1031 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED  0x01
1032 
1033 /**
1034  * @format 1
1035  * @param subevent_code
1036  */
1037 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED     0x02
1038 
1039 /**
1040  * @format 11HB1
1041  * @param subevent_code
1042  * @param status 0 == OK
1043  * @param handle
1044  * @param bd_addr
1045  * @param negotiated_codec
1046  */
1047 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED          0x03
1048 
1049 /**
1050  * @format 1
1051  * @param subevent_code
1052  */
1053 #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED             0x04
1054 
1055 /**
1056  * @format 11
1057  * @param subevent_code
1058  * @param status 0 == OK
1059  */
1060 #define HFP_SUBEVENT_COMPLETE                              0x05
1061 
1062 /**
1063  * @format 111T
1064  * @param subevent_code
1065  * @param indicator_index
1066  * @param indicator_status
1067  * @param indicator_name
1068  */
1069 #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED           0x06
1070 
1071 /**
1072  * @format 111T
1073  * @param subevent_code
1074  * @param network_operator_mode
1075  * @param network_operator_format
1076  * @param network_operator_name
1077  */
1078 #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED              0x07
1079 
1080 /**
1081  * @format 11
1082  * @param subevent_code
1083  * @param error
1084  */
1085 #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR             0x08
1086 
1087 /**
1088  * @format 1
1089  * @param subevent_code
1090  */
1091 #define HFP_SUBEVENT_START_RINGINIG                           0x0A
1092 
1093 /**
1094  * @format 1
1095  * @param subevent_code
1096  */
1097 #define HFP_SUBEVENT_STOP_RINGINIG                            0x0B
1098 
1099 /**
1100  * @format 1
1101  * @param subevent_code
1102  */
1103 #define HFP_SUBEVENT_CALL_TERMINATED                          0x0C
1104 
1105 /**
1106  * @format 1T
1107  * @param subevent_code
1108  * @param number
1109  */
1110 #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER                   0x0D
1111 
1112 /**
1113  * @format 1
1114  * @param subevent_code
1115  */
1116 #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG               0x0E
1117 
1118 /**
1119  * @format 1T
1120  * @param subevent_code
1121  * @param number
1122  */
1123 #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG                     0x0F
1124 
1125 /**
1126  * @format 1T
1127  * @param subevent_code
1128  * @param dtmf code
1129  */
1130 #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES                      0x10
1131 
1132 /**
1133  * @format 1
1134  * @param subevent_code
1135  */
1136  #define HFP_SUBEVENT_CALL_ANSWERED                            0x11
1137 
1138 /**
1139  * @format 1
1140  * @param subevent_code
1141  */
1142 #define HFP_SUBEVENT_CONFERENCE_CALL                          0x12
1143 
1144 /**
1145  * @format 1
1146  * @param subevent_code
1147  */
1148 #define HFP_SUBEVENT_RING                                     0x13
1149 
1150 /**
1151  * @format 111
1152  * @param subevent_code
1153  * @param status
1154  * @param gain
1155  */
1156  #define HFP_SUBEVENT_SPEAKER_VOLUME                           0x14
1157 
1158 /**
1159  * @format 111
1160  * @param subevent_code
1161  * @param status
1162  * @param gain
1163  */
1164 #define HFP_SUBEVENT_MICROPHONE_VOLUME                        0x15
1165 
1166 /**
1167  * @format 11T
1168  * @param subevent_code
1169  * @param type
1170  * @param number
1171  */
1172 #define HFP_SUBEVENT_CALL_WAITING_NOTIFICATION                0x16
1173 
1174 /**
1175  * @format 11T
1176  * @param subevent_code
1177  * @param type
1178  * @param number
1179  */
1180 #define HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION 0x17
1181 
1182 /**
1183  * @format 111111T
1184  * @param subevent_code
1185  * @param clcc_idx
1186  * @param clcc_dir
1187  * @param clcc_status
1188  * @param clcc_mpty
1189  * @param bnip_type
1190  * @param bnip_number
1191  */
1192 #define HFP_SUBEVENT_ENHANCED_CALL_STATUS                     0x18
1193 
1194 /**
1195  * @format 111T
1196  * @param subevent_code
1197  * @param status
1198  * @param bnip_type
1199  * @param bnip_number
1200  */
1201  #define HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION            0x19
1202 
1203 /**
1204  * @format 1T
1205  * @param subevent_code
1206  * @param value
1207  */
1208 #define HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS                 0x1A
1209 
1210 // ANCS Client
1211 
1212 /**
1213  * @format 1H
1214  * @param subevent_code
1215  * @param handle
1216  */
1217 #define ANCS_SUBEVENT_CLIENT_CONNECTED                              0xF0
1218 
1219 /**
1220  * @format 1H2T
1221  * @param subevent_code
1222  * @param handle
1223  * @param attribute_id
1224  * @param text
1225  */
1226 #define ANCS_SUBEVENT_CLIENT_NOTIFICATION                           0xF1
1227 
1228 /**
1229  * @format 1H
1230  * @param subevent_code
1231  * @param handle
1232  */
1233 #define ANCS_SUBEVENT_CLIENT_DISCONNECTED                           0xF2
1234 
1235 
1236 /** AVDTP Subevent */
1237 
1238 /**
1239  * @format 1H11
1240  * @param subevent_code
1241  * @param con_handle
1242  * @param signal_identifier
1243  * @param status 0 == OK
1244  */
1245 #define AVDTP_SUBEVENT_SIGNALING_ACCEPT                     0x01
1246 
1247 /**
1248  * @format 1H1
1249  * @param subevent_code
1250  * @param con_handle
1251  * @param signal_identifier
1252  */
1253 #define AVDTP_SUBEVENT_SIGNALING_REJECT                     0x02
1254 
1255 /**
1256  * @format 1H1
1257  * @param subevent_code
1258  * @param con_handle
1259  * @param signal_identifier
1260  */
1261 #define AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT             0x03
1262 
1263 /**
1264  * @format 1HB1
1265  * @param subevent_code
1266  * @param con_handle
1267  * @param bd_addr
1268  * @param status 0 == OK
1269  */
1270 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED     0x04
1271 
1272 /**
1273  * @format 1H
1274  * @param subevent_code
1275  * @param con_handle
1276  */
1277 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED        0x05
1278 
1279 /**
1280  * @format 1H1111
1281  * @param subevent_code
1282  * @param handle
1283  * @param seid        0x01 – 0x3E
1284  * @param in_use      0-not in use, 1-in use
1285  * @param media_type  0-audio, 1-video, 2-multimedia
1286  * @param sep_type    0-source, 1-sink
1287  */
1288 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND                  0x06
1289 
1290 /**
1291  * @format 1H11111111
1292  * @param subevent_code
1293  * @param con_handle
1294  * @param media_type
1295  * @param sampling_frequency_bitmap
1296  * @param channel_mode_bitmap
1297  * @param block_length_bitmap
1298  * @param subbands_bitmap
1299  * @param allocation_method_bitmap
1300  * @param min_bitpool_value
1301  * @param max_bitpool_value
1302  */
1303 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY          0x07
1304 
1305 /**
1306  * @format 1H12LV
1307  * @param subevent_code
1308  * @param con_handle
1309  * @param media_type
1310  * @param media_codec_type
1311  * @param media_codec_information_len
1312  * @param media_codec_information
1313  */
1314 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY        0x08
1315 
1316 /**
1317  * @format 1H1121111111
1318  * @param subevent_code
1319  * @param con_handle
1320  * @param reconfigure
1321  * @param media_type
1322  * @param sampling_frequency
1323  * @param channel_mode
1324  * @param num_channels
1325  * @param block_length
1326  * @param subbands
1327  * @param allocation_method
1328  * @param min_bitpool_value
1329  * @param max_bitpool_value
1330  */
1331 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION        0x09
1332 
1333 /**
1334  * @format 1H112LV
1335  * @param subevent_code
1336  * @param con_handle
1337  * @param reconfigure
1338  * @param media_type
1339  * @param media_codec_type
1340  * @param media_codec_information_len
1341  * @param media_codec_information
1342  */
1343 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION        0x0A
1344 
1345 /**
1346  * @format 1H1
1347  * @param subevent_code
1348  * @param con_handle
1349  * @param status 0 == OK
1350  */
1351 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED     0x0B
1352 
1353 /**
1354  * @format 1H
1355  * @param subevent_code
1356  * @param con_handle
1357  */
1358 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED        0x0C
1359 
1360 
1361 
1362 /** AVRCP Subevent */
1363 
1364 /**
1365  * @format 1H12B
1366  * @param subevent_code
1367  * @param con_handle
1368  * @param status 0 == OK
1369  * @param local_cid
1370  * @param bd_addr
1371  */
1372 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED                           0x01
1373 
1374 /**
1375  * @format 1H
1376  * @param subevent_code
1377  * @param con_handle
1378  */
1379 #define AVRCP_SUBEVENT_CONNECTION_RELEASED                              0x02
1380 
1381 /**
1382  * @format 1H1114JVJVJVJV
1383  * @param subevent_code
1384  * @param con_handle
1385  * @param status
1386  * @param track
1387  * @param total_tracks
1388  * @param song_length in ms
1389  * @param title_len
1390  * @param title
1391  * @param artist_len
1392  * @param artist
1393  * @param album_len
1394  * @param album
1395  * @param genre_len
1396  * @param genre
1397  */
1398 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO                                 0x03
1399 
1400 /**
1401  * @format 1H111
1402  * @param subevent_code
1403  * @param con_handle
1404  * @param status
1405  * @param repeat_mode
1406  * @param shuffle_mode
1407  */
1408 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE                          0x04
1409 
1410 /**
1411  * @format 1H1441
1412  * @param subevent_code
1413  * @param con_handle
1414  * @param status
1415  * @param song_length
1416  * @param song_position
1417  * @param play_status
1418  */
1419  #define AVRCP_SUBEVENT_PLAY_STATUS                                     0x05
1420 
1421 /**
1422  * @format 1H11
1423  * @param subevent_code
1424  * @param con_handle
1425  * @param status
1426  * @param playback_status
1427  */
1428 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED             0x06
1429 
1430 /**
1431  * @format 1H11
1432  * @param subevent_code
1433  * @param con_handle
1434  * @param status
1435  * @param track_status
1436  */
1437 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED                       0x07
1438 
1439 /**
1440  * @format 1H1
1441  * @param subevent_code
1442  * @param con_handle
1443  * @param status
1444  */
1445 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED          0x08
1446 
1447 /**
1448  * @format 1H1
1449  * @param subevent_code
1450  * @param con_handle
1451  * @param status
1452  */
1453 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED            0x09
1454 
1455 /**
1456  * @format 1H11
1457  * @param subevent_code
1458  * @param con_handle
1459  * @param status
1460  * @param absolute_volume
1461  */
1462 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED                       0x0A
1463 
1464 /**
1465  * @format 1H11
1466  * @param subevent_code
1467  * @param con_handle
1468  * @param status
1469  * @param absolute_volume
1470  */
1471 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE                      0x0B
1472 
1473 /**
1474  * @format 1H11
1475  * @param subevent_code
1476  * @param con_handle
1477  * @param status
1478  * @param notification_id
1479  */
1480 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE                       0x0C
1481 
1482 /**
1483  * @format 1H11
1484  * @param subevent_code
1485  * @param con_handle
1486  * @param status
1487  * @param operation_id
1488  */
1489 #define AVRCP_SUBEVENT_OPERATION_START                                    0x0D
1490 
1491 /**
1492  * @format 1H11
1493  * @param subevent_code
1494  * @param con_handle
1495  * @param status
1496  * @param operation_id
1497  */
1498 #define AVRCP_SUBEVENT_OPERATION_COMPLETE                                 0x0E
1499 
1500 /**
1501  * @format 1H1
1502  * @param subevent_code
1503  * @param con_handle
1504  * @param status
1505  */
1506 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE                   0x0F
1507 
1508 /**
1509  * @format 121BH1
1510  * @param subevent_code
1511  * @param goep_cid
1512  * @param status
1513  * @param bd_addr
1514  * @param con_handle
1515  * @param incoming
1516  */
1517 #define GOEP_SUBEVENT_CONNECTION_OPENED                                    0x01
1518 
1519 /**
1520  * @format 12
1521  * @param subevent_code
1522  * @param goep_cid
1523 */
1524 #define GOEP_SUBEVENT_CONNECTION_CLOSED                                    0x02
1525 
1526 /**
1527  * @format 12
1528  * @param subevent_code
1529  * @param goep_cid
1530 */
1531 #define GOEP_SUBEVENT_CAN_SEND_NOW                                         0x03
1532 
1533 /**
1534  * @format 121BH1
1535  * @param subevent_code
1536  * @param pbap_cid
1537  * @param status
1538  * @param bd_addr
1539  * @param con_handle
1540  * @param incoming
1541  */
1542 #define PBAP_SUBEVENT_CONNECTION_OPENED                                    0x01
1543 
1544 /**
1545  * @format 12
1546  * @param subevent_code
1547  * @param goep_cid
1548 */
1549 #define PBAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
1550 
1551 /**
1552  * @format 121
1553  * @param subevent_code
1554  * @param goep_cid
1555  * @param status
1556  */
1557 #define PBAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
1558 
1559 /**
1560  * @format 121BH1
1561  * @param subevent_code
1562  * @param hid_cid
1563  * @param status
1564  * @param bd_addr
1565  * @param con_handle
1566  * @param incoming
1567  */
1568 #define HID_SUBEVENT_CONNECTION_OPENED                                     0x01
1569 
1570 /**
1571  * @format 12
1572  * @param subevent_code
1573  * @param hid_cid
1574 */
1575 #define HID_SUBEVENT_CONNECTION_CLOSED                                     0x02
1576 
1577 /**
1578  * @format 12
1579  * @param subevent_code
1580  * @param hid_cid
1581 */
1582 #define HID_SUBEVENT_CAN_SEND_NOW                                          0x03
1583 
1584 #endif
1585