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