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