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