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