xref: /btstack/src/btstack_event.h (revision 5d5a5a9cd577b3803f660dd06fd1c51bf52da6c9)
1 /*
2  * Copyright (C) 2016 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 /*
40  *  btstack_event.h
41  *
42  *  @brief BTstack event getter/setter
43  *  @note  Don't edit - generated by tool/btstack_event_generator.py
44  *
45  */
46 
47 #ifndef __BTSTACK_EVENT_H
48 #define __BTSTACK_EVENT_H
49 
50 #if defined __cplusplus
51 extern "C" {
52 #endif
53 
54 #include "btstack_util.h"
55 #include <stdint.h>
56 
57 #ifdef ENABLE_BLE
58 #include "ble/gatt_client.h"
59 #endif
60 
61 /* API_START */
62 
63 /**
64  * @brief Get event type
65  * @param event
66  * @return type of event
67  */
68 static inline uint8_t hci_event_packet_get_type(const uint8_t * event){
69     return event[0];
70 }
71 
72 /***
73  * @brief Get subevent code for hsp event
74  * @param event packet
75  * @return subevent_code
76  */
77 static inline uint8_t hci_event_hsp_meta_get_subevent_code(const uint8_t * event){
78     return event[2];
79 }
80 /***
81  * @brief Get subevent code for hfp event
82  * @param event packet
83  * @return subevent_code
84  */
85 static inline uint8_t hci_event_hfp_meta_get_subevent_code(const uint8_t * event){
86     return event[2];
87 }
88 /***
89  * @brief Get subevent code for ancs event
90  * @param event packet
91  * @return subevent_code
92  */
93 static inline uint8_t hci_event_ancs_meta_get_subevent_code(const uint8_t * event){
94     return event[2];
95 }
96 /***
97  * @brief Get subevent code for le event
98  * @param event packet
99  * @return subevent_code
100  */
101 static inline uint8_t hci_event_le_meta_get_subevent_code(const uint8_t * event){
102     return event[2];
103 }
104 /**
105  * @brief Get field status from event HCI_EVENT_INQUIRY_COMPLETE
106  * @param event packet
107  * @return status
108  * @note: btstack_type 1
109  */
110 static inline uint8_t hci_event_inquiry_complete_get_status(const uint8_t * event){
111     return event[2];
112 }
113 
114 /**
115  * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT
116  * @param event packet
117  * @return num_responses
118  * @note: btstack_type 1
119  */
120 static inline uint8_t hci_event_inquiry_result_get_num_responses(const uint8_t * event){
121     return event[2];
122 }
123 /**
124  * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT
125  * @param event packet
126  * @param Pointer to storage for bd_addr
127  * @note: btstack_type B
128  */
129 static inline void hci_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
130     reverse_bd_addr(&event[3], bd_addr);
131 }
132 /**
133  * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT
134  * @param event packet
135  * @return page_scan_repetition_mode
136  * @note: btstack_type 1
137  */
138 static inline uint8_t hci_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){
139     return event[9];
140 }
141 /**
142  * @brief Get field reserved1 from event HCI_EVENT_INQUIRY_RESULT
143  * @param event packet
144  * @return reserved1
145  * @note: btstack_type 1
146  */
147 static inline uint8_t hci_event_inquiry_result_get_reserved1(const uint8_t * event){
148     return event[10];
149 }
150 /**
151  * @brief Get field reserved2 from event HCI_EVENT_INQUIRY_RESULT
152  * @param event packet
153  * @return reserved2
154  * @note: btstack_type 1
155  */
156 static inline uint8_t hci_event_inquiry_result_get_reserved2(const uint8_t * event){
157     return event[11];
158 }
159 /**
160  * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT
161  * @param event packet
162  * @return class_of_device
163  * @note: btstack_type 3
164  */
165 static inline uint32_t hci_event_inquiry_result_get_class_of_device(const uint8_t * event){
166     return little_endian_read_24(event, 12);
167 }
168 /**
169  * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT
170  * @param event packet
171  * @return clock_offset
172  * @note: btstack_type 2
173  */
174 static inline uint16_t hci_event_inquiry_result_get_clock_offset(const uint8_t * event){
175     return little_endian_read_16(event, 15);
176 }
177 
178 /**
179  * @brief Get field status from event HCI_EVENT_CONNECTION_COMPLETE
180  * @param event packet
181  * @return status
182  * @note: btstack_type 1
183  */
184 static inline uint8_t hci_event_connection_complete_get_status(const uint8_t * event){
185     return event[2];
186 }
187 /**
188  * @brief Get field connection_handle from event HCI_EVENT_CONNECTION_COMPLETE
189  * @param event packet
190  * @return connection_handle
191  * @note: btstack_type 2
192  */
193 static inline uint16_t hci_event_connection_complete_get_connection_handle(const uint8_t * event){
194     return little_endian_read_16(event, 3);
195 }
196 /**
197  * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_COMPLETE
198  * @param event packet
199  * @param Pointer to storage for bd_addr
200  * @note: btstack_type B
201  */
202 static inline void hci_event_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
203     reverse_bd_addr(&event[5], bd_addr);
204 }
205 /**
206  * @brief Get field link_type from event HCI_EVENT_CONNECTION_COMPLETE
207  * @param event packet
208  * @return link_type
209  * @note: btstack_type 1
210  */
211 static inline uint8_t hci_event_connection_complete_get_link_type(const uint8_t * event){
212     return event[11];
213 }
214 /**
215  * @brief Get field encryption_enabled from event HCI_EVENT_CONNECTION_COMPLETE
216  * @param event packet
217  * @return encryption_enabled
218  * @note: btstack_type 1
219  */
220 static inline uint8_t hci_event_connection_complete_get_encryption_enabled(const uint8_t * event){
221     return event[12];
222 }
223 
224 /**
225  * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_REQUEST
226  * @param event packet
227  * @param Pointer to storage for bd_addr
228  * @note: btstack_type B
229  */
230 static inline void hci_event_connection_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
231     reverse_bd_addr(&event[2], bd_addr);
232 }
233 /**
234  * @brief Get field class_of_device from event HCI_EVENT_CONNECTION_REQUEST
235  * @param event packet
236  * @return class_of_device
237  * @note: btstack_type 3
238  */
239 static inline uint32_t hci_event_connection_request_get_class_of_device(const uint8_t * event){
240     return little_endian_read_24(event, 8);
241 }
242 /**
243  * @brief Get field link_type from event HCI_EVENT_CONNECTION_REQUEST
244  * @param event packet
245  * @return link_type
246  * @note: btstack_type 1
247  */
248 static inline uint8_t hci_event_connection_request_get_link_type(const uint8_t * event){
249     return event[11];
250 }
251 
252 /**
253  * @brief Get field status from event HCI_EVENT_DISCONNECTION_COMPLETE
254  * @param event packet
255  * @return status
256  * @note: btstack_type 1
257  */
258 static inline uint8_t hci_event_disconnection_complete_get_status(const uint8_t * event){
259     return event[2];
260 }
261 /**
262  * @brief Get field connection_handle from event HCI_EVENT_DISCONNECTION_COMPLETE
263  * @param event packet
264  * @return connection_handle
265  * @note: btstack_type 2
266  */
267 static inline uint16_t hci_event_disconnection_complete_get_connection_handle(const uint8_t * event){
268     return little_endian_read_16(event, 3);
269 }
270 /**
271  * @brief Get field reason from event HCI_EVENT_DISCONNECTION_COMPLETE
272  * @param event packet
273  * @return reason
274  * @note: btstack_type 1
275  */
276 static inline uint8_t hci_event_disconnection_complete_get_reason(const uint8_t * event){
277     return event[5];
278 }
279 
280 /**
281  * @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT
282  * @param event packet
283  * @return status
284  * @note: btstack_type 1
285  */
286 static inline uint8_t hci_event_authentication_complete_event_get_status(const uint8_t * event){
287     return event[2];
288 }
289 /**
290  * @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT
291  * @param event packet
292  * @return connection_handle
293  * @note: btstack_type 2
294  */
295 static inline uint16_t hci_event_authentication_complete_event_get_connection_handle(const uint8_t * event){
296     return little_endian_read_16(event, 3);
297 }
298 
299 /**
300  * @brief Get field status from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
301  * @param event packet
302  * @return status
303  * @note: btstack_type 1
304  */
305 //  static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){
306 //      not implemented yet
307 //  }
308 /**
309  * @brief Get field bd_addr from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
310  * @param event packet
311  * @return bd_addr
312  * @note: btstack_type B
313  */
314 //  static inline bd_addr_t hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event){
315 //      not implemented yet
316 //  }
317 /**
318  * @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
319  * @param event packet
320  * @return remote_name
321  * @note: btstack_type N
322  */
323 //  static inline String hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){
324 //      not implemented yet
325 //  }
326 
327 /**
328  * @brief Get field status from event HCI_EVENT_ENCRYPTION_CHANGE
329  * @param event packet
330  * @return status
331  * @note: btstack_type 1
332  */
333 static inline uint8_t hci_event_encryption_change_get_status(const uint8_t * event){
334     return event[2];
335 }
336 /**
337  * @brief Get field connection_handle from event HCI_EVENT_ENCRYPTION_CHANGE
338  * @param event packet
339  * @return connection_handle
340  * @note: btstack_type 2
341  */
342 static inline uint16_t hci_event_encryption_change_get_connection_handle(const uint8_t * event){
343     return little_endian_read_16(event, 3);
344 }
345 /**
346  * @brief Get field encryption_enabled from event HCI_EVENT_ENCRYPTION_CHANGE
347  * @param event packet
348  * @return encryption_enabled
349  * @note: btstack_type 1
350  */
351 static inline uint8_t hci_event_encryption_change_get_encryption_enabled(const uint8_t * event){
352     return event[5];
353 }
354 
355 /**
356  * @brief Get field status from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE
357  * @param event packet
358  * @return status
359  * @note: btstack_type 1
360  */
361 static inline uint8_t hci_event_change_connection_link_key_complete_get_status(const uint8_t * event){
362     return event[2];
363 }
364 /**
365  * @brief Get field connection_handle from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE
366  * @param event packet
367  * @return connection_handle
368  * @note: btstack_type 2
369  */
370 static inline uint16_t hci_event_change_connection_link_key_complete_get_connection_handle(const uint8_t * event){
371     return little_endian_read_16(event, 3);
372 }
373 
374 /**
375  * @brief Get field status from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE
376  * @param event packet
377  * @return status
378  * @note: btstack_type 1
379  */
380 static inline uint8_t hci_event_master_link_key_complete_get_status(const uint8_t * event){
381     return event[2];
382 }
383 /**
384  * @brief Get field connection_handle from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE
385  * @param event packet
386  * @return connection_handle
387  * @note: btstack_type 2
388  */
389 static inline uint16_t hci_event_master_link_key_complete_get_connection_handle(const uint8_t * event){
390     return little_endian_read_16(event, 3);
391 }
392 /**
393  * @brief Get field key_flag from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE
394  * @param event packet
395  * @return key_flag
396  * @note: btstack_type 1
397  */
398 static inline uint8_t hci_event_master_link_key_complete_get_key_flag(const uint8_t * event){
399     return event[5];
400 }
401 
402 /**
403  * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_COMPLETE
404  * @param event packet
405  * @return num_hci_command_packets
406  * @note: btstack_type 1
407  */
408 static inline uint8_t hci_event_command_complete_get_num_hci_command_packets(const uint8_t * event){
409     return event[2];
410 }
411 /**
412  * @brief Get field command_opcode from event HCI_EVENT_COMMAND_COMPLETE
413  * @param event packet
414  * @return command_opcode
415  * @note: btstack_type 2
416  */
417 static inline uint16_t hci_event_command_complete_get_command_opcode(const uint8_t * event){
418     return little_endian_read_16(event, 3);
419 }
420 /**
421  * @brief Get field return_parameters from event HCI_EVENT_COMMAND_COMPLETE
422  * @param event packet
423  * @return return_parameters
424  * @note: btstack_type R
425  */
426 static inline const uint8_t * hci_event_command_complete_get_return_parameters(const uint8_t * event){
427     return &event[5];
428 }
429 
430 /**
431  * @brief Get field status from event HCI_EVENT_COMMAND_STATUS
432  * @param event packet
433  * @return status
434  * @note: btstack_type 1
435  */
436 static inline uint8_t hci_event_command_status_get_status(const uint8_t * event){
437     return event[2];
438 }
439 /**
440  * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_STATUS
441  * @param event packet
442  * @return num_hci_command_packets
443  * @note: btstack_type 1
444  */
445 static inline uint8_t hci_event_command_status_get_num_hci_command_packets(const uint8_t * event){
446     return event[3];
447 }
448 /**
449  * @brief Get field command_opcode from event HCI_EVENT_COMMAND_STATUS
450  * @param event packet
451  * @return command_opcode
452  * @note: btstack_type 2
453  */
454 static inline uint16_t hci_event_command_status_get_command_opcode(const uint8_t * event){
455     return little_endian_read_16(event, 4);
456 }
457 
458 /**
459  * @brief Get field hardware_code from event HCI_EVENT_HARDWARE_ERROR
460  * @param event packet
461  * @return hardware_code
462  * @note: btstack_type 1
463  */
464 static inline uint8_t hci_event_hardware_error_get_hardware_code(const uint8_t * event){
465     return event[2];
466 }
467 
468 /**
469  * @brief Get field status from event HCI_EVENT_ROLE_CHANGE
470  * @param event packet
471  * @return status
472  * @note: btstack_type 1
473  */
474 static inline uint8_t hci_event_role_change_get_status(const uint8_t * event){
475     return event[2];
476 }
477 /**
478  * @brief Get field bd_addr from event HCI_EVENT_ROLE_CHANGE
479  * @param event packet
480  * @param Pointer to storage for bd_addr
481  * @note: btstack_type B
482  */
483 static inline void hci_event_role_change_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
484     reverse_bd_addr(&event[3], bd_addr);
485 }
486 /**
487  * @brief Get field role from event HCI_EVENT_ROLE_CHANGE
488  * @param event packet
489  * @return role
490  * @note: btstack_type 1
491  */
492 static inline uint8_t hci_event_role_change_get_role(const uint8_t * event){
493     return event[9];
494 }
495 
496 /**
497  * @brief Get field status from event HCI_EVENT_MODE_CHANGE_EVENT
498  * @param event packet
499  * @return status
500  * @note: btstack_type 1
501  */
502 static inline uint8_t hci_event_mode_change_event_get_status(const uint8_t * event){
503     return event[2];
504 }
505 /**
506  * @brief Get field handle from event HCI_EVENT_MODE_CHANGE_EVENT
507  * @param event packet
508  * @return handle
509  * @note: btstack_type H
510  */
511 static inline hci_con_handle_t hci_event_mode_change_event_get_handle(const uint8_t * event){
512     return little_endian_read_16(event, 3);
513 }
514 /**
515  * @brief Get field mode from event HCI_EVENT_MODE_CHANGE_EVENT
516  * @param event packet
517  * @return mode
518  * @note: btstack_type 1
519  */
520 static inline uint8_t hci_event_mode_change_event_get_mode(const uint8_t * event){
521     return event[5];
522 }
523 /**
524  * @brief Get field interval from event HCI_EVENT_MODE_CHANGE_EVENT
525  * @param event packet
526  * @return interval
527  * @note: btstack_type 2
528  */
529 static inline uint16_t hci_event_mode_change_event_get_interval(const uint8_t * event){
530     return little_endian_read_16(event, 6);
531 }
532 
533 /**
534  * @brief Get field bd_addr from event HCI_EVENT_PIN_CODE_REQUEST
535  * @param event packet
536  * @param Pointer to storage for bd_addr
537  * @note: btstack_type B
538  */
539 static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
540     reverse_bd_addr(&event[2], bd_addr);
541 }
542 
543 /**
544  * @brief Get field bd_addr from event HCI_EVENT_LINK_KEY_REQUEST
545  * @param event packet
546  * @param Pointer to storage for bd_addr
547  * @note: btstack_type B
548  */
549 static inline void hci_event_link_key_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
550     reverse_bd_addr(&event[2], bd_addr);
551 }
552 
553 /**
554  * @brief Get field link_type from event HCI_EVENT_DATA_BUFFER_OVERFLOW
555  * @param event packet
556  * @return link_type
557  * @note: btstack_type 1
558  */
559 static inline uint8_t hci_event_data_buffer_overflow_get_link_type(const uint8_t * event){
560     return event[2];
561 }
562 
563 /**
564  * @brief Get field handle from event HCI_EVENT_MAX_SLOTS_CHANGED
565  * @param event packet
566  * @return handle
567  * @note: btstack_type H
568  */
569 static inline hci_con_handle_t hci_event_max_slots_changed_get_handle(const uint8_t * event){
570     return little_endian_read_16(event, 2);
571 }
572 /**
573  * @brief Get field lmp_max_slots from event HCI_EVENT_MAX_SLOTS_CHANGED
574  * @param event packet
575  * @return lmp_max_slots
576  * @note: btstack_type 1
577  */
578 static inline uint8_t hci_event_max_slots_changed_get_lmp_max_slots(const uint8_t * event){
579     return event[4];
580 }
581 
582 /**
583  * @brief Get field status from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE
584  * @param event packet
585  * @return status
586  * @note: btstack_type 1
587  */
588 static inline uint8_t hci_event_read_clock_offset_complete_get_status(const uint8_t * event){
589     return event[2];
590 }
591 /**
592  * @brief Get field handle from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE
593  * @param event packet
594  * @return handle
595  * @note: btstack_type H
596  */
597 static inline hci_con_handle_t hci_event_read_clock_offset_complete_get_handle(const uint8_t * event){
598     return little_endian_read_16(event, 3);
599 }
600 /**
601  * @brief Get field clock_offset from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE
602  * @param event packet
603  * @return clock_offset
604  * @note: btstack_type 2
605  */
606 static inline uint16_t hci_event_read_clock_offset_complete_get_clock_offset(const uint8_t * event){
607     return little_endian_read_16(event, 5);
608 }
609 
610 /**
611  * @brief Get field status from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED
612  * @param event packet
613  * @return status
614  * @note: btstack_type 1
615  */
616 static inline uint8_t hci_event_connection_packet_type_changed_get_status(const uint8_t * event){
617     return event[2];
618 }
619 /**
620  * @brief Get field handle from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED
621  * @param event packet
622  * @return handle
623  * @note: btstack_type H
624  */
625 static inline hci_con_handle_t hci_event_connection_packet_type_changed_get_handle(const uint8_t * event){
626     return little_endian_read_16(event, 3);
627 }
628 /**
629  * @brief Get field packet_types from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED
630  * @param event packet
631  * @return packet_types
632  * @note: btstack_type 2
633  */
634 static inline uint16_t hci_event_connection_packet_type_changed_get_packet_types(const uint8_t * event){
635     return little_endian_read_16(event, 5);
636 }
637 
638 /**
639  * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
640  * @param event packet
641  * @return num_responses
642  * @note: btstack_type 1
643  */
644 static inline uint8_t hci_event_inquiry_result_with_rssi_get_num_responses(const uint8_t * event){
645     return event[2];
646 }
647 /**
648  * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
649  * @param event packet
650  * @param Pointer to storage for bd_addr
651  * @note: btstack_type B
652  */
653 static inline void hci_event_inquiry_result_with_rssi_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
654     reverse_bd_addr(&event[3], bd_addr);
655 }
656 /**
657  * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
658  * @param event packet
659  * @return page_scan_repetition_mode
660  * @note: btstack_type 1
661  */
662 static inline uint8_t hci_event_inquiry_result_with_rssi_get_page_scan_repetition_mode(const uint8_t * event){
663     return event[9];
664 }
665 /**
666  * @brief Get field reserved from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
667  * @param event packet
668  * @return reserved
669  * @note: btstack_type 1
670  */
671 static inline uint8_t hci_event_inquiry_result_with_rssi_get_reserved(const uint8_t * event){
672     return event[10];
673 }
674 /**
675  * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
676  * @param event packet
677  * @return class_of_device
678  * @note: btstack_type 3
679  */
680 static inline uint32_t hci_event_inquiry_result_with_rssi_get_class_of_device(const uint8_t * event){
681     return little_endian_read_24(event, 11);
682 }
683 /**
684  * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
685  * @param event packet
686  * @return clock_offset
687  * @note: btstack_type 2
688  */
689 static inline uint16_t hci_event_inquiry_result_with_rssi_get_clock_offset(const uint8_t * event){
690     return little_endian_read_16(event, 14);
691 }
692 /**
693  * @brief Get field rssi from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
694  * @param event packet
695  * @return rssi
696  * @note: btstack_type 1
697  */
698 static inline uint8_t hci_event_inquiry_result_with_rssi_get_rssi(const uint8_t * event){
699     return event[16];
700 }
701 
702 /**
703  * @brief Get field status from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
704  * @param event packet
705  * @return status
706  * @note: btstack_type 1
707  */
708 static inline uint8_t hci_event_synchronous_connection_complete_get_status(const uint8_t * event){
709     return event[2];
710 }
711 /**
712  * @brief Get field handle from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
713  * @param event packet
714  * @return handle
715  * @note: btstack_type H
716  */
717 static inline hci_con_handle_t hci_event_synchronous_connection_complete_get_handle(const uint8_t * event){
718     return little_endian_read_16(event, 3);
719 }
720 /**
721  * @brief Get field bd_addr from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
722  * @param event packet
723  * @param Pointer to storage for bd_addr
724  * @note: btstack_type B
725  */
726 static inline void hci_event_synchronous_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
727     reverse_bd_addr(&event[5], bd_addr);
728 }
729 /**
730  * @brief Get field link_type from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
731  * @param event packet
732  * @return link_type
733  * @note: btstack_type 1
734  */
735 static inline uint8_t hci_event_synchronous_connection_complete_get_link_type(const uint8_t * event){
736     return event[11];
737 }
738 /**
739  * @brief Get field transmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
740  * @param event packet
741  * @return transmission_interval
742  * @note: btstack_type 1
743  */
744 static inline uint8_t hci_event_synchronous_connection_complete_get_transmission_interval(const uint8_t * event){
745     return event[12];
746 }
747 /**
748  * @brief Get field retransmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
749  * @param event packet
750  * @return retransmission_interval
751  * @note: btstack_type 1
752  */
753 static inline uint8_t hci_event_synchronous_connection_complete_get_retransmission_interval(const uint8_t * event){
754     return event[13];
755 }
756 /**
757  * @brief Get field rx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
758  * @param event packet
759  * @return rx_packet_length
760  * @note: btstack_type 2
761  */
762 static inline uint16_t hci_event_synchronous_connection_complete_get_rx_packet_length(const uint8_t * event){
763     return little_endian_read_16(event, 14);
764 }
765 /**
766  * @brief Get field tx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
767  * @param event packet
768  * @return tx_packet_length
769  * @note: btstack_type 2
770  */
771 static inline uint16_t hci_event_synchronous_connection_complete_get_tx_packet_length(const uint8_t * event){
772     return little_endian_read_16(event, 16);
773 }
774 /**
775  * @brief Get field air_mode from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
776  * @param event packet
777  * @return air_mode
778  * @note: btstack_type 1
779  */
780 static inline uint8_t hci_event_synchronous_connection_complete_get_air_mode(const uint8_t * event){
781     return event[18];
782 }
783 
784 /**
785  * @brief Get field num_responses from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
786  * @param event packet
787  * @return num_responses
788  * @note: btstack_type 1
789  */
790 static inline uint8_t hci_event_extended_inquiry_response_get_num_responses(const uint8_t * event){
791     return event[2];
792 }
793 /**
794  * @brief Get field bd_addr from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
795  * @param event packet
796  * @param Pointer to storage for bd_addr
797  * @note: btstack_type B
798  */
799 static inline void hci_event_extended_inquiry_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
800     reverse_bd_addr(&event[3], bd_addr);
801 }
802 /**
803  * @brief Get field page_scan_repetition_mode from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
804  * @param event packet
805  * @return page_scan_repetition_mode
806  * @note: btstack_type 1
807  */
808 static inline uint8_t hci_event_extended_inquiry_response_get_page_scan_repetition_mode(const uint8_t * event){
809     return event[9];
810 }
811 /**
812  * @brief Get field reserved from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
813  * @param event packet
814  * @return reserved
815  * @note: btstack_type 1
816  */
817 static inline uint8_t hci_event_extended_inquiry_response_get_reserved(const uint8_t * event){
818     return event[10];
819 }
820 /**
821  * @brief Get field class_of_device from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
822  * @param event packet
823  * @return class_of_device
824  * @note: btstack_type 3
825  */
826 static inline uint32_t hci_event_extended_inquiry_response_get_class_of_device(const uint8_t * event){
827     return little_endian_read_24(event, 11);
828 }
829 /**
830  * @brief Get field clock_offset from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
831  * @param event packet
832  * @return clock_offset
833  * @note: btstack_type 2
834  */
835 static inline uint16_t hci_event_extended_inquiry_response_get_clock_offset(const uint8_t * event){
836     return little_endian_read_16(event, 14);
837 }
838 /**
839  * @brief Get field rssi from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
840  * @param event packet
841  * @return rssi
842  * @note: btstack_type 1
843  */
844 static inline uint8_t hci_event_extended_inquiry_response_get_rssi(const uint8_t * event){
845     return event[16];
846 }
847 
848 /**
849  * @brief Get field status from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE
850  * @param event packet
851  * @return status
852  * @note: btstack_type 1
853  */
854 static inline uint8_t hci_event_encryption_key_refresh_complete_get_status(const uint8_t * event){
855     return event[2];
856 }
857 /**
858  * @brief Get field handle from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE
859  * @param event packet
860  * @return handle
861  * @note: btstack_type H
862  */
863 static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_handle(const uint8_t * event){
864     return little_endian_read_16(event, 3);
865 }
866 
867 /**
868  * @brief Get field bd_addr from event HCI_EVENT_USER_CONFIRMATION_REQUEST
869  * @param event packet
870  * @param Pointer to storage for bd_addr
871  * @note: btstack_type B
872  */
873 static inline void hci_event_user_confirmation_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
874     reverse_bd_addr(&event[2], bd_addr);
875 }
876 /**
877  * @brief Get field numeric_value from event HCI_EVENT_USER_CONFIRMATION_REQUEST
878  * @param event packet
879  * @return numeric_value
880  * @note: btstack_type 4
881  */
882 static inline uint32_t hci_event_user_confirmation_request_get_numeric_value(const uint8_t * event){
883     return little_endian_read_32(event, 8);
884 }
885 
886 /**
887  * @brief Get field bd_addr from event HCI_EVENT_USER_PASSKEY_REQUEST
888  * @param event packet
889  * @param Pointer to storage for bd_addr
890  * @note: btstack_type B
891  */
892 static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
893     reverse_bd_addr(&event[2], bd_addr);
894 }
895 
896 /**
897  * @brief Get field bd_addr from event HCI_EVENT_REMOTE_OOB_DATA_REQUEST
898  * @param event packet
899  * @param Pointer to storage for bd_addr
900  * @note: btstack_type B
901  */
902 static inline void hci_event_remote_oob_data_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
903     reverse_bd_addr(&event[2], bd_addr);
904 }
905 
906 /**
907  * @brief Get field status from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE
908  * @param event packet
909  * @return status
910  * @note: btstack_type 1
911  */
912 static inline uint8_t hci_event_simple_pairing_complete_get_status(const uint8_t * event){
913     return event[2];
914 }
915 /**
916  * @brief Get field bd_addr from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE
917  * @param event packet
918  * @param Pointer to storage for bd_addr
919  * @note: btstack_type B
920  */
921 static inline void hci_event_simple_pairing_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
922     reverse_bd_addr(&event[3], bd_addr);
923 }
924 
925 /**
926  * @brief Get field state from event BTSTACK_EVENT_STATE
927  * @param event packet
928  * @return state
929  * @note: btstack_type 1
930  */
931 static inline uint8_t btstack_event_state_get_state(const uint8_t * event){
932     return event[2];
933 }
934 
935 
936 /**
937  * @brief Get field discoverable from event BTSTACK_EVENT_DISCOVERABLE_ENABLED
938  * @param event packet
939  * @return discoverable
940  * @note: btstack_type 1
941  */
942 static inline uint8_t btstack_event_discoverable_enabled_get_discoverable(const uint8_t * event){
943     return event[2];
944 }
945 
946 /**
947  * @brief Get field handle from event HCI_EVENT_SCO_CAN_SEND_NOW
948  * @param event packet
949  * @param Pointer to storage for handle
950  * @note: btstack_type B
951  */
952 static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){
953     reverse_bd_addr(&event[2], handle);
954 }
955 
956 /**
957  * @brief Get field status from event L2CAP_EVENT_CHANNEL_OPENED
958  * @param event packet
959  * @return status
960  * @note: btstack_type 1
961  */
962 static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * event){
963     return event[2];
964 }
965 /**
966  * @brief Get field address from event L2CAP_EVENT_CHANNEL_OPENED
967  * @param event packet
968  * @param Pointer to storage for address
969  * @note: btstack_type B
970  */
971 static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
972     reverse_bd_addr(&event[3], address);
973 }
974 /**
975  * @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED
976  * @param event packet
977  * @return handle
978  * @note: btstack_type H
979  */
980 static inline hci_con_handle_t l2cap_event_channel_opened_get_handle(const uint8_t * event){
981     return little_endian_read_16(event, 9);
982 }
983 /**
984  * @brief Get field psm from event L2CAP_EVENT_CHANNEL_OPENED
985  * @param event packet
986  * @return psm
987  * @note: btstack_type 2
988  */
989 static inline uint16_t l2cap_event_channel_opened_get_psm(const uint8_t * event){
990     return little_endian_read_16(event, 11);
991 }
992 /**
993  * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_OPENED
994  * @param event packet
995  * @return local_cid
996  * @note: btstack_type 2
997  */
998 static inline uint16_t l2cap_event_channel_opened_get_local_cid(const uint8_t * event){
999     return little_endian_read_16(event, 13);
1000 }
1001 /**
1002  * @brief Get field remote_cid from event L2CAP_EVENT_CHANNEL_OPENED
1003  * @param event packet
1004  * @return remote_cid
1005  * @note: btstack_type 2
1006  */
1007 static inline uint16_t l2cap_event_channel_opened_get_remote_cid(const uint8_t * event){
1008     return little_endian_read_16(event, 15);
1009 }
1010 /**
1011  * @brief Get field local_mtu from event L2CAP_EVENT_CHANNEL_OPENED
1012  * @param event packet
1013  * @return local_mtu
1014  * @note: btstack_type 2
1015  */
1016 static inline uint16_t l2cap_event_channel_opened_get_local_mtu(const uint8_t * event){
1017     return little_endian_read_16(event, 17);
1018 }
1019 /**
1020  * @brief Get field remote_mtu from event L2CAP_EVENT_CHANNEL_OPENED
1021  * @param event packet
1022  * @return remote_mtu
1023  * @note: btstack_type 2
1024  */
1025 static inline uint16_t l2cap_event_channel_opened_get_remote_mtu(const uint8_t * event){
1026     return little_endian_read_16(event, 19);
1027 }
1028 /**
1029  * @brief Get field flush_timeout from event L2CAP_EVENT_CHANNEL_OPENED
1030  * @param event packet
1031  * @return flush_timeout
1032  * @note: btstack_type 2
1033  */
1034 static inline uint16_t l2cap_event_channel_opened_get_flush_timeout(const uint8_t * event){
1035     return little_endian_read_16(event, 21);
1036 }
1037 /**
1038  * @brief Get field incoming from event L2CAP_EVENT_CHANNEL_OPENED
1039  * @param event packet
1040  * @return incoming
1041  * @note: btstack_type 1
1042  */
1043 static inline uint8_t l2cap_event_channel_opened_get_incoming(const uint8_t * event){
1044     return event[23];
1045 }
1046 
1047 /**
1048  * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED
1049  * @param event packet
1050  * @return local_cid
1051  * @note: btstack_type 2
1052  */
1053 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){
1054     return little_endian_read_16(event, 2);
1055 }
1056 
1057 /**
1058  * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION
1059  * @param event packet
1060  * @param Pointer to storage for address
1061  * @note: btstack_type B
1062  */
1063 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1064     reverse_bd_addr(&event[2], address);
1065 }
1066 /**
1067  * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION
1068  * @param event packet
1069  * @return handle
1070  * @note: btstack_type H
1071  */
1072 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){
1073     return little_endian_read_16(event, 8);
1074 }
1075 /**
1076  * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION
1077  * @param event packet
1078  * @return psm
1079  * @note: btstack_type 2
1080  */
1081 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){
1082     return little_endian_read_16(event, 10);
1083 }
1084 /**
1085  * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1086  * @param event packet
1087  * @return local_cid
1088  * @note: btstack_type 2
1089  */
1090 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){
1091     return little_endian_read_16(event, 12);
1092 }
1093 /**
1094  * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1095  * @param event packet
1096  * @return remote_cid
1097  * @note: btstack_type 2
1098  */
1099 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){
1100     return little_endian_read_16(event, 14);
1101 }
1102 
1103 /**
1104  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1105  * @param event packet
1106  * @return handle
1107  * @note: btstack_type H
1108  */
1109 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){
1110     return little_endian_read_16(event, 2);
1111 }
1112 /**
1113  * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1114  * @param event packet
1115  * @return interval_min
1116  * @note: btstack_type 2
1117  */
1118 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){
1119     return little_endian_read_16(event, 4);
1120 }
1121 /**
1122  * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1123  * @param event packet
1124  * @return interval_max
1125  * @note: btstack_type 2
1126  */
1127 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){
1128     return little_endian_read_16(event, 6);
1129 }
1130 /**
1131  * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1132  * @param event packet
1133  * @return latencey
1134  * @note: btstack_type 2
1135  */
1136 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){
1137     return little_endian_read_16(event, 8);
1138 }
1139 /**
1140  * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1141  * @param event packet
1142  * @return timeout_multiplier
1143  * @note: btstack_type 2
1144  */
1145 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){
1146     return little_endian_read_16(event, 10);
1147 }
1148 
1149 /**
1150  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE
1151  * @param event packet
1152  * @return handle
1153  * @note: btstack_type H
1154  */
1155 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){
1156     return little_endian_read_16(event, 2);
1157 }
1158 /**
1159  * @brief Get field result from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE
1160  * @param event packet
1161  * @return result
1162  * @note: btstack_type 2
1163  */
1164 static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){
1165     return little_endian_read_16(event, 4);
1166 }
1167 
1168 /**
1169  * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW
1170  * @param event packet
1171  * @return local_cid
1172  * @note: btstack_type 2
1173  */
1174 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){
1175     return little_endian_read_16(event, 2);
1176 }
1177 
1178 /**
1179  * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1180  * @param event packet
1181  * @return address_type
1182  * @note: btstack_type 1
1183  */
1184 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){
1185     return event[2];
1186 }
1187 /**
1188  * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1189  * @param event packet
1190  * @param Pointer to storage for address
1191  * @note: btstack_type B
1192  */
1193 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1194     reverse_bd_addr(&event[3], address);
1195 }
1196 /**
1197  * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1198  * @param event packet
1199  * @return handle
1200  * @note: btstack_type H
1201  */
1202 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){
1203     return little_endian_read_16(event, 9);
1204 }
1205 /**
1206  * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1207  * @param event packet
1208  * @return psm
1209  * @note: btstack_type 2
1210  */
1211 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){
1212     return little_endian_read_16(event, 11);
1213 }
1214 /**
1215  * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1216  * @param event packet
1217  * @return local_cid
1218  * @note: btstack_type 2
1219  */
1220 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){
1221     return little_endian_read_16(event, 13);
1222 }
1223 /**
1224  * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1225  * @param event packet
1226  * @return remote_cid
1227  * @note: btstack_type 2
1228  */
1229 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){
1230     return little_endian_read_16(event, 15);
1231 }
1232 /**
1233  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1234  * @param event packet
1235  * @return remote_mtu
1236  * @note: btstack_type 2
1237  */
1238 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){
1239     return little_endian_read_16(event, 17);
1240 }
1241 
1242 /**
1243  * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED
1244  * @param event packet
1245  * @return status
1246  * @note: btstack_type 1
1247  */
1248 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){
1249     return event[2];
1250 }
1251 /**
1252  * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED
1253  * @param event packet
1254  * @return address_type
1255  * @note: btstack_type 1
1256  */
1257 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){
1258     return event[3];
1259 }
1260 /**
1261  * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED
1262  * @param event packet
1263  * @param Pointer to storage for address
1264  * @note: btstack_type B
1265  */
1266 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
1267     reverse_bd_addr(&event[4], address);
1268 }
1269 /**
1270  * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED
1271  * @param event packet
1272  * @return handle
1273  * @note: btstack_type H
1274  */
1275 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){
1276     return little_endian_read_16(event, 10);
1277 }
1278 /**
1279  * @brief Get field incoming from event L2CAP_EVENT_LE_CHANNEL_OPENED
1280  * @param event packet
1281  * @return incoming
1282  * @note: btstack_type 1
1283  */
1284 static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){
1285     return event[12];
1286 }
1287 /**
1288  * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED
1289  * @param event packet
1290  * @return psm
1291  * @note: btstack_type 2
1292  */
1293 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){
1294     return little_endian_read_16(event, 13);
1295 }
1296 /**
1297  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1298  * @param event packet
1299  * @return local_cid
1300  * @note: btstack_type 2
1301  */
1302 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){
1303     return little_endian_read_16(event, 15);
1304 }
1305 /**
1306  * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1307  * @param event packet
1308  * @return remote_cid
1309  * @note: btstack_type 2
1310  */
1311 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){
1312     return little_endian_read_16(event, 17);
1313 }
1314 /**
1315  * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1316  * @param event packet
1317  * @return local_mtu
1318  * @note: btstack_type 2
1319  */
1320 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){
1321     return little_endian_read_16(event, 19);
1322 }
1323 /**
1324  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1325  * @param event packet
1326  * @return remote_mtu
1327  * @note: btstack_type 2
1328  */
1329 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){
1330     return little_endian_read_16(event, 21);
1331 }
1332 
1333 /**
1334  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED
1335  * @param event packet
1336  * @return local_cid
1337  * @note: btstack_type 2
1338  */
1339 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){
1340     return little_endian_read_16(event, 2);
1341 }
1342 
1343 /**
1344  * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW
1345  * @param event packet
1346  * @return local_cid
1347  * @note: btstack_type 2
1348  */
1349 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){
1350     return little_endian_read_16(event, 2);
1351 }
1352 
1353 /**
1354  * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT
1355  * @param event packet
1356  * @return local_cid
1357  * @note: btstack_type 2
1358  */
1359 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){
1360     return little_endian_read_16(event, 2);
1361 }
1362 
1363 /**
1364  * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED
1365  * @param event packet
1366  * @return status
1367  * @note: btstack_type 1
1368  */
1369 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){
1370     return event[2];
1371 }
1372 /**
1373  * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED
1374  * @param event packet
1375  * @param Pointer to storage for bd_addr
1376  * @note: btstack_type B
1377  */
1378 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1379     reverse_bd_addr(&event[3], bd_addr);
1380 }
1381 /**
1382  * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED
1383  * @param event packet
1384  * @return con_handle
1385  * @note: btstack_type 2
1386  */
1387 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){
1388     return little_endian_read_16(event, 9);
1389 }
1390 /**
1391  * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED
1392  * @param event packet
1393  * @return server_channel
1394  * @note: btstack_type 1
1395  */
1396 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){
1397     return event[11];
1398 }
1399 /**
1400  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED
1401  * @param event packet
1402  * @return rfcomm_cid
1403  * @note: btstack_type 2
1404  */
1405 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){
1406     return little_endian_read_16(event, 12);
1407 }
1408 /**
1409  * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED
1410  * @param event packet
1411  * @return max_frame_size
1412  * @note: btstack_type 2
1413  */
1414 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){
1415     return little_endian_read_16(event, 14);
1416 }
1417 /**
1418  * @brief Get field incoming from event RFCOMM_EVENT_CHANNEL_OPENED
1419  * @param event packet
1420  * @return incoming
1421  * @note: btstack_type 1
1422  */
1423 static inline uint8_t rfcomm_event_channel_opened_get_incoming(const uint8_t * event){
1424     return event[16];
1425 }
1426 
1427 /**
1428  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED
1429  * @param event packet
1430  * @return rfcomm_cid
1431  * @note: btstack_type 2
1432  */
1433 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){
1434     return little_endian_read_16(event, 2);
1435 }
1436 
1437 /**
1438  * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION
1439  * @param event packet
1440  * @param Pointer to storage for bd_addr
1441  * @note: btstack_type B
1442  */
1443 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1444     reverse_bd_addr(&event[2], bd_addr);
1445 }
1446 /**
1447  * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION
1448  * @param event packet
1449  * @return server_channel
1450  * @note: btstack_type 1
1451  */
1452 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){
1453     return event[8];
1454 }
1455 /**
1456  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION
1457  * @param event packet
1458  * @return rfcomm_cid
1459  * @note: btstack_type 2
1460  */
1461 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){
1462     return little_endian_read_16(event, 9);
1463 }
1464 
1465 /**
1466  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1467  * @param event packet
1468  * @return rfcomm_cid
1469  * @note: btstack_type 2
1470  */
1471 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){
1472     return little_endian_read_16(event, 2);
1473 }
1474 /**
1475  * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1476  * @param event packet
1477  * @return line_status
1478  * @note: btstack_type 1
1479  */
1480 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){
1481     return event[4];
1482 }
1483 
1484 /**
1485  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1486  * @param event packet
1487  * @return rfcomm_cid
1488  * @note: btstack_type 2
1489  */
1490 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){
1491     return little_endian_read_16(event, 2);
1492 }
1493 /**
1494  * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1495  * @param event packet
1496  * @return modem_status
1497  * @note: btstack_type 1
1498  */
1499 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){
1500     return event[4];
1501 }
1502 
1503 /**
1504  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW
1505  * @param event packet
1506  * @return rfcomm_cid
1507  * @note: btstack_type 2
1508  */
1509 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){
1510     return little_endian_read_16(event, 2);
1511 }
1512 
1513 /**
1514  * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE
1515  * @param event packet
1516  * @return status
1517  * @note: btstack_type 1
1518  */
1519 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){
1520     return event[2];
1521 }
1522 
1523 /**
1524  * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1525  * @param event packet
1526  * @return rfcomm_channel
1527  * @note: btstack_type 1
1528  */
1529 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){
1530     return event[2];
1531 }
1532 /**
1533  * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1534  * @param event packet
1535  * @return name
1536  * @note: btstack_type T
1537  */
1538 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){
1539     return (const char *) &event[3];
1540 }
1541 
1542 /**
1543  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1544  * @param event packet
1545  * @return record_id
1546  * @note: btstack_type 2
1547  */
1548 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){
1549     return little_endian_read_16(event, 2);
1550 }
1551 /**
1552  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1553  * @param event packet
1554  * @return attribute_id
1555  * @note: btstack_type 2
1556  */
1557 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){
1558     return little_endian_read_16(event, 4);
1559 }
1560 /**
1561  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1562  * @param event packet
1563  * @return attribute_length
1564  * @note: btstack_type 2
1565  */
1566 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){
1567     return little_endian_read_16(event, 6);
1568 }
1569 /**
1570  * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1571  * @param event packet
1572  * @return data_offset
1573  * @note: btstack_type 2
1574  */
1575 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){
1576     return little_endian_read_16(event, 8);
1577 }
1578 /**
1579  * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1580  * @param event packet
1581  * @return data
1582  * @note: btstack_type 1
1583  */
1584 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){
1585     return event[10];
1586 }
1587 
1588 /**
1589  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1590  * @param event packet
1591  * @return record_id
1592  * @note: btstack_type 2
1593  */
1594 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){
1595     return little_endian_read_16(event, 2);
1596 }
1597 /**
1598  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1599  * @param event packet
1600  * @return attribute_id
1601  * @note: btstack_type 2
1602  */
1603 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){
1604     return little_endian_read_16(event, 4);
1605 }
1606 /**
1607  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1608  * @param event packet
1609  * @return attribute_length
1610  * @note: btstack_type L
1611  */
1612 static inline int sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){
1613     return little_endian_read_16(event, 6);
1614 }
1615 /**
1616  * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1617  * @param event packet
1618  * @return attribute_value
1619  * @note: btstack_type V
1620  */
1621 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){
1622     return &event[8];
1623 }
1624 
1625 /**
1626  * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1627  * @param event packet
1628  * @return total_count
1629  * @note: btstack_type 2
1630  */
1631 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){
1632     return little_endian_read_16(event, 2);
1633 }
1634 /**
1635  * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1636  * @param event packet
1637  * @return record_index
1638  * @note: btstack_type 2
1639  */
1640 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){
1641     return little_endian_read_16(event, 4);
1642 }
1643 /**
1644  * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1645  * @param event packet
1646  * @return record_handle
1647  * @note: btstack_type 4
1648  */
1649 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){
1650     return little_endian_read_32(event, 6);
1651 }
1652 
1653 #ifdef ENABLE_BLE
1654 /**
1655  * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE
1656  * @param event packet
1657  * @return handle
1658  * @note: btstack_type H
1659  */
1660 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){
1661     return little_endian_read_16(event, 2);
1662 }
1663 /**
1664  * @brief Get field status from event GATT_EVENT_QUERY_COMPLETE
1665  * @param event packet
1666  * @return status
1667  * @note: btstack_type 1
1668  */
1669 static inline uint8_t gatt_event_query_complete_get_status(const uint8_t * event){
1670     return event[4];
1671 }
1672 #endif
1673 
1674 #ifdef ENABLE_BLE
1675 /**
1676  * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT
1677  * @param event packet
1678  * @return handle
1679  * @note: btstack_type H
1680  */
1681 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){
1682     return little_endian_read_16(event, 2);
1683 }
1684 /**
1685  * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT
1686  * @param event packet
1687  * @param Pointer to storage for service
1688  * @note: btstack_type X
1689  */
1690 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1691     gatt_client_deserialize_service(event, 4, service);
1692 }
1693 #endif
1694 
1695 #ifdef ENABLE_BLE
1696 /**
1697  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1698  * @param event packet
1699  * @return handle
1700  * @note: btstack_type H
1701  */
1702 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){
1703     return little_endian_read_16(event, 2);
1704 }
1705 /**
1706  * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1707  * @param event packet
1708  * @param Pointer to storage for characteristic
1709  * @note: btstack_type Y
1710  */
1711 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){
1712     gatt_client_deserialize_characteristic(event, 4, characteristic);
1713 }
1714 #endif
1715 
1716 #ifdef ENABLE_BLE
1717 /**
1718  * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1719  * @param event packet
1720  * @return handle
1721  * @note: btstack_type H
1722  */
1723 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){
1724     return little_endian_read_16(event, 2);
1725 }
1726 /**
1727  * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1728  * @param event packet
1729  * @return include_handle
1730  * @note: btstack_type 2
1731  */
1732 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){
1733     return little_endian_read_16(event, 4);
1734 }
1735 /**
1736  * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1737  * @param event packet
1738  * @param Pointer to storage for service
1739  * @note: btstack_type X
1740  */
1741 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1742     gatt_client_deserialize_service(event, 6, service);
1743 }
1744 #endif
1745 
1746 #ifdef ENABLE_BLE
1747 /**
1748  * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1749  * @param event packet
1750  * @return handle
1751  * @note: btstack_type H
1752  */
1753 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){
1754     return little_endian_read_16(event, 2);
1755 }
1756 /**
1757  * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1758  * @param event packet
1759  * @param Pointer to storage for characteristic_descriptor
1760  * @note: btstack_type Z
1761  */
1762 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){
1763     gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor);
1764 }
1765 #endif
1766 
1767 #ifdef ENABLE_BLE
1768 /**
1769  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1770  * @param event packet
1771  * @return handle
1772  * @note: btstack_type H
1773  */
1774 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){
1775     return little_endian_read_16(event, 2);
1776 }
1777 /**
1778  * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1779  * @param event packet
1780  * @return value_handle
1781  * @note: btstack_type 2
1782  */
1783 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1784     return little_endian_read_16(event, 4);
1785 }
1786 /**
1787  * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1788  * @param event packet
1789  * @return value_length
1790  * @note: btstack_type L
1791  */
1792 static inline int gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){
1793     return little_endian_read_16(event, 6);
1794 }
1795 /**
1796  * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1797  * @param event packet
1798  * @return value
1799  * @note: btstack_type V
1800  */
1801 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){
1802     return &event[8];
1803 }
1804 #endif
1805 
1806 #ifdef ENABLE_BLE
1807 /**
1808  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1809  * @param event packet
1810  * @return handle
1811  * @note: btstack_type H
1812  */
1813 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){
1814     return little_endian_read_16(event, 2);
1815 }
1816 /**
1817  * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1818  * @param event packet
1819  * @return value_handle
1820  * @note: btstack_type 2
1821  */
1822 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1823     return little_endian_read_16(event, 4);
1824 }
1825 /**
1826  * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1827  * @param event packet
1828  * @return value_offset
1829  * @note: btstack_type 2
1830  */
1831 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){
1832     return little_endian_read_16(event, 6);
1833 }
1834 /**
1835  * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1836  * @param event packet
1837  * @return value_length
1838  * @note: btstack_type L
1839  */
1840 static inline int gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){
1841     return little_endian_read_16(event, 8);
1842 }
1843 /**
1844  * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1845  * @param event packet
1846  * @return value
1847  * @note: btstack_type V
1848  */
1849 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){
1850     return &event[10];
1851 }
1852 #endif
1853 
1854 #ifdef ENABLE_BLE
1855 /**
1856  * @brief Get field handle from event GATT_EVENT_NOTIFICATION
1857  * @param event packet
1858  * @return handle
1859  * @note: btstack_type H
1860  */
1861 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){
1862     return little_endian_read_16(event, 2);
1863 }
1864 /**
1865  * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION
1866  * @param event packet
1867  * @return value_handle
1868  * @note: btstack_type 2
1869  */
1870 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){
1871     return little_endian_read_16(event, 4);
1872 }
1873 /**
1874  * @brief Get field value_length from event GATT_EVENT_NOTIFICATION
1875  * @param event packet
1876  * @return value_length
1877  * @note: btstack_type L
1878  */
1879 static inline int gatt_event_notification_get_value_length(const uint8_t * event){
1880     return little_endian_read_16(event, 6);
1881 }
1882 /**
1883  * @brief Get field value from event GATT_EVENT_NOTIFICATION
1884  * @param event packet
1885  * @return value
1886  * @note: btstack_type V
1887  */
1888 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){
1889     return &event[8];
1890 }
1891 #endif
1892 
1893 #ifdef ENABLE_BLE
1894 /**
1895  * @brief Get field handle from event GATT_EVENT_INDICATION
1896  * @param event packet
1897  * @return handle
1898  * @note: btstack_type H
1899  */
1900 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){
1901     return little_endian_read_16(event, 2);
1902 }
1903 /**
1904  * @brief Get field value_handle from event GATT_EVENT_INDICATION
1905  * @param event packet
1906  * @return value_handle
1907  * @note: btstack_type 2
1908  */
1909 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){
1910     return little_endian_read_16(event, 4);
1911 }
1912 /**
1913  * @brief Get field value_length from event GATT_EVENT_INDICATION
1914  * @param event packet
1915  * @return value_length
1916  * @note: btstack_type L
1917  */
1918 static inline int gatt_event_indication_get_value_length(const uint8_t * event){
1919     return little_endian_read_16(event, 6);
1920 }
1921 /**
1922  * @brief Get field value from event GATT_EVENT_INDICATION
1923  * @param event packet
1924  * @return value
1925  * @note: btstack_type V
1926  */
1927 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){
1928     return &event[8];
1929 }
1930 #endif
1931 
1932 #ifdef ENABLE_BLE
1933 /**
1934  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1935  * @param event packet
1936  * @return handle
1937  * @note: btstack_type H
1938  */
1939 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_handle(const uint8_t * event){
1940     return little_endian_read_16(event, 2);
1941 }
1942 /**
1943  * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1944  * @param event packet
1945  * @return descriptor_handle
1946  * @note: btstack_type 2
1947  */
1948 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){
1949     return little_endian_read_16(event, 4);
1950 }
1951 /**
1952  * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1953  * @param event packet
1954  * @return descriptor_length
1955  * @note: btstack_type L
1956  */
1957 static inline int gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1958     return little_endian_read_16(event, 6);
1959 }
1960 /**
1961  * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1962  * @param event packet
1963  * @return descriptor
1964  * @note: btstack_type V
1965  */
1966 static inline const uint8_t * gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
1967     return &event[8];
1968 }
1969 #endif
1970 
1971 #ifdef ENABLE_BLE
1972 /**
1973  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1974  * @param event packet
1975  * @return handle
1976  * @note: btstack_type H
1977  */
1978 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){
1979     return little_endian_read_16(event, 2);
1980 }
1981 /**
1982  * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1983  * @param event packet
1984  * @return descriptor_offset
1985  * @note: btstack_type 2
1986  */
1987 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){
1988     return little_endian_read_16(event, 4);
1989 }
1990 /**
1991  * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1992  * @param event packet
1993  * @return descriptor_length
1994  * @note: btstack_type L
1995  */
1996 static inline int gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1997     return little_endian_read_16(event, 6);
1998 }
1999 /**
2000  * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
2001  * @param event packet
2002  * @return descriptor
2003  * @note: btstack_type V
2004  */
2005 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
2006     return &event[8];
2007 }
2008 #endif
2009 
2010 #ifdef ENABLE_BLE
2011 /**
2012  * @brief Get field handle from event GATT_EVENT_MTU
2013  * @param event packet
2014  * @return handle
2015  * @note: btstack_type H
2016  */
2017 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){
2018     return little_endian_read_16(event, 2);
2019 }
2020 /**
2021  * @brief Get field MTU from event GATT_EVENT_MTU
2022  * @param event packet
2023  * @return MTU
2024  * @note: btstack_type 2
2025  */
2026 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){
2027     return little_endian_read_16(event, 4);
2028 }
2029 #endif
2030 
2031 /**
2032  * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
2033  * @param event packet
2034  * @return handle
2035  * @note: btstack_type H
2036  */
2037 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){
2038     return little_endian_read_16(event, 2);
2039 }
2040 /**
2041  * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
2042  * @param event packet
2043  * @return MTU
2044  * @note: btstack_type 2
2045  */
2046 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){
2047     return little_endian_read_16(event, 4);
2048 }
2049 
2050 /**
2051  * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2052  * @param event packet
2053  * @return status
2054  * @note: btstack_type 1
2055  */
2056 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){
2057     return event[2];
2058 }
2059 /**
2060  * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2061  * @param event packet
2062  * @return conn_handle
2063  * @note: btstack_type H
2064  */
2065 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){
2066     return little_endian_read_16(event, 3);
2067 }
2068 /**
2069  * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2070  * @param event packet
2071  * @return attribute_handle
2072  * @note: btstack_type 2
2073  */
2074 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){
2075     return little_endian_read_16(event, 5);
2076 }
2077 
2078 
2079 /**
2080  * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED
2081  * @param event packet
2082  * @return status
2083  * @note: btstack_type 1
2084  */
2085 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){
2086     return event[2];
2087 }
2088 /**
2089  * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED
2090  * @param event packet
2091  * @return service_uuid
2092  * @note: btstack_type 2
2093  */
2094 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){
2095     return little_endian_read_16(event, 3);
2096 }
2097 
2098 /**
2099  * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED
2100  * @param event packet
2101  * @return status
2102  * @note: btstack_type 1
2103  */
2104 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){
2105     return event[2];
2106 }
2107 /**
2108  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED
2109  * @param event packet
2110  * @return bnep_cid
2111  * @note: btstack_type 2
2112  */
2113 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){
2114     return little_endian_read_16(event, 3);
2115 }
2116 /**
2117  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED
2118  * @param event packet
2119  * @return source_uuid
2120  * @note: btstack_type 2
2121  */
2122 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){
2123     return little_endian_read_16(event, 5);
2124 }
2125 /**
2126  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED
2127  * @param event packet
2128  * @return destination_uuid
2129  * @note: btstack_type 2
2130  */
2131 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){
2132     return little_endian_read_16(event, 7);
2133 }
2134 /**
2135  * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED
2136  * @param event packet
2137  * @return mtu
2138  * @note: btstack_type 2
2139  */
2140 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){
2141     return little_endian_read_16(event, 9);
2142 }
2143 /**
2144  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED
2145  * @param event packet
2146  * @param Pointer to storage for remote_address
2147  * @note: btstack_type B
2148  */
2149 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2150     reverse_bd_addr(&event[11], remote_address);
2151 }
2152 
2153 /**
2154  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED
2155  * @param event packet
2156  * @return bnep_cid
2157  * @note: btstack_type 2
2158  */
2159 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){
2160     return little_endian_read_16(event, 2);
2161 }
2162 /**
2163  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2164  * @param event packet
2165  * @return source_uuid
2166  * @note: btstack_type 2
2167  */
2168 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){
2169     return little_endian_read_16(event, 4);
2170 }
2171 /**
2172  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2173  * @param event packet
2174  * @return destination_uuid
2175  * @note: btstack_type 2
2176  */
2177 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){
2178     return little_endian_read_16(event, 6);
2179 }
2180 /**
2181  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED
2182  * @param event packet
2183  * @param Pointer to storage for remote_address
2184  * @note: btstack_type B
2185  */
2186 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2187     reverse_bd_addr(&event[8], remote_address);
2188 }
2189 
2190 /**
2191  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT
2192  * @param event packet
2193  * @return bnep_cid
2194  * @note: btstack_type 2
2195  */
2196 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){
2197     return little_endian_read_16(event, 2);
2198 }
2199 /**
2200  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2201  * @param event packet
2202  * @return source_uuid
2203  * @note: btstack_type 2
2204  */
2205 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){
2206     return little_endian_read_16(event, 4);
2207 }
2208 /**
2209  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2210  * @param event packet
2211  * @return destination_uuid
2212  * @note: btstack_type 2
2213  */
2214 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){
2215     return little_endian_read_16(event, 6);
2216 }
2217 /**
2218  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT
2219  * @param event packet
2220  * @param Pointer to storage for remote_address
2221  * @note: btstack_type B
2222  */
2223 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2224     reverse_bd_addr(&event[8], remote_address);
2225 }
2226 /**
2227  * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT
2228  * @param event packet
2229  * @return channel_state
2230  * @note: btstack_type 1
2231  */
2232 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){
2233     return event[14];
2234 }
2235 
2236 /**
2237  * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW
2238  * @param event packet
2239  * @return bnep_cid
2240  * @note: btstack_type 2
2241  */
2242 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){
2243     return little_endian_read_16(event, 2);
2244 }
2245 /**
2246  * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW
2247  * @param event packet
2248  * @return source_uuid
2249  * @note: btstack_type 2
2250  */
2251 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){
2252     return little_endian_read_16(event, 4);
2253 }
2254 /**
2255  * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW
2256  * @param event packet
2257  * @return destination_uuid
2258  * @note: btstack_type 2
2259  */
2260 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){
2261     return little_endian_read_16(event, 6);
2262 }
2263 /**
2264  * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW
2265  * @param event packet
2266  * @param Pointer to storage for remote_address
2267  * @note: btstack_type B
2268  */
2269 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2270     reverse_bd_addr(&event[8], remote_address);
2271 }
2272 
2273 #ifdef ENABLE_BLE
2274 /**
2275  * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST
2276  * @param event packet
2277  * @return handle
2278  * @note: btstack_type H
2279  */
2280 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){
2281     return little_endian_read_16(event, 2);
2282 }
2283 /**
2284  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST
2285  * @param event packet
2286  * @return addr_type
2287  * @note: btstack_type 1
2288  */
2289 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){
2290     return event[4];
2291 }
2292 /**
2293  * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST
2294  * @param event packet
2295  * @param Pointer to storage for address
2296  * @note: btstack_type B
2297  */
2298 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){
2299     reverse_bd_addr(&event[5], address);
2300 }
2301 #endif
2302 
2303 #ifdef ENABLE_BLE
2304 /**
2305  * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL
2306  * @param event packet
2307  * @return handle
2308  * @note: btstack_type H
2309  */
2310 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){
2311     return little_endian_read_16(event, 2);
2312 }
2313 /**
2314  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL
2315  * @param event packet
2316  * @return addr_type
2317  * @note: btstack_type 1
2318  */
2319 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){
2320     return event[4];
2321 }
2322 /**
2323  * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL
2324  * @param event packet
2325  * @param Pointer to storage for address
2326  * @note: btstack_type B
2327  */
2328 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){
2329     reverse_bd_addr(&event[5], address);
2330 }
2331 #endif
2332 
2333 #ifdef ENABLE_BLE
2334 /**
2335  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2336  * @param event packet
2337  * @return handle
2338  * @note: btstack_type H
2339  */
2340 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){
2341     return little_endian_read_16(event, 2);
2342 }
2343 /**
2344  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2345  * @param event packet
2346  * @return addr_type
2347  * @note: btstack_type 1
2348  */
2349 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){
2350     return event[4];
2351 }
2352 /**
2353  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2354  * @param event packet
2355  * @param Pointer to storage for address
2356  * @note: btstack_type B
2357  */
2358 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){
2359     reverse_bd_addr(&event[5], address);
2360 }
2361 /**
2362  * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2363  * @param event packet
2364  * @return passkey
2365  * @note: btstack_type 4
2366  */
2367 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){
2368     return little_endian_read_32(event, 11);
2369 }
2370 #endif
2371 
2372 #ifdef ENABLE_BLE
2373 /**
2374  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2375  * @param event packet
2376  * @return handle
2377  * @note: btstack_type H
2378  */
2379 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){
2380     return little_endian_read_16(event, 2);
2381 }
2382 /**
2383  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2384  * @param event packet
2385  * @return addr_type
2386  * @note: btstack_type 1
2387  */
2388 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){
2389     return event[4];
2390 }
2391 /**
2392  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2393  * @param event packet
2394  * @param Pointer to storage for address
2395  * @note: btstack_type B
2396  */
2397 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){
2398     reverse_bd_addr(&event[5], address);
2399 }
2400 #endif
2401 
2402 #ifdef ENABLE_BLE
2403 /**
2404  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER
2405  * @param event packet
2406  * @return handle
2407  * @note: btstack_type H
2408  */
2409 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){
2410     return little_endian_read_16(event, 2);
2411 }
2412 /**
2413  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER
2414  * @param event packet
2415  * @return addr_type
2416  * @note: btstack_type 1
2417  */
2418 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){
2419     return event[4];
2420 }
2421 /**
2422  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER
2423  * @param event packet
2424  * @param Pointer to storage for address
2425  * @note: btstack_type B
2426  */
2427 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){
2428     reverse_bd_addr(&event[5], address);
2429 }
2430 #endif
2431 
2432 #ifdef ENABLE_BLE
2433 /**
2434  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL
2435  * @param event packet
2436  * @return handle
2437  * @note: btstack_type H
2438  */
2439 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){
2440     return little_endian_read_16(event, 2);
2441 }
2442 /**
2443  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL
2444  * @param event packet
2445  * @return addr_type
2446  * @note: btstack_type 1
2447  */
2448 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){
2449     return event[4];
2450 }
2451 /**
2452  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL
2453  * @param event packet
2454  * @param Pointer to storage for address
2455  * @note: btstack_type B
2456  */
2457 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){
2458     reverse_bd_addr(&event[5], address);
2459 }
2460 #endif
2461 
2462 #ifdef ENABLE_BLE
2463 /**
2464  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2465  * @param event packet
2466  * @return handle
2467  * @note: btstack_type H
2468  */
2469 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){
2470     return little_endian_read_16(event, 2);
2471 }
2472 /**
2473  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2474  * @param event packet
2475  * @return addr_type
2476  * @note: btstack_type 1
2477  */
2478 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){
2479     return event[4];
2480 }
2481 /**
2482  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2483  * @param event packet
2484  * @param Pointer to storage for address
2485  * @note: btstack_type B
2486  */
2487 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){
2488     reverse_bd_addr(&event[5], address);
2489 }
2490 /**
2491  * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2492  * @param event packet
2493  * @return passkey
2494  * @note: btstack_type 4
2495  */
2496 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){
2497     return little_endian_read_32(event, 11);
2498 }
2499 #endif
2500 
2501 #ifdef ENABLE_BLE
2502 /**
2503  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2504  * @param event packet
2505  * @return handle
2506  * @note: btstack_type H
2507  */
2508 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){
2509     return little_endian_read_16(event, 2);
2510 }
2511 /**
2512  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2513  * @param event packet
2514  * @return addr_type
2515  * @note: btstack_type 1
2516  */
2517 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){
2518     return event[4];
2519 }
2520 /**
2521  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2522  * @param event packet
2523  * @param Pointer to storage for address
2524  * @note: btstack_type B
2525  */
2526 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){
2527     reverse_bd_addr(&event[5], address);
2528 }
2529 #endif
2530 
2531 #ifdef ENABLE_BLE
2532 /**
2533  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2534  * @param event packet
2535  * @return handle
2536  * @note: btstack_type H
2537  */
2538 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){
2539     return little_endian_read_16(event, 2);
2540 }
2541 /**
2542  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2543  * @param event packet
2544  * @return addr_type
2545  * @note: btstack_type 1
2546  */
2547 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){
2548     return event[4];
2549 }
2550 /**
2551  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2552  * @param event packet
2553  * @param Pointer to storage for address
2554  * @note: btstack_type B
2555  */
2556 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){
2557     reverse_bd_addr(&event[5], address);
2558 }
2559 #endif
2560 
2561 #ifdef ENABLE_BLE
2562 /**
2563  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2564  * @param event packet
2565  * @return handle
2566  * @note: btstack_type H
2567  */
2568 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){
2569     return little_endian_read_16(event, 2);
2570 }
2571 /**
2572  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2573  * @param event packet
2574  * @return addr_type
2575  * @note: btstack_type 1
2576  */
2577 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){
2578     return event[4];
2579 }
2580 /**
2581  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2582  * @param event packet
2583  * @param Pointer to storage for address
2584  * @note: btstack_type B
2585  */
2586 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){
2587     reverse_bd_addr(&event[5], address);
2588 }
2589 #endif
2590 
2591 #ifdef ENABLE_BLE
2592 /**
2593  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2594  * @param event packet
2595  * @return handle
2596  * @note: btstack_type H
2597  */
2598 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){
2599     return little_endian_read_16(event, 2);
2600 }
2601 /**
2602  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2603  * @param event packet
2604  * @return addr_type
2605  * @note: btstack_type 1
2606  */
2607 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){
2608     return event[4];
2609 }
2610 /**
2611  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2612  * @param event packet
2613  * @param Pointer to storage for address
2614  * @note: btstack_type B
2615  */
2616 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){
2617     reverse_bd_addr(&event[5], address);
2618 }
2619 /**
2620  * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2621  * @param event packet
2622  * @return identity_addr_type
2623  * @note: btstack_type 1
2624  */
2625 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){
2626     return event[11];
2627 }
2628 /**
2629  * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2630  * @param event packet
2631  * @param Pointer to storage for identity_address
2632  * @note: btstack_type B
2633  */
2634 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
2635     reverse_bd_addr(&event[12], identity_address);
2636 }
2637 /**
2638  * @brief Get field index_internal from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2639  * @param event packet
2640  * @return index_internal
2641  * @note: btstack_type 2
2642  */
2643 static inline uint16_t sm_event_identity_resolving_succeeded_get_index_internal(const uint8_t * event){
2644     return little_endian_read_16(event, 18);
2645 }
2646 #endif
2647 
2648 #ifdef ENABLE_BLE
2649 /**
2650  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST
2651  * @param event packet
2652  * @return handle
2653  * @note: btstack_type H
2654  */
2655 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){
2656     return little_endian_read_16(event, 2);
2657 }
2658 /**
2659  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST
2660  * @param event packet
2661  * @return addr_type
2662  * @note: btstack_type 1
2663  */
2664 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){
2665     return event[4];
2666 }
2667 /**
2668  * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST
2669  * @param event packet
2670  * @param Pointer to storage for address
2671  * @note: btstack_type B
2672  */
2673 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){
2674     reverse_bd_addr(&event[5], address);
2675 }
2676 #endif
2677 
2678 #ifdef ENABLE_BLE
2679 /**
2680  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT
2681  * @param event packet
2682  * @return handle
2683  * @note: btstack_type H
2684  */
2685 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){
2686     return little_endian_read_16(event, 2);
2687 }
2688 /**
2689  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT
2690  * @param event packet
2691  * @return addr_type
2692  * @note: btstack_type 1
2693  */
2694 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){
2695     return event[4];
2696 }
2697 /**
2698  * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT
2699  * @param event packet
2700  * @param Pointer to storage for address
2701  * @note: btstack_type B
2702  */
2703 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){
2704     reverse_bd_addr(&event[5], address);
2705 }
2706 /**
2707  * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT
2708  * @param event packet
2709  * @return authorization_result
2710  * @note: btstack_type 1
2711  */
2712 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){
2713     return event[11];
2714 }
2715 #endif
2716 
2717 #ifdef ENABLE_BLE
2718 /**
2719  * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION
2720  * @param event packet
2721  * @return handle
2722  * @note: btstack_type H
2723  */
2724 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){
2725     return little_endian_read_16(event, 2);
2726 }
2727 /**
2728  * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION
2729  * @param event packet
2730  * @return action
2731  * @note: btstack_type 1
2732  */
2733 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){
2734     return event[4];
2735 }
2736 #endif
2737 
2738 #ifdef ENABLE_BLE
2739 /**
2740  * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED
2741  * @param event packet
2742  * @return handle
2743  * @note: btstack_type H
2744  */
2745 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){
2746     return little_endian_read_16(event, 2);
2747 }
2748 /**
2749  * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED
2750  * @param event packet
2751  * @return addr_type
2752  * @note: btstack_type 1
2753  */
2754 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){
2755     return event[4];
2756 }
2757 /**
2758  * @brief Get field address from event SM_EVENT_IDENTITY_CREATED
2759  * @param event packet
2760  * @param Pointer to storage for address
2761  * @note: btstack_type B
2762  */
2763 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){
2764     reverse_bd_addr(&event[5], address);
2765 }
2766 /**
2767  * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED
2768  * @param event packet
2769  * @return identity_addr_type
2770  * @note: btstack_type 1
2771  */
2772 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){
2773     return event[11];
2774 }
2775 /**
2776  * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED
2777  * @param event packet
2778  * @param Pointer to storage for identity_address
2779  * @note: btstack_type B
2780  */
2781 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
2782     reverse_bd_addr(&event[12], identity_address);
2783 }
2784 #endif
2785 
2786 /**
2787  * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL
2788  * @param event packet
2789  * @return handle
2790  * @note: btstack_type H
2791  */
2792 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){
2793     return little_endian_read_16(event, 2);
2794 }
2795 /**
2796  * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL
2797  * @param event packet
2798  * @return security_level
2799  * @note: btstack_type 1
2800  */
2801 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){
2802     return event[4];
2803 }
2804 
2805 /**
2806  * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2807  * @param event packet
2808  * @return status
2809  * @note: btstack_type 1
2810  */
2811 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){
2812     return event[2];
2813 }
2814 /**
2815  * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2816  * @param event packet
2817  * @param Pointer to storage for address
2818  * @note: btstack_type B
2819  */
2820 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){
2821     reverse_bd_addr(&event[3], address);
2822 }
2823 
2824 /**
2825  * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT
2826  * @param event packet
2827  * @return advertising_event_type
2828  * @note: btstack_type 1
2829  */
2830 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){
2831     return event[2];
2832 }
2833 /**
2834  * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT
2835  * @param event packet
2836  * @return address_type
2837  * @note: btstack_type 1
2838  */
2839 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){
2840     return event[3];
2841 }
2842 /**
2843  * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT
2844  * @param event packet
2845  * @param Pointer to storage for address
2846  * @note: btstack_type B
2847  */
2848 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){
2849     reverse_bd_addr(&event[4], address);
2850 }
2851 /**
2852  * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT
2853  * @param event packet
2854  * @return rssi
2855  * @note: btstack_type 1
2856  */
2857 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){
2858     return event[10];
2859 }
2860 /**
2861  * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT
2862  * @param event packet
2863  * @return data_length
2864  * @note: btstack_type J
2865  */
2866 static inline int gap_event_advertising_report_get_data_length(const uint8_t * event){
2867     return event[11];
2868 }
2869 /**
2870  * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT
2871  * @param event packet
2872  * @return data
2873  * @note: btstack_type V
2874  */
2875 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){
2876     return &event[12];
2877 }
2878 
2879 /**
2880  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2881  * @param event packet
2882  * @return status
2883  * @note: btstack_type 1
2884  */
2885 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){
2886     return event[3];
2887 }
2888 /**
2889  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2890  * @param event packet
2891  * @return connection_handle
2892  * @note: btstack_type H
2893  */
2894 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){
2895     return little_endian_read_16(event, 4);
2896 }
2897 /**
2898  * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2899  * @param event packet
2900  * @return role
2901  * @note: btstack_type 1
2902  */
2903 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){
2904     return event[6];
2905 }
2906 /**
2907  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2908  * @param event packet
2909  * @return peer_address_type
2910  * @note: btstack_type 1
2911  */
2912 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){
2913     return event[7];
2914 }
2915 /**
2916  * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2917  * @param event packet
2918  * @param Pointer to storage for peer_address
2919  * @note: btstack_type B
2920  */
2921 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){
2922     reverse_bd_addr(&event[8], peer_address);
2923 }
2924 /**
2925  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2926  * @param event packet
2927  * @return conn_interval
2928  * @note: btstack_type 2
2929  */
2930 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){
2931     return little_endian_read_16(event, 14);
2932 }
2933 /**
2934  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2935  * @param event packet
2936  * @return conn_latency
2937  * @note: btstack_type 2
2938  */
2939 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){
2940     return little_endian_read_16(event, 16);
2941 }
2942 /**
2943  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2944  * @param event packet
2945  * @return supervision_timeout
2946  * @note: btstack_type 2
2947  */
2948 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){
2949     return little_endian_read_16(event, 18);
2950 }
2951 /**
2952  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2953  * @param event packet
2954  * @return master_clock_accuracy
2955  * @note: btstack_type 1
2956  */
2957 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){
2958     return event[20];
2959 }
2960 
2961 /**
2962  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2963  * @param event packet
2964  * @return status
2965  * @note: btstack_type 1
2966  */
2967 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){
2968     return event[3];
2969 }
2970 /**
2971  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2972  * @param event packet
2973  * @return connection_handle
2974  * @note: btstack_type H
2975  */
2976 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){
2977     return little_endian_read_16(event, 4);
2978 }
2979 /**
2980  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2981  * @param event packet
2982  * @return conn_interval
2983  * @note: btstack_type 2
2984  */
2985 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){
2986     return little_endian_read_16(event, 6);
2987 }
2988 /**
2989  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2990  * @param event packet
2991  * @return conn_latency
2992  * @note: btstack_type 2
2993  */
2994 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){
2995     return little_endian_read_16(event, 8);
2996 }
2997 /**
2998  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2999  * @param event packet
3000  * @return supervision_timeout
3001  * @note: btstack_type 2
3002  */
3003 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){
3004     return little_endian_read_16(event, 10);
3005 }
3006 
3007 /**
3008  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3009  * @param event packet
3010  * @return connection_handle
3011  * @note: btstack_type H
3012  */
3013 //  static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){
3014 //      not implemented yet
3015 //  }
3016 /**
3017  * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3018  * @param event packet
3019  * @return random_number
3020  * @note: btstack_type D
3021  */
3022 //  static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){
3023 //      not implemented yet
3024 //  }
3025 /**
3026  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3027  * @param event packet
3028  * @return encryption_diversifier
3029  * @note: btstack_type 2
3030  */
3031 //  static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){
3032 //      not implemented yet
3033 //  }
3034 
3035 /**
3036  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3037  * @param event packet
3038  * @return connection_handle
3039  * @note: btstack_type H
3040  */
3041 //  static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){
3042 //      not implemented yet
3043 //  }
3044 /**
3045  * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3046  * @param event packet
3047  * @return random_number
3048  * @note: btstack_type D
3049  */
3050 //  static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){
3051 //      not implemented yet
3052 //  }
3053 /**
3054  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3055  * @param event packet
3056  * @return encryption_diversifier
3057  * @note: btstack_type 2
3058  */
3059 //  static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){
3060 //      not implemented yet
3061 //  }
3062 
3063 /**
3064  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3065  * @param event packet
3066  * @return connection_handle
3067  * @note: btstack_type H
3068  */
3069 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){
3070     return little_endian_read_16(event, 3);
3071 }
3072 /**
3073  * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3074  * @param event packet
3075  * @return interval_min
3076  * @note: btstack_type 2
3077  */
3078 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){
3079     return little_endian_read_16(event, 5);
3080 }
3081 /**
3082  * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3083  * @param event packet
3084  * @return interval_max
3085  * @note: btstack_type 2
3086  */
3087 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){
3088     return little_endian_read_16(event, 7);
3089 }
3090 /**
3091  * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3092  * @param event packet
3093  * @return latency
3094  * @note: btstack_type 2
3095  */
3096 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){
3097     return little_endian_read_16(event, 9);
3098 }
3099 /**
3100  * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3101  * @param event packet
3102  * @return timeout
3103  * @note: btstack_type 2
3104  */
3105 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){
3106     return little_endian_read_16(event, 11);
3107 }
3108 
3109 /**
3110  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3111  * @param event packet
3112  * @return connection_handle
3113  * @note: btstack_type H
3114  */
3115 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){
3116     return little_endian_read_16(event, 3);
3117 }
3118 /**
3119  * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3120  * @param event packet
3121  * @return max_tx_octets
3122  * @note: btstack_type 2
3123  */
3124 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){
3125     return little_endian_read_16(event, 5);
3126 }
3127 /**
3128  * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3129  * @param event packet
3130  * @return max_tx_time
3131  * @note: btstack_type 2
3132  */
3133 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){
3134     return little_endian_read_16(event, 7);
3135 }
3136 /**
3137  * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3138  * @param event packet
3139  * @return max_rx_octets
3140  * @note: btstack_type 2
3141  */
3142 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){
3143     return little_endian_read_16(event, 9);
3144 }
3145 /**
3146  * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3147  * @param event packet
3148  * @return max_rx_time
3149  * @note: btstack_type 2
3150  */
3151 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){
3152     return little_endian_read_16(event, 11);
3153 }
3154 
3155 /**
3156  * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3157  * @param event packet
3158  * @return status
3159  * @note: btstack_type 1
3160  */
3161 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){
3162     return event[3];
3163 }
3164 /**
3165  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3166  * @param event packet
3167  * @param Pointer to storage for dhkey_x
3168  * @note: btstack_type Q
3169  */
3170 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3171     reverse_bytes(&event[4], dhkey_x, 32);
3172 }
3173 /**
3174  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3175  * @param event packet
3176  * @param Pointer to storage for dhkey_y
3177  * @note: btstack_type Q
3178  */
3179 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3180     reverse_bytes(&event[36], dhkey_y, 32);
3181 }
3182 
3183 /**
3184  * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3185  * @param event packet
3186  * @return status
3187  * @note: btstack_type 1
3188  */
3189 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){
3190     return event[3];
3191 }
3192 /**
3193  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3194  * @param event packet
3195  * @param Pointer to storage for dhkey_x
3196  * @note: btstack_type Q
3197  */
3198 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3199     reverse_bytes(&event[4], dhkey_x, 32);
3200 }
3201 /**
3202  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3203  * @param event packet
3204  * @param Pointer to storage for dhkey_y
3205  * @note: btstack_type Q
3206  */
3207 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3208     reverse_bytes(&event[36], dhkey_y, 32);
3209 }
3210 
3211 /**
3212  * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3213  * @param event packet
3214  * @return status
3215  * @note: btstack_type 1
3216  */
3217 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){
3218     return event[3];
3219 }
3220 /**
3221  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3222  * @param event packet
3223  * @return connection_handle
3224  * @note: btstack_type H
3225  */
3226 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){
3227     return little_endian_read_16(event, 4);
3228 }
3229 /**
3230  * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3231  * @param event packet
3232  * @return role
3233  * @note: btstack_type 1
3234  */
3235 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){
3236     return event[6];
3237 }
3238 /**
3239  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3240  * @param event packet
3241  * @return peer_address_type
3242  * @note: btstack_type 1
3243  */
3244 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){
3245     return event[7];
3246 }
3247 /**
3248  * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3249  * @param event packet
3250  * @param Pointer to storage for perr_addresss
3251  * @note: btstack_type B
3252  */
3253 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){
3254     reverse_bd_addr(&event[8], perr_addresss);
3255 }
3256 /**
3257  * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3258  * @param event packet
3259  * @param Pointer to storage for local_resolvable_private_addres
3260  * @note: btstack_type B
3261  */
3262 static inline void hci_subevent_le_enhanced_connection_complete_get_local_resolvable_private_addres(const uint8_t * event, bd_addr_t local_resolvable_private_addres){
3263     reverse_bd_addr(&event[14], local_resolvable_private_addres);
3264 }
3265 /**
3266  * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3267  * @param event packet
3268  * @param Pointer to storage for peer_resolvable_private_addres
3269  * @note: btstack_type B
3270  */
3271 static inline void hci_subevent_le_enhanced_connection_complete_get_peer_resolvable_private_addres(const uint8_t * event, bd_addr_t peer_resolvable_private_addres){
3272     reverse_bd_addr(&event[20], peer_resolvable_private_addres);
3273 }
3274 /**
3275  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3276  * @param event packet
3277  * @return conn_interval
3278  * @note: btstack_type 2
3279  */
3280 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){
3281     return little_endian_read_16(event, 26);
3282 }
3283 /**
3284  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3285  * @param event packet
3286  * @return conn_latency
3287  * @note: btstack_type 2
3288  */
3289 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){
3290     return little_endian_read_16(event, 28);
3291 }
3292 /**
3293  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3294  * @param event packet
3295  * @return supervision_timeout
3296  * @note: btstack_type 2
3297  */
3298 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){
3299     return little_endian_read_16(event, 30);
3300 }
3301 /**
3302  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3303  * @param event packet
3304  * @return master_clock_accuracy
3305  * @note: btstack_type 1
3306  */
3307 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){
3308     return event[32];
3309 }
3310 
3311 /**
3312  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
3313  * @param event packet
3314  * @return status
3315  * @note: btstack_type 1
3316  */
3317 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){
3318     return event[3];
3319 }
3320 
3321 /**
3322  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
3323  * @param event packet
3324  * @return status
3325  * @note: btstack_type 1
3326  */
3327 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){
3328     return event[3];
3329 }
3330 
3331 /**
3332  * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3333  * @param event packet
3334  * @return status
3335  * @note: btstack_type 1
3336  */
3337 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){
3338     return event[3];
3339 }
3340 /**
3341  * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3342  * @param event packet
3343  * @return handle
3344  * @note: btstack_type H
3345  */
3346 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
3347     return little_endian_read_16(event, 4);
3348 }
3349 
3350 /**
3351  * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
3352  * @param event packet
3353  * @return status
3354  * @note: btstack_type 1
3355  */
3356 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){
3357     return event[3];
3358 }
3359 
3360 
3361 /**
3362  * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
3363  * @param event packet
3364  * @return gain
3365  * @note: btstack_type 1
3366  */
3367 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){
3368     return event[3];
3369 }
3370 
3371 /**
3372  * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
3373  * @param event packet
3374  * @return gain
3375  * @note: btstack_type 1
3376  */
3377 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){
3378     return event[3];
3379 }
3380 
3381 /**
3382  * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND
3383  * @param event packet
3384  * @return value_length
3385  * @note: btstack_type J
3386  */
3387 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){
3388     return event[3];
3389 }
3390 /**
3391  * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND
3392  * @param event packet
3393  * @return value
3394  * @note: btstack_type V
3395  */
3396 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){
3397     return &event[4];
3398 }
3399 
3400 /**
3401  * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION
3402  * @param event packet
3403  * @return value_length
3404  * @note: btstack_type J
3405  */
3406 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){
3407     return event[3];
3408 }
3409 /**
3410  * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION
3411  * @param event packet
3412  * @return value
3413  * @note: btstack_type V
3414  */
3415 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){
3416     return &event[4];
3417 }
3418 
3419 /**
3420  * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3421  * @param event packet
3422  * @return status
3423  * @note: btstack_type 1
3424  */
3425 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){
3426     return event[3];
3427 }
3428 /**
3429  * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3430  * @param event packet
3431  * @return con_handle
3432  * @note: btstack_type H
3433  */
3434 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){
3435     return little_endian_read_16(event, 4);
3436 }
3437 /**
3438  * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3439  * @param event packet
3440  * @param Pointer to storage for bd_addr
3441  * @note: btstack_type B
3442  */
3443 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3444     reverse_bd_addr(&event[6], bd_addr);
3445 }
3446 
3447 
3448 /**
3449  * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3450  * @param event packet
3451  * @return status
3452  * @note: btstack_type 1
3453  */
3454 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
3455     return event[3];
3456 }
3457 /**
3458  * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3459  * @param event packet
3460  * @return handle
3461  * @note: btstack_type H
3462  */
3463 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
3464     return little_endian_read_16(event, 4);
3465 }
3466 /**
3467  * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3468  * @param event packet
3469  * @param Pointer to storage for bd_addr
3470  * @note: btstack_type B
3471  */
3472 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3473     reverse_bd_addr(&event[6], bd_addr);
3474 }
3475 /**
3476  * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3477  * @param event packet
3478  * @return negotiated_codec
3479  * @note: btstack_type 1
3480  */
3481 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){
3482     return event[12];
3483 }
3484 
3485 
3486 /**
3487  * @brief Get field status from event HFP_SUBEVENT_COMPLETE
3488  * @param event packet
3489  * @return status
3490  * @note: btstack_type 1
3491  */
3492 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){
3493     return event[3];
3494 }
3495 
3496 /**
3497  * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3498  * @param event packet
3499  * @return indicator_index
3500  * @note: btstack_type 1
3501  */
3502 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){
3503     return event[3];
3504 }
3505 /**
3506  * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3507  * @param event packet
3508  * @return indicator_status
3509  * @note: btstack_type 1
3510  */
3511 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){
3512     return event[4];
3513 }
3514 /**
3515  * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3516  * @param event packet
3517  * @return indicator_name
3518  * @note: btstack_type T
3519  */
3520 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){
3521     return (const char *) &event[5];
3522 }
3523 
3524 /**
3525  * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3526  * @param event packet
3527  * @return network_operator_mode
3528  * @note: btstack_type 1
3529  */
3530 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){
3531     return event[3];
3532 }
3533 /**
3534  * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3535  * @param event packet
3536  * @return network_operator_format
3537  * @note: btstack_type 1
3538  */
3539 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){
3540     return event[4];
3541 }
3542 /**
3543  * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3544  * @param event packet
3545  * @return network_operator_name
3546  * @note: btstack_type T
3547  */
3548 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){
3549     return (const char *) &event[5];
3550 }
3551 
3552 /**
3553  * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR
3554  * @param event packet
3555  * @return error
3556  * @note: btstack_type 1
3557  */
3558 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){
3559     return event[3];
3560 }
3561 
3562 
3563 
3564 
3565 /**
3566  * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
3567  * @param event packet
3568  * @return number
3569  * @note: btstack_type T
3570  */
3571 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){
3572     return (const char *) &event[3];
3573 }
3574 
3575 
3576 /**
3577  * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG
3578  * @param event packet
3579  * @return number
3580  * @note: btstack_type T
3581  */
3582 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){
3583     return (const char *) &event[3];
3584 }
3585 
3586 /**
3587  * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES
3588  * @param event packet
3589  * @return dtmf
3590  * @note: btstack_type T
3591  */
3592 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){
3593     return (const char *) &event[3];
3594 }
3595 
3596 
3597 
3598 
3599 /**
3600  * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME
3601  * @param event packet
3602  * @return status
3603  * @note: btstack_type 1
3604  */
3605 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){
3606     return event[3];
3607 }
3608 /**
3609  * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME
3610  * @param event packet
3611  * @return gain
3612  * @note: btstack_type 1
3613  */
3614 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){
3615     return event[4];
3616 }
3617 
3618 /**
3619  * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME
3620  * @param event packet
3621  * @return status
3622  * @note: btstack_type 1
3623  */
3624 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){
3625     return event[3];
3626 }
3627 /**
3628  * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME
3629  * @param event packet
3630  * @return gain
3631  * @note: btstack_type 1
3632  */
3633 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){
3634     return event[4];
3635 }
3636 
3637 /**
3638  * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3639  * @param event packet
3640  * @return type
3641  * @note: btstack_type 1
3642  */
3643 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){
3644     return event[3];
3645 }
3646 /**
3647  * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3648  * @param event packet
3649  * @return number
3650  * @note: btstack_type T
3651  */
3652 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){
3653     return (const char *) &event[4];
3654 }
3655 
3656 /**
3657  * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3658  * @param event packet
3659  * @return type
3660  * @note: btstack_type 1
3661  */
3662 static inline uint8_t hfp_subevent_calling_line_indetification_notification_get_type(const uint8_t * event){
3663     return event[3];
3664 }
3665 /**
3666  * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3667  * @param event packet
3668  * @return number
3669  * @note: btstack_type T
3670  */
3671 static inline const char * hfp_subevent_calling_line_indetification_notification_get_number(const uint8_t * event){
3672     return (const char *) &event[4];
3673 }
3674 
3675 /**
3676  * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3677  * @param event packet
3678  * @return clcc_idx
3679  * @note: btstack_type 1
3680  */
3681 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){
3682     return event[3];
3683 }
3684 /**
3685  * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3686  * @param event packet
3687  * @return clcc_dir
3688  * @note: btstack_type 1
3689  */
3690 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){
3691     return event[4];
3692 }
3693 /**
3694  * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3695  * @param event packet
3696  * @return clcc_status
3697  * @note: btstack_type 1
3698  */
3699 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){
3700     return event[5];
3701 }
3702 /**
3703  * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3704  * @param event packet
3705  * @return clcc_mpty
3706  * @note: btstack_type 1
3707  */
3708 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){
3709     return event[6];
3710 }
3711 /**
3712  * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3713  * @param event packet
3714  * @return bnip_type
3715  * @note: btstack_type 1
3716  */
3717 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){
3718     return event[7];
3719 }
3720 /**
3721  * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3722  * @param event packet
3723  * @return bnip_number
3724  * @note: btstack_type T
3725  */
3726 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){
3727     return (const char *) &event[8];
3728 }
3729 
3730 /**
3731  * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3732  * @param event packet
3733  * @return status
3734  * @note: btstack_type 1
3735  */
3736 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){
3737     return event[3];
3738 }
3739 /**
3740  * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3741  * @param event packet
3742  * @return bnip_type
3743  * @note: btstack_type 1
3744  */
3745 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){
3746     return event[4];
3747 }
3748 /**
3749  * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3750  * @param event packet
3751  * @return bnip_number
3752  * @note: btstack_type T
3753  */
3754 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){
3755     return (const char *) &event[5];
3756 }
3757 
3758 /**
3759  * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS
3760  * @param event packet
3761  * @return value
3762  * @note: btstack_type T
3763  */
3764 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){
3765     return (const char *) &event[3];
3766 }
3767 
3768 #ifdef ENABLE_BLE
3769 /**
3770  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
3771  * @param event packet
3772  * @return handle
3773  * @note: btstack_type H
3774  */
3775 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){
3776     return little_endian_read_16(event, 3);
3777 }
3778 #endif
3779 
3780 #ifdef ENABLE_BLE
3781 /**
3782  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3783  * @param event packet
3784  * @return handle
3785  * @note: btstack_type H
3786  */
3787 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){
3788     return little_endian_read_16(event, 3);
3789 }
3790 /**
3791  * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3792  * @param event packet
3793  * @return attribute_id
3794  * @note: btstack_type 2
3795  */
3796 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){
3797     return little_endian_read_16(event, 5);
3798 }
3799 /**
3800  * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3801  * @param event packet
3802  * @return text
3803  * @note: btstack_type T
3804  */
3805 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){
3806     return (const char *) &event[7];
3807 }
3808 #endif
3809 
3810 #ifdef ENABLE_BLE
3811 /**
3812  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED
3813  * @param event packet
3814  * @return handle
3815  * @note: btstack_type H
3816  */
3817 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){
3818     return little_endian_read_16(event, 3);
3819 }
3820 #endif
3821 
3822 /**
3823  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3824  * @param event packet
3825  * @return con_handle
3826  * @note: btstack_type H
3827  */
3828 static inline hci_con_handle_t avdtp_subevent_signaling_accept_get_con_handle(const uint8_t * event){
3829     return little_endian_read_16(event, 3);
3830 }
3831 /**
3832  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3833  * @param event packet
3834  * @return signal_identifier
3835  * @note: btstack_type 1
3836  */
3837 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){
3838     return event[5];
3839 }
3840 /**
3841  * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3842  * @param event packet
3843  * @return status
3844  * @note: btstack_type 1
3845  */
3846 static inline uint8_t avdtp_subevent_signaling_accept_get_status(const uint8_t * event){
3847     return event[6];
3848 }
3849 
3850 /**
3851  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_REJECT
3852  * @param event packet
3853  * @return con_handle
3854  * @note: btstack_type H
3855  */
3856 static inline hci_con_handle_t avdtp_subevent_signaling_reject_get_con_handle(const uint8_t * event){
3857     return little_endian_read_16(event, 3);
3858 }
3859 /**
3860  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT
3861  * @param event packet
3862  * @return signal_identifier
3863  * @note: btstack_type 1
3864  */
3865 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){
3866     return event[5];
3867 }
3868 
3869 /**
3870  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3871  * @param event packet
3872  * @return con_handle
3873  * @note: btstack_type H
3874  */
3875 static inline hci_con_handle_t avdtp_subevent_signaling_general_reject_get_con_handle(const uint8_t * event){
3876     return little_endian_read_16(event, 3);
3877 }
3878 /**
3879  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3880  * @param event packet
3881  * @return signal_identifier
3882  * @note: btstack_type 1
3883  */
3884 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){
3885     return event[5];
3886 }
3887 
3888 /**
3889  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3890  * @param event packet
3891  * @return con_handle
3892  * @note: btstack_type H
3893  */
3894 static inline hci_con_handle_t avdtp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){
3895     return little_endian_read_16(event, 3);
3896 }
3897 /**
3898  * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3899  * @param event packet
3900  * @param Pointer to storage for bd_addr
3901  * @note: btstack_type B
3902  */
3903 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3904     reverse_bd_addr(&event[5], bd_addr);
3905 }
3906 /**
3907  * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3908  * @param event packet
3909  * @return status
3910  * @note: btstack_type 1
3911  */
3912 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){
3913     return event[11];
3914 }
3915 
3916 
3917 /**
3918  * @brief Get field handle from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3919  * @param event packet
3920  * @return handle
3921  * @note: btstack_type H
3922  */
3923 static inline hci_con_handle_t avdtp_subevent_signaling_sep_found_get_handle(const uint8_t * event){
3924     return little_endian_read_16(event, 3);
3925 }
3926 /**
3927  * @brief Get field seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3928  * @param event packet
3929  * @return seid
3930  * @note: btstack_type 1
3931  */
3932 static inline uint8_t avdtp_subevent_signaling_sep_found_get_seid(const uint8_t * event){
3933     return event[5];
3934 }
3935 /**
3936  * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3937  * @param event packet
3938  * @return in_use
3939  * @note: btstack_type 1
3940  */
3941 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){
3942     return event[6];
3943 }
3944 /**
3945  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3946  * @param event packet
3947  * @return media_type
3948  * @note: btstack_type 1
3949  */
3950 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){
3951     return event[7];
3952 }
3953 /**
3954  * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3955  * @param event packet
3956  * @return sep_type
3957  * @note: btstack_type 1
3958  */
3959 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){
3960     return event[8];
3961 }
3962 
3963 /**
3964  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3965  * @param event packet
3966  * @return con_handle
3967  * @note: btstack_type H
3968  */
3969 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_capability_get_con_handle(const uint8_t * event){
3970     return little_endian_read_16(event, 3);
3971 }
3972 /**
3973  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3974  * @param event packet
3975  * @return media_type
3976  * @note: btstack_type 1
3977  */
3978 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){
3979     return event[5];
3980 }
3981 /**
3982  * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3983  * @param event packet
3984  * @return sampling_frequency_bitmap
3985  * @note: btstack_type 1
3986  */
3987 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){
3988     return event[6];
3989 }
3990 /**
3991  * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3992  * @param event packet
3993  * @return channel_mode_bitmap
3994  * @note: btstack_type 1
3995  */
3996 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){
3997     return event[7];
3998 }
3999 /**
4000  * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4001  * @param event packet
4002  * @return block_length_bitmap
4003  * @note: btstack_type 1
4004  */
4005 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){
4006     return event[8];
4007 }
4008 /**
4009  * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4010  * @param event packet
4011  * @return subbands_bitmap
4012  * @note: btstack_type 1
4013  */
4014 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){
4015     return event[9];
4016 }
4017 /**
4018  * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4019  * @param event packet
4020  * @return allocation_method_bitmap
4021  * @note: btstack_type 1
4022  */
4023 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){
4024     return event[10];
4025 }
4026 /**
4027  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4028  * @param event packet
4029  * @return min_bitpool_value
4030  * @note: btstack_type 1
4031  */
4032 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){
4033     return event[11];
4034 }
4035 /**
4036  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4037  * @param event packet
4038  * @return max_bitpool_value
4039  * @note: btstack_type 1
4040  */
4041 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){
4042     return event[12];
4043 }
4044 
4045 /**
4046  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4047  * @param event packet
4048  * @return con_handle
4049  * @note: btstack_type H
4050  */
4051 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_capability_get_con_handle(const uint8_t * event){
4052     return little_endian_read_16(event, 3);
4053 }
4054 /**
4055  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4056  * @param event packet
4057  * @return media_type
4058  * @note: btstack_type 1
4059  */
4060 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){
4061     return event[5];
4062 }
4063 /**
4064  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4065  * @param event packet
4066  * @return media_codec_type
4067  * @note: btstack_type 2
4068  */
4069 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){
4070     return little_endian_read_16(event, 6);
4071 }
4072 /**
4073  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4074  * @param event packet
4075  * @return media_codec_information_len
4076  * @note: btstack_type L
4077  */
4078 static inline int avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){
4079     return little_endian_read_16(event, 8);
4080 }
4081 /**
4082  * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4083  * @param event packet
4084  * @return media_codec_information
4085  * @note: btstack_type V
4086  */
4087 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){
4088     return &event[10];
4089 }
4090 
4091 /**
4092  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4093  * @param event packet
4094  * @return con_handle
4095  * @note: btstack_type H
4096  */
4097 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_con_handle(const uint8_t * event){
4098     return little_endian_read_16(event, 3);
4099 }
4100 /**
4101  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4102  * @param event packet
4103  * @return reconfigure
4104  * @note: btstack_type 1
4105  */
4106 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){
4107     return event[5];
4108 }
4109 /**
4110  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4111  * @param event packet
4112  * @return media_type
4113  * @note: btstack_type 1
4114  */
4115 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){
4116     return event[6];
4117 }
4118 /**
4119  * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4120  * @param event packet
4121  * @return sampling_frequency
4122  * @note: btstack_type 2
4123  */
4124 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){
4125     return little_endian_read_16(event, 7);
4126 }
4127 /**
4128  * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4129  * @param event packet
4130  * @return channel_mode
4131  * @note: btstack_type 1
4132  */
4133 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){
4134     return event[9];
4135 }
4136 /**
4137  * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4138  * @param event packet
4139  * @return num_channels
4140  * @note: btstack_type 1
4141  */
4142 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){
4143     return event[10];
4144 }
4145 /**
4146  * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4147  * @param event packet
4148  * @return block_length
4149  * @note: btstack_type 1
4150  */
4151 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){
4152     return event[11];
4153 }
4154 /**
4155  * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4156  * @param event packet
4157  * @return subbands
4158  * @note: btstack_type 1
4159  */
4160 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){
4161     return event[12];
4162 }
4163 /**
4164  * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4165  * @param event packet
4166  * @return allocation_method
4167  * @note: btstack_type 1
4168  */
4169 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){
4170     return event[13];
4171 }
4172 /**
4173  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4174  * @param event packet
4175  * @return min_bitpool_value
4176  * @note: btstack_type 1
4177  */
4178 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){
4179     return event[14];
4180 }
4181 /**
4182  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4183  * @param event packet
4184  * @return max_bitpool_value
4185  * @note: btstack_type 1
4186  */
4187 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){
4188     return event[15];
4189 }
4190 
4191 /**
4192  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4193  * @param event packet
4194  * @return con_handle
4195  * @note: btstack_type H
4196  */
4197 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_configuration_get_con_handle(const uint8_t * event){
4198     return little_endian_read_16(event, 3);
4199 }
4200 /**
4201  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4202  * @param event packet
4203  * @return reconfigure
4204  * @note: btstack_type 1
4205  */
4206 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){
4207     return event[5];
4208 }
4209 /**
4210  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4211  * @param event packet
4212  * @return media_type
4213  * @note: btstack_type 1
4214  */
4215 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){
4216     return event[6];
4217 }
4218 /**
4219  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4220  * @param event packet
4221  * @return media_codec_type
4222  * @note: btstack_type 2
4223  */
4224 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){
4225     return little_endian_read_16(event, 7);
4226 }
4227 /**
4228  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4229  * @param event packet
4230  * @return media_codec_information_len
4231  * @note: btstack_type L
4232  */
4233 static inline int avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){
4234     return little_endian_read_16(event, 9);
4235 }
4236 /**
4237  * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4238  * @param event packet
4239  * @return media_codec_information
4240  * @note: btstack_type V
4241  */
4242 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){
4243     return &event[11];
4244 }
4245 
4246 /**
4247  * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4248  * @param event packet
4249  * @return con_handle
4250  * @note: btstack_type H
4251  */
4252 static inline hci_con_handle_t avrcp_subevent_connection_established_get_con_handle(const uint8_t * event){
4253     return little_endian_read_16(event, 3);
4254 }
4255 /**
4256  * @brief Get field local_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4257  * @param event packet
4258  * @return local_cid
4259  * @note: btstack_type 2
4260  */
4261 static inline uint16_t avrcp_subevent_connection_established_get_local_cid(const uint8_t * event){
4262     return little_endian_read_16(event, 5);
4263 }
4264 /**
4265  * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4266  * @param event packet
4267  * @param Pointer to storage for bd_addr
4268  * @note: btstack_type B
4269  */
4270 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
4271     reverse_bd_addr(&event[7], bd_addr);
4272 }
4273 /**
4274  * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4275  * @param event packet
4276  * @return status
4277  * @note: btstack_type 1
4278  */
4279 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){
4280     return event[13];
4281 }
4282 
4283 /**
4284  * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_CLOSED
4285  * @param event packet
4286  * @return con_handle
4287  * @note: btstack_type H
4288  */
4289 static inline hci_con_handle_t avrcp_subevent_connection_closed_get_con_handle(const uint8_t * event){
4290     return little_endian_read_16(event, 3);
4291 }
4292 
4293 
4294 
4295 /* API_END */
4296 
4297 #if defined __cplusplus
4298 }
4299 #endif
4300 
4301 #endif // __BTSTACK_EVENT_H
4302