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