xref: /btstack/src/btstack_event.h (revision f9f2075ceac5e9dc08e9abea437e43d733a3a0ea)
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 status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2891  * @param event packet
2892  * @return status
2893  * @note: btstack_type 1
2894  */
2895 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){
2896     return event[3];
2897 }
2898 /**
2899  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2900  * @param event packet
2901  * @return connection_handle
2902  * @note: btstack_type H
2903  */
2904 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){
2905     return little_endian_read_16(event, 4);
2906 }
2907 /**
2908  * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2909  * @param event packet
2910  * @return role
2911  * @note: btstack_type 1
2912  */
2913 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){
2914     return event[6];
2915 }
2916 /**
2917  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2918  * @param event packet
2919  * @return peer_address_type
2920  * @note: btstack_type 1
2921  */
2922 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){
2923     return event[7];
2924 }
2925 /**
2926  * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2927  * @param event packet
2928  * @param Pointer to storage for peer_address
2929  * @note: btstack_type B
2930  */
2931 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){
2932     reverse_bd_addr(&event[8], peer_address);
2933 }
2934 /**
2935  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2936  * @param event packet
2937  * @return conn_interval
2938  * @note: btstack_type 2
2939  */
2940 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){
2941     return little_endian_read_16(event, 14);
2942 }
2943 /**
2944  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2945  * @param event packet
2946  * @return conn_latency
2947  * @note: btstack_type 2
2948  */
2949 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){
2950     return little_endian_read_16(event, 16);
2951 }
2952 /**
2953  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2954  * @param event packet
2955  * @return supervision_timeout
2956  * @note: btstack_type 2
2957  */
2958 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){
2959     return little_endian_read_16(event, 18);
2960 }
2961 /**
2962  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2963  * @param event packet
2964  * @return master_clock_accuracy
2965  * @note: btstack_type 1
2966  */
2967 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){
2968     return event[20];
2969 }
2970 
2971 /**
2972  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2973  * @param event packet
2974  * @return status
2975  * @note: btstack_type 1
2976  */
2977 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){
2978     return event[3];
2979 }
2980 /**
2981  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2982  * @param event packet
2983  * @return connection_handle
2984  * @note: btstack_type H
2985  */
2986 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){
2987     return little_endian_read_16(event, 4);
2988 }
2989 /**
2990  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2991  * @param event packet
2992  * @return conn_interval
2993  * @note: btstack_type 2
2994  */
2995 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){
2996     return little_endian_read_16(event, 6);
2997 }
2998 /**
2999  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
3000  * @param event packet
3001  * @return conn_latency
3002  * @note: btstack_type 2
3003  */
3004 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){
3005     return little_endian_read_16(event, 8);
3006 }
3007 /**
3008  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
3009  * @param event packet
3010  * @return supervision_timeout
3011  * @note: btstack_type 2
3012  */
3013 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){
3014     return little_endian_read_16(event, 10);
3015 }
3016 
3017 /**
3018  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3019  * @param event packet
3020  * @return connection_handle
3021  * @note: btstack_type H
3022  */
3023 //  static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){
3024 //      not implemented yet
3025 //  }
3026 /**
3027  * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3028  * @param event packet
3029  * @return random_number
3030  * @note: btstack_type D
3031  */
3032 //  static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){
3033 //      not implemented yet
3034 //  }
3035 /**
3036  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3037  * @param event packet
3038  * @return encryption_diversifier
3039  * @note: btstack_type 2
3040  */
3041 //  static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){
3042 //      not implemented yet
3043 //  }
3044 
3045 /**
3046  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3047  * @param event packet
3048  * @return connection_handle
3049  * @note: btstack_type H
3050  */
3051 //  static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){
3052 //      not implemented yet
3053 //  }
3054 /**
3055  * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3056  * @param event packet
3057  * @return random_number
3058  * @note: btstack_type D
3059  */
3060 //  static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){
3061 //      not implemented yet
3062 //  }
3063 /**
3064  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3065  * @param event packet
3066  * @return encryption_diversifier
3067  * @note: btstack_type 2
3068  */
3069 //  static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){
3070 //      not implemented yet
3071 //  }
3072 
3073 /**
3074  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3075  * @param event packet
3076  * @return connection_handle
3077  * @note: btstack_type H
3078  */
3079 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){
3080     return little_endian_read_16(event, 3);
3081 }
3082 /**
3083  * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3084  * @param event packet
3085  * @return interval_min
3086  * @note: btstack_type 2
3087  */
3088 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){
3089     return little_endian_read_16(event, 5);
3090 }
3091 /**
3092  * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3093  * @param event packet
3094  * @return interval_max
3095  * @note: btstack_type 2
3096  */
3097 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){
3098     return little_endian_read_16(event, 7);
3099 }
3100 /**
3101  * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3102  * @param event packet
3103  * @return latency
3104  * @note: btstack_type 2
3105  */
3106 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){
3107     return little_endian_read_16(event, 9);
3108 }
3109 /**
3110  * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3111  * @param event packet
3112  * @return timeout
3113  * @note: btstack_type 2
3114  */
3115 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){
3116     return little_endian_read_16(event, 11);
3117 }
3118 
3119 /**
3120  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3121  * @param event packet
3122  * @return connection_handle
3123  * @note: btstack_type H
3124  */
3125 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){
3126     return little_endian_read_16(event, 3);
3127 }
3128 /**
3129  * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3130  * @param event packet
3131  * @return max_tx_octets
3132  * @note: btstack_type 2
3133  */
3134 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){
3135     return little_endian_read_16(event, 5);
3136 }
3137 /**
3138  * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3139  * @param event packet
3140  * @return max_tx_time
3141  * @note: btstack_type 2
3142  */
3143 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){
3144     return little_endian_read_16(event, 7);
3145 }
3146 /**
3147  * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3148  * @param event packet
3149  * @return max_rx_octets
3150  * @note: btstack_type 2
3151  */
3152 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){
3153     return little_endian_read_16(event, 9);
3154 }
3155 /**
3156  * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3157  * @param event packet
3158  * @return max_rx_time
3159  * @note: btstack_type 2
3160  */
3161 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){
3162     return little_endian_read_16(event, 11);
3163 }
3164 
3165 /**
3166  * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3167  * @param event packet
3168  * @return status
3169  * @note: btstack_type 1
3170  */
3171 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){
3172     return event[3];
3173 }
3174 /**
3175  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3176  * @param event packet
3177  * @param Pointer to storage for dhkey_x
3178  * @note: btstack_type Q
3179  */
3180 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3181     reverse_bytes(&event[4], dhkey_x, 32);
3182 }
3183 /**
3184  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3185  * @param event packet
3186  * @param Pointer to storage for dhkey_y
3187  * @note: btstack_type Q
3188  */
3189 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3190     reverse_bytes(&event[36], dhkey_y, 32);
3191 }
3192 
3193 /**
3194  * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3195  * @param event packet
3196  * @return status
3197  * @note: btstack_type 1
3198  */
3199 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){
3200     return event[3];
3201 }
3202 /**
3203  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3204  * @param event packet
3205  * @param Pointer to storage for dhkey_x
3206  * @note: btstack_type Q
3207  */
3208 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3209     reverse_bytes(&event[4], dhkey_x, 32);
3210 }
3211 /**
3212  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3213  * @param event packet
3214  * @param Pointer to storage for dhkey_y
3215  * @note: btstack_type Q
3216  */
3217 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3218     reverse_bytes(&event[36], dhkey_y, 32);
3219 }
3220 
3221 /**
3222  * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3223  * @param event packet
3224  * @return status
3225  * @note: btstack_type 1
3226  */
3227 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){
3228     return event[3];
3229 }
3230 /**
3231  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3232  * @param event packet
3233  * @return connection_handle
3234  * @note: btstack_type H
3235  */
3236 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){
3237     return little_endian_read_16(event, 4);
3238 }
3239 /**
3240  * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3241  * @param event packet
3242  * @return role
3243  * @note: btstack_type 1
3244  */
3245 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){
3246     return event[6];
3247 }
3248 /**
3249  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3250  * @param event packet
3251  * @return peer_address_type
3252  * @note: btstack_type 1
3253  */
3254 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){
3255     return event[7];
3256 }
3257 /**
3258  * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3259  * @param event packet
3260  * @param Pointer to storage for perr_addresss
3261  * @note: btstack_type B
3262  */
3263 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){
3264     reverse_bd_addr(&event[8], perr_addresss);
3265 }
3266 /**
3267  * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3268  * @param event packet
3269  * @param Pointer to storage for local_resolvable_private_addres
3270  * @note: btstack_type B
3271  */
3272 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){
3273     reverse_bd_addr(&event[14], local_resolvable_private_addres);
3274 }
3275 /**
3276  * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3277  * @param event packet
3278  * @param Pointer to storage for peer_resolvable_private_addres
3279  * @note: btstack_type B
3280  */
3281 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){
3282     reverse_bd_addr(&event[20], peer_resolvable_private_addres);
3283 }
3284 /**
3285  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3286  * @param event packet
3287  * @return conn_interval
3288  * @note: btstack_type 2
3289  */
3290 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){
3291     return little_endian_read_16(event, 26);
3292 }
3293 /**
3294  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3295  * @param event packet
3296  * @return conn_latency
3297  * @note: btstack_type 2
3298  */
3299 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){
3300     return little_endian_read_16(event, 28);
3301 }
3302 /**
3303  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3304  * @param event packet
3305  * @return supervision_timeout
3306  * @note: btstack_type 2
3307  */
3308 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){
3309     return little_endian_read_16(event, 30);
3310 }
3311 /**
3312  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3313  * @param event packet
3314  * @return master_clock_accuracy
3315  * @note: btstack_type 1
3316  */
3317 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){
3318     return event[32];
3319 }
3320 
3321 /**
3322  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
3323  * @param event packet
3324  * @return status
3325  * @note: btstack_type 1
3326  */
3327 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){
3328     return event[3];
3329 }
3330 
3331 /**
3332  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
3333  * @param event packet
3334  * @return status
3335  * @note: btstack_type 1
3336  */
3337 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){
3338     return event[3];
3339 }
3340 
3341 /**
3342  * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3343  * @param event packet
3344  * @return status
3345  * @note: btstack_type 1
3346  */
3347 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){
3348     return event[3];
3349 }
3350 /**
3351  * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3352  * @param event packet
3353  * @return handle
3354  * @note: btstack_type H
3355  */
3356 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
3357     return little_endian_read_16(event, 4);
3358 }
3359 
3360 /**
3361  * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
3362  * @param event packet
3363  * @return status
3364  * @note: btstack_type 1
3365  */
3366 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){
3367     return event[3];
3368 }
3369 
3370 
3371 /**
3372  * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
3373  * @param event packet
3374  * @return gain
3375  * @note: btstack_type 1
3376  */
3377 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){
3378     return event[3];
3379 }
3380 
3381 /**
3382  * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
3383  * @param event packet
3384  * @return gain
3385  * @note: btstack_type 1
3386  */
3387 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){
3388     return event[3];
3389 }
3390 
3391 /**
3392  * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND
3393  * @param event packet
3394  * @return value_length
3395  * @note: btstack_type J
3396  */
3397 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){
3398     return event[3];
3399 }
3400 /**
3401  * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND
3402  * @param event packet
3403  * @return value
3404  * @note: btstack_type V
3405  */
3406 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){
3407     return &event[4];
3408 }
3409 
3410 /**
3411  * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION
3412  * @param event packet
3413  * @return value_length
3414  * @note: btstack_type J
3415  */
3416 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){
3417     return event[3];
3418 }
3419 /**
3420  * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION
3421  * @param event packet
3422  * @return value
3423  * @note: btstack_type V
3424  */
3425 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){
3426     return &event[4];
3427 }
3428 
3429 /**
3430  * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3431  * @param event packet
3432  * @return status
3433  * @note: btstack_type 1
3434  */
3435 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){
3436     return event[3];
3437 }
3438 /**
3439  * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3440  * @param event packet
3441  * @return con_handle
3442  * @note: btstack_type H
3443  */
3444 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){
3445     return little_endian_read_16(event, 4);
3446 }
3447 /**
3448  * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3449  * @param event packet
3450  * @param Pointer to storage for bd_addr
3451  * @note: btstack_type B
3452  */
3453 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3454     reverse_bd_addr(&event[6], bd_addr);
3455 }
3456 
3457 
3458 /**
3459  * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3460  * @param event packet
3461  * @return status
3462  * @note: btstack_type 1
3463  */
3464 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
3465     return event[3];
3466 }
3467 /**
3468  * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3469  * @param event packet
3470  * @return handle
3471  * @note: btstack_type H
3472  */
3473 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
3474     return little_endian_read_16(event, 4);
3475 }
3476 /**
3477  * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3478  * @param event packet
3479  * @param Pointer to storage for bd_addr
3480  * @note: btstack_type B
3481  */
3482 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3483     reverse_bd_addr(&event[6], bd_addr);
3484 }
3485 /**
3486  * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3487  * @param event packet
3488  * @return negotiated_codec
3489  * @note: btstack_type 1
3490  */
3491 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){
3492     return event[12];
3493 }
3494 
3495 
3496 /**
3497  * @brief Get field status from event HFP_SUBEVENT_COMPLETE
3498  * @param event packet
3499  * @return status
3500  * @note: btstack_type 1
3501  */
3502 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){
3503     return event[3];
3504 }
3505 
3506 /**
3507  * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3508  * @param event packet
3509  * @return indicator_index
3510  * @note: btstack_type 1
3511  */
3512 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){
3513     return event[3];
3514 }
3515 /**
3516  * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3517  * @param event packet
3518  * @return indicator_status
3519  * @note: btstack_type 1
3520  */
3521 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){
3522     return event[4];
3523 }
3524 /**
3525  * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3526  * @param event packet
3527  * @return indicator_name
3528  * @note: btstack_type T
3529  */
3530 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){
3531     return (const char *) &event[5];
3532 }
3533 
3534 /**
3535  * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3536  * @param event packet
3537  * @return network_operator_mode
3538  * @note: btstack_type 1
3539  */
3540 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){
3541     return event[3];
3542 }
3543 /**
3544  * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3545  * @param event packet
3546  * @return network_operator_format
3547  * @note: btstack_type 1
3548  */
3549 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){
3550     return event[4];
3551 }
3552 /**
3553  * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3554  * @param event packet
3555  * @return network_operator_name
3556  * @note: btstack_type T
3557  */
3558 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){
3559     return (const char *) &event[5];
3560 }
3561 
3562 /**
3563  * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR
3564  * @param event packet
3565  * @return error
3566  * @note: btstack_type 1
3567  */
3568 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){
3569     return event[3];
3570 }
3571 
3572 
3573 
3574 
3575 /**
3576  * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
3577  * @param event packet
3578  * @return number
3579  * @note: btstack_type T
3580  */
3581 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){
3582     return (const char *) &event[3];
3583 }
3584 
3585 
3586 /**
3587  * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG
3588  * @param event packet
3589  * @return number
3590  * @note: btstack_type T
3591  */
3592 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){
3593     return (const char *) &event[3];
3594 }
3595 
3596 /**
3597  * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES
3598  * @param event packet
3599  * @return dtmf
3600  * @note: btstack_type T
3601  */
3602 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){
3603     return (const char *) &event[3];
3604 }
3605 
3606 
3607 
3608 
3609 /**
3610  * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME
3611  * @param event packet
3612  * @return status
3613  * @note: btstack_type 1
3614  */
3615 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){
3616     return event[3];
3617 }
3618 /**
3619  * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME
3620  * @param event packet
3621  * @return gain
3622  * @note: btstack_type 1
3623  */
3624 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){
3625     return event[4];
3626 }
3627 
3628 /**
3629  * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME
3630  * @param event packet
3631  * @return status
3632  * @note: btstack_type 1
3633  */
3634 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){
3635     return event[3];
3636 }
3637 /**
3638  * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME
3639  * @param event packet
3640  * @return gain
3641  * @note: btstack_type 1
3642  */
3643 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){
3644     return event[4];
3645 }
3646 
3647 /**
3648  * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3649  * @param event packet
3650  * @return type
3651  * @note: btstack_type 1
3652  */
3653 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){
3654     return event[3];
3655 }
3656 /**
3657  * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3658  * @param event packet
3659  * @return number
3660  * @note: btstack_type T
3661  */
3662 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){
3663     return (const char *) &event[4];
3664 }
3665 
3666 /**
3667  * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3668  * @param event packet
3669  * @return type
3670  * @note: btstack_type 1
3671  */
3672 static inline uint8_t hfp_subevent_calling_line_indetification_notification_get_type(const uint8_t * event){
3673     return event[3];
3674 }
3675 /**
3676  * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3677  * @param event packet
3678  * @return number
3679  * @note: btstack_type T
3680  */
3681 static inline const char * hfp_subevent_calling_line_indetification_notification_get_number(const uint8_t * event){
3682     return (const char *) &event[4];
3683 }
3684 
3685 /**
3686  * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3687  * @param event packet
3688  * @return clcc_idx
3689  * @note: btstack_type 1
3690  */
3691 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){
3692     return event[3];
3693 }
3694 /**
3695  * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3696  * @param event packet
3697  * @return clcc_dir
3698  * @note: btstack_type 1
3699  */
3700 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){
3701     return event[4];
3702 }
3703 /**
3704  * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3705  * @param event packet
3706  * @return clcc_status
3707  * @note: btstack_type 1
3708  */
3709 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){
3710     return event[5];
3711 }
3712 /**
3713  * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3714  * @param event packet
3715  * @return clcc_mpty
3716  * @note: btstack_type 1
3717  */
3718 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){
3719     return event[6];
3720 }
3721 /**
3722  * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3723  * @param event packet
3724  * @return bnip_type
3725  * @note: btstack_type 1
3726  */
3727 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){
3728     return event[7];
3729 }
3730 /**
3731  * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3732  * @param event packet
3733  * @return bnip_number
3734  * @note: btstack_type T
3735  */
3736 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){
3737     return (const char *) &event[8];
3738 }
3739 
3740 /**
3741  * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3742  * @param event packet
3743  * @return status
3744  * @note: btstack_type 1
3745  */
3746 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){
3747     return event[3];
3748 }
3749 /**
3750  * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3751  * @param event packet
3752  * @return bnip_type
3753  * @note: btstack_type 1
3754  */
3755 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){
3756     return event[4];
3757 }
3758 /**
3759  * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3760  * @param event packet
3761  * @return bnip_number
3762  * @note: btstack_type T
3763  */
3764 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){
3765     return (const char *) &event[5];
3766 }
3767 
3768 /**
3769  * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS
3770  * @param event packet
3771  * @return value
3772  * @note: btstack_type T
3773  */
3774 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){
3775     return (const char *) &event[3];
3776 }
3777 
3778 #ifdef ENABLE_BLE
3779 /**
3780  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
3781  * @param event packet
3782  * @return handle
3783  * @note: btstack_type H
3784  */
3785 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){
3786     return little_endian_read_16(event, 3);
3787 }
3788 #endif
3789 
3790 #ifdef ENABLE_BLE
3791 /**
3792  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3793  * @param event packet
3794  * @return handle
3795  * @note: btstack_type H
3796  */
3797 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){
3798     return little_endian_read_16(event, 3);
3799 }
3800 /**
3801  * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3802  * @param event packet
3803  * @return attribute_id
3804  * @note: btstack_type 2
3805  */
3806 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){
3807     return little_endian_read_16(event, 5);
3808 }
3809 /**
3810  * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3811  * @param event packet
3812  * @return text
3813  * @note: btstack_type T
3814  */
3815 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){
3816     return (const char *) &event[7];
3817 }
3818 #endif
3819 
3820 #ifdef ENABLE_BLE
3821 /**
3822  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED
3823  * @param event packet
3824  * @return handle
3825  * @note: btstack_type H
3826  */
3827 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){
3828     return little_endian_read_16(event, 3);
3829 }
3830 #endif
3831 
3832 /**
3833  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3834  * @param event packet
3835  * @return con_handle
3836  * @note: btstack_type H
3837  */
3838 static inline hci_con_handle_t avdtp_subevent_signaling_accept_get_con_handle(const uint8_t * event){
3839     return little_endian_read_16(event, 3);
3840 }
3841 /**
3842  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3843  * @param event packet
3844  * @return signal_identifier
3845  * @note: btstack_type 1
3846  */
3847 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){
3848     return event[5];
3849 }
3850 /**
3851  * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3852  * @param event packet
3853  * @return status
3854  * @note: btstack_type 1
3855  */
3856 static inline uint8_t avdtp_subevent_signaling_accept_get_status(const uint8_t * event){
3857     return event[6];
3858 }
3859 
3860 /**
3861  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_REJECT
3862  * @param event packet
3863  * @return con_handle
3864  * @note: btstack_type H
3865  */
3866 static inline hci_con_handle_t avdtp_subevent_signaling_reject_get_con_handle(const uint8_t * event){
3867     return little_endian_read_16(event, 3);
3868 }
3869 /**
3870  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT
3871  * @param event packet
3872  * @return signal_identifier
3873  * @note: btstack_type 1
3874  */
3875 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){
3876     return event[5];
3877 }
3878 
3879 /**
3880  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3881  * @param event packet
3882  * @return con_handle
3883  * @note: btstack_type H
3884  */
3885 static inline hci_con_handle_t avdtp_subevent_signaling_general_reject_get_con_handle(const uint8_t * event){
3886     return little_endian_read_16(event, 3);
3887 }
3888 /**
3889  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3890  * @param event packet
3891  * @return signal_identifier
3892  * @note: btstack_type 1
3893  */
3894 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){
3895     return event[5];
3896 }
3897 
3898 /**
3899  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3900  * @param event packet
3901  * @return con_handle
3902  * @note: btstack_type H
3903  */
3904 static inline hci_con_handle_t avdtp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){
3905     return little_endian_read_16(event, 3);
3906 }
3907 /**
3908  * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3909  * @param event packet
3910  * @param Pointer to storage for bd_addr
3911  * @note: btstack_type B
3912  */
3913 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3914     reverse_bd_addr(&event[5], bd_addr);
3915 }
3916 /**
3917  * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3918  * @param event packet
3919  * @return status
3920  * @note: btstack_type 1
3921  */
3922 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){
3923     return event[11];
3924 }
3925 
3926 
3927 /**
3928  * @brief Get field handle from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3929  * @param event packet
3930  * @return handle
3931  * @note: btstack_type H
3932  */
3933 static inline hci_con_handle_t avdtp_subevent_signaling_sep_found_get_handle(const uint8_t * event){
3934     return little_endian_read_16(event, 3);
3935 }
3936 /**
3937  * @brief Get field seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3938  * @param event packet
3939  * @return seid
3940  * @note: btstack_type 1
3941  */
3942 static inline uint8_t avdtp_subevent_signaling_sep_found_get_seid(const uint8_t * event){
3943     return event[5];
3944 }
3945 /**
3946  * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3947  * @param event packet
3948  * @return in_use
3949  * @note: btstack_type 1
3950  */
3951 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){
3952     return event[6];
3953 }
3954 /**
3955  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3956  * @param event packet
3957  * @return media_type
3958  * @note: btstack_type 1
3959  */
3960 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){
3961     return event[7];
3962 }
3963 /**
3964  * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3965  * @param event packet
3966  * @return sep_type
3967  * @note: btstack_type 1
3968  */
3969 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){
3970     return event[8];
3971 }
3972 
3973 /**
3974  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3975  * @param event packet
3976  * @return con_handle
3977  * @note: btstack_type H
3978  */
3979 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_capability_get_con_handle(const uint8_t * event){
3980     return little_endian_read_16(event, 3);
3981 }
3982 /**
3983  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3984  * @param event packet
3985  * @return media_type
3986  * @note: btstack_type 1
3987  */
3988 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){
3989     return event[5];
3990 }
3991 /**
3992  * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3993  * @param event packet
3994  * @return sampling_frequency_bitmap
3995  * @note: btstack_type 1
3996  */
3997 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){
3998     return event[6];
3999 }
4000 /**
4001  * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4002  * @param event packet
4003  * @return channel_mode_bitmap
4004  * @note: btstack_type 1
4005  */
4006 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){
4007     return event[7];
4008 }
4009 /**
4010  * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4011  * @param event packet
4012  * @return block_length_bitmap
4013  * @note: btstack_type 1
4014  */
4015 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){
4016     return event[8];
4017 }
4018 /**
4019  * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4020  * @param event packet
4021  * @return subbands_bitmap
4022  * @note: btstack_type 1
4023  */
4024 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){
4025     return event[9];
4026 }
4027 /**
4028  * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4029  * @param event packet
4030  * @return allocation_method_bitmap
4031  * @note: btstack_type 1
4032  */
4033 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){
4034     return event[10];
4035 }
4036 /**
4037  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4038  * @param event packet
4039  * @return min_bitpool_value
4040  * @note: btstack_type 1
4041  */
4042 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){
4043     return event[11];
4044 }
4045 /**
4046  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4047  * @param event packet
4048  * @return max_bitpool_value
4049  * @note: btstack_type 1
4050  */
4051 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){
4052     return event[12];
4053 }
4054 
4055 /**
4056  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4057  * @param event packet
4058  * @return con_handle
4059  * @note: btstack_type H
4060  */
4061 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_capability_get_con_handle(const uint8_t * event){
4062     return little_endian_read_16(event, 3);
4063 }
4064 /**
4065  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4066  * @param event packet
4067  * @return media_type
4068  * @note: btstack_type 1
4069  */
4070 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){
4071     return event[5];
4072 }
4073 /**
4074  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4075  * @param event packet
4076  * @return media_codec_type
4077  * @note: btstack_type 2
4078  */
4079 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){
4080     return little_endian_read_16(event, 6);
4081 }
4082 /**
4083  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4084  * @param event packet
4085  * @return media_codec_information_len
4086  * @note: btstack_type L
4087  */
4088 static inline int avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){
4089     return little_endian_read_16(event, 8);
4090 }
4091 /**
4092  * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4093  * @param event packet
4094  * @return media_codec_information
4095  * @note: btstack_type V
4096  */
4097 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){
4098     return &event[10];
4099 }
4100 
4101 /**
4102  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4103  * @param event packet
4104  * @return con_handle
4105  * @note: btstack_type H
4106  */
4107 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_con_handle(const uint8_t * event){
4108     return little_endian_read_16(event, 3);
4109 }
4110 /**
4111  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4112  * @param event packet
4113  * @return reconfigure
4114  * @note: btstack_type 1
4115  */
4116 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){
4117     return event[5];
4118 }
4119 /**
4120  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4121  * @param event packet
4122  * @return media_type
4123  * @note: btstack_type 1
4124  */
4125 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){
4126     return event[6];
4127 }
4128 /**
4129  * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4130  * @param event packet
4131  * @return sampling_frequency
4132  * @note: btstack_type 2
4133  */
4134 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){
4135     return little_endian_read_16(event, 7);
4136 }
4137 /**
4138  * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4139  * @param event packet
4140  * @return channel_mode
4141  * @note: btstack_type 1
4142  */
4143 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){
4144     return event[9];
4145 }
4146 /**
4147  * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4148  * @param event packet
4149  * @return num_channels
4150  * @note: btstack_type 1
4151  */
4152 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){
4153     return event[10];
4154 }
4155 /**
4156  * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4157  * @param event packet
4158  * @return block_length
4159  * @note: btstack_type 1
4160  */
4161 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){
4162     return event[11];
4163 }
4164 /**
4165  * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4166  * @param event packet
4167  * @return subbands
4168  * @note: btstack_type 1
4169  */
4170 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){
4171     return event[12];
4172 }
4173 /**
4174  * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4175  * @param event packet
4176  * @return allocation_method
4177  * @note: btstack_type 1
4178  */
4179 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){
4180     return event[13];
4181 }
4182 /**
4183  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4184  * @param event packet
4185  * @return min_bitpool_value
4186  * @note: btstack_type 1
4187  */
4188 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){
4189     return event[14];
4190 }
4191 /**
4192  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4193  * @param event packet
4194  * @return max_bitpool_value
4195  * @note: btstack_type 1
4196  */
4197 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){
4198     return event[15];
4199 }
4200 
4201 /**
4202  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4203  * @param event packet
4204  * @return con_handle
4205  * @note: btstack_type H
4206  */
4207 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_configuration_get_con_handle(const uint8_t * event){
4208     return little_endian_read_16(event, 3);
4209 }
4210 /**
4211  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4212  * @param event packet
4213  * @return reconfigure
4214  * @note: btstack_type 1
4215  */
4216 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){
4217     return event[5];
4218 }
4219 /**
4220  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
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_configuration_get_media_type(const uint8_t * event){
4226     return event[6];
4227 }
4228 /**
4229  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
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_configuration_get_media_codec_type(const uint8_t * event){
4235     return little_endian_read_16(event, 7);
4236 }
4237 /**
4238  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
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_configuration_get_media_codec_information_len(const uint8_t * event){
4244     return little_endian_read_16(event, 9);
4245 }
4246 /**
4247  * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
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_configuration_get_media_codec_information(const uint8_t * event){
4253     return &event[11];
4254 }
4255 
4256 /**
4257  * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4258  * @param event packet
4259  * @return con_handle
4260  * @note: btstack_type H
4261  */
4262 static inline hci_con_handle_t avrcp_subevent_connection_established_get_con_handle(const uint8_t * event){
4263     return little_endian_read_16(event, 3);
4264 }
4265 /**
4266  * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4267  * @param event packet
4268  * @return status
4269  * @note: btstack_type 1
4270  */
4271 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){
4272     return event[5];
4273 }
4274 /**
4275  * @brief Get field local_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4276  * @param event packet
4277  * @return local_cid
4278  * @note: btstack_type 2
4279  */
4280 static inline uint16_t avrcp_subevent_connection_established_get_local_cid(const uint8_t * event){
4281     return little_endian_read_16(event, 6);
4282 }
4283 /**
4284  * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
4285  * @param event packet
4286  * @param Pointer to storage for bd_addr
4287  * @note: btstack_type B
4288  */
4289 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
4290     reverse_bd_addr(&event[8], bd_addr);
4291 }
4292 
4293 /**
4294  * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_RELEASED
4295  * @param event packet
4296  * @return con_handle
4297  * @note: btstack_type H
4298  */
4299 static inline hci_con_handle_t avrcp_subevent_connection_released_get_con_handle(const uint8_t * event){
4300     return little_endian_read_16(event, 3);
4301 }
4302 
4303 /**
4304  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4305  * @param event packet
4306  * @return con_handle
4307  * @note: btstack_type H
4308  */
4309 static inline hci_con_handle_t avrcp_subevent_now_playing_info_get_con_handle(const uint8_t * event){
4310     return little_endian_read_16(event, 3);
4311 }
4312 /**
4313  * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4314  * @param event packet
4315  * @return status
4316  * @note: btstack_type 1
4317  */
4318 static inline uint8_t avrcp_subevent_now_playing_info_get_status(const uint8_t * event){
4319     return event[5];
4320 }
4321 /**
4322  * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4323  * @param event packet
4324  * @return track
4325  * @note: btstack_type 1
4326  */
4327 static inline uint8_t avrcp_subevent_now_playing_info_get_track(const uint8_t * event){
4328     return event[6];
4329 }
4330 /**
4331  * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4332  * @param event packet
4333  * @return total_tracks
4334  * @note: btstack_type 1
4335  */
4336 static inline uint8_t avrcp_subevent_now_playing_info_get_total_tracks(const uint8_t * event){
4337     return event[7];
4338 }
4339 /**
4340  * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4341  * @param event packet
4342  * @return song_length
4343  * @note: btstack_type 4
4344  */
4345 static inline uint32_t avrcp_subevent_now_playing_info_get_song_length(const uint8_t * event){
4346     return little_endian_read_32(event, 8);
4347 }
4348 /**
4349  * @brief Get field title_len from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4350  * @param event packet
4351  * @return title_len
4352  * @note: btstack_type J
4353  */
4354 static inline int avrcp_subevent_now_playing_info_get_title_len(const uint8_t * event){
4355     return event[12];
4356 }
4357 /**
4358  * @brief Get field title from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4359  * @param event packet
4360  * @return title
4361  * @note: btstack_type V
4362  */
4363 static inline const uint8_t * avrcp_subevent_now_playing_info_get_title(const uint8_t * event){
4364     return &event[13];
4365 }
4366 /**
4367  * @brief Get field artist_len from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4368  * @param event packet
4369  * @return artist_len
4370  * @note: btstack_type J
4371  */
4372 static inline int avrcp_subevent_now_playing_info_get_artist_len(const uint8_t * event){
4373     return event[13 + event[12]];
4374 }
4375 /**
4376  * @brief Get field artist from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4377  * @param event packet
4378  * @return artist
4379  * @note: btstack_type V
4380  */
4381 static inline const uint8_t * avrcp_subevent_now_playing_info_get_artist(const uint8_t * event){
4382     return &event[13 + event[12] + 1];
4383 }
4384 /**
4385  * @brief Get field album_len from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4386  * @param event packet
4387  * @return album_len
4388  * @note: btstack_type J
4389  */
4390 static inline int avrcp_subevent_now_playing_info_get_album_len(const uint8_t * event){
4391     return event[13 + event[12] + 1 + event[13 + event[12]]];
4392 }
4393 /**
4394  * @brief Get field album from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4395  * @param event packet
4396  * @return album
4397  * @note: btstack_type V
4398  */
4399 static inline const uint8_t * avrcp_subevent_now_playing_info_get_album(const uint8_t * event){
4400     return &event[13 + event[12] + 1 + event[13 + event[12]] + 1];
4401 }
4402 /**
4403  * @brief Get field genre_len from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4404  * @param event packet
4405  * @return genre_len
4406  * @note: btstack_type J
4407  */
4408 static inline int avrcp_subevent_now_playing_info_get_genre_len(const uint8_t * event){
4409     return event[13 + event[12] + 1 + event[13 + event[12]] + 1 + event[13 + event[12] + 1 + event[13 + event[12]]]];
4410 }
4411 /**
4412  * @brief Get field genre from event AVRCP_SUBEVENT_NOW_PLAYING_INFO
4413  * @param event packet
4414  * @return genre
4415  * @note: btstack_type V
4416  */
4417 static inline const uint8_t * avrcp_subevent_now_playing_info_get_genre(const uint8_t * event){
4418     return &event[13 + event[12] + 1 + event[13 + event[12]] + 1 + event[13 + event[12] + 1 + event[13 + event[12]]] + 1];
4419 }
4420 
4421 /**
4422  * @brief Get field con_handle from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE
4423  * @param event packet
4424  * @return con_handle
4425  * @note: btstack_type H
4426  */
4427 static inline hci_con_handle_t avrcp_subevent_shuffle_and_repeat_mode_get_con_handle(const uint8_t * event){
4428     return little_endian_read_16(event, 3);
4429 }
4430 /**
4431  * @brief Get field status from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE
4432  * @param event packet
4433  * @return status
4434  * @note: btstack_type 1
4435  */
4436 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_status(const uint8_t * event){
4437     return event[5];
4438 }
4439 /**
4440  * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE
4441  * @param event packet
4442  * @return repeat_mode
4443  * @note: btstack_type 1
4444  */
4445 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){
4446     return event[6];
4447 }
4448 /**
4449  * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE
4450  * @param event packet
4451  * @return shuffle_mode
4452  * @note: btstack_type 1
4453  */
4454 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){
4455     return event[7];
4456 }
4457 
4458 /**
4459  * @brief Get field con_handle from event AVRCP_SUBEVENT_PLAY_STATUS
4460  * @param event packet
4461  * @return con_handle
4462  * @note: btstack_type H
4463  */
4464 static inline hci_con_handle_t avrcp_subevent_play_status_get_con_handle(const uint8_t * event){
4465     return little_endian_read_16(event, 3);
4466 }
4467 /**
4468  * @brief Get field status from event AVRCP_SUBEVENT_PLAY_STATUS
4469  * @param event packet
4470  * @return status
4471  * @note: btstack_type 1
4472  */
4473 static inline uint8_t avrcp_subevent_play_status_get_status(const uint8_t * event){
4474     return event[5];
4475 }
4476 /**
4477  * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS
4478  * @param event packet
4479  * @return song_length
4480  * @note: btstack_type 4
4481  */
4482 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){
4483     return little_endian_read_32(event, 6);
4484 }
4485 /**
4486  * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS
4487  * @param event packet
4488  * @return song_position
4489  * @note: btstack_type 4
4490  */
4491 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){
4492     return little_endian_read_32(event, 10);
4493 }
4494 /**
4495  * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS
4496  * @param event packet
4497  * @return play_status
4498  * @note: btstack_type 1
4499  */
4500 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){
4501     return event[14];
4502 }
4503 
4504 /**
4505  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED
4506  * @param event packet
4507  * @return con_handle
4508  * @note: btstack_type H
4509  */
4510 static inline hci_con_handle_t avrcp_subevent_notification_playback_status_changed_get_con_handle(const uint8_t * event){
4511     return little_endian_read_16(event, 3);
4512 }
4513 /**
4514  * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED
4515  * @param event packet
4516  * @return status
4517  * @note: btstack_type 1
4518  */
4519 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_status(const uint8_t * event){
4520     return event[5];
4521 }
4522 /**
4523  * @brief Get field playback_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED
4524  * @param event packet
4525  * @return playback_status
4526  * @note: btstack_type 1
4527  */
4528 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_playback_status(const uint8_t * event){
4529     return event[6];
4530 }
4531 
4532 /**
4533  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED
4534  * @param event packet
4535  * @return con_handle
4536  * @note: btstack_type H
4537  */
4538 static inline hci_con_handle_t avrcp_subevent_notification_track_changed_get_con_handle(const uint8_t * event){
4539     return little_endian_read_16(event, 3);
4540 }
4541 /**
4542  * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED
4543  * @param event packet
4544  * @return status
4545  * @note: btstack_type 1
4546  */
4547 static inline uint8_t avrcp_subevent_notification_track_changed_get_status(const uint8_t * event){
4548     return event[5];
4549 }
4550 /**
4551  * @brief Get field track_status from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED
4552  * @param event packet
4553  * @return track_status
4554  * @note: btstack_type 1
4555  */
4556 static inline uint8_t avrcp_subevent_notification_track_changed_get_track_status(const uint8_t * event){
4557     return event[6];
4558 }
4559 
4560 /**
4561  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED
4562  * @param event packet
4563  * @return con_handle
4564  * @note: btstack_type H
4565  */
4566 static inline hci_con_handle_t avrcp_subevent_notification_now_playing_content_changed_get_con_handle(const uint8_t * event){
4567     return little_endian_read_16(event, 3);
4568 }
4569 /**
4570  * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED
4571  * @param event packet
4572  * @return status
4573  * @note: btstack_type 1
4574  */
4575 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_status(const uint8_t * event){
4576     return event[5];
4577 }
4578 
4579 /**
4580  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED
4581  * @param event packet
4582  * @return con_handle
4583  * @note: btstack_type H
4584  */
4585 static inline hci_con_handle_t avrcp_subevent_notification_available_players_changed_get_con_handle(const uint8_t * event){
4586     return little_endian_read_16(event, 3);
4587 }
4588 /**
4589  * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED
4590  * @param event packet
4591  * @return status
4592  * @note: btstack_type 1
4593  */
4594 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_status(const uint8_t * event){
4595     return event[5];
4596 }
4597 
4598 /**
4599  * @brief Get field con_handle from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED
4600  * @param event packet
4601  * @return con_handle
4602  * @note: btstack_type H
4603  */
4604 static inline hci_con_handle_t avrcp_subevent_notification_volume_changed_get_con_handle(const uint8_t * event){
4605     return little_endian_read_16(event, 3);
4606 }
4607 /**
4608  * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED
4609  * @param event packet
4610  * @return status
4611  * @note: btstack_type 1
4612  */
4613 static inline uint8_t avrcp_subevent_notification_volume_changed_get_status(const uint8_t * event){
4614     return event[5];
4615 }
4616 /**
4617  * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED
4618  * @param event packet
4619  * @return absolute_volume
4620  * @note: btstack_type 1
4621  */
4622 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){
4623     return event[6];
4624 }
4625 
4626 /**
4627  * @brief Get field con_handle from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE
4628  * @param event packet
4629  * @return con_handle
4630  * @note: btstack_type H
4631  */
4632 static inline hci_con_handle_t avrcp_subevent_set_absolute_volume_response_get_con_handle(const uint8_t * event){
4633     return little_endian_read_16(event, 3);
4634 }
4635 /**
4636  * @brief Get field status from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE
4637  * @param event packet
4638  * @return status
4639  * @note: btstack_type 1
4640  */
4641 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_status(const uint8_t * event){
4642     return event[5];
4643 }
4644 /**
4645  * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE
4646  * @param event packet
4647  * @return absolute_volume
4648  * @note: btstack_type 1
4649  */
4650 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){
4651     return event[6];
4652 }
4653 
4654 /**
4655  * @brief Get field con_handle from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE
4656  * @param event packet
4657  * @return con_handle
4658  * @note: btstack_type H
4659  */
4660 static inline hci_con_handle_t avrcp_subevent_enable_notification_complete_get_con_handle(const uint8_t * event){
4661     return little_endian_read_16(event, 3);
4662 }
4663 /**
4664  * @brief Get field status from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE
4665  * @param event packet
4666  * @return status
4667  * @note: btstack_type 1
4668  */
4669 static inline uint8_t avrcp_subevent_enable_notification_complete_get_status(const uint8_t * event){
4670     return event[5];
4671 }
4672 /**
4673  * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE
4674  * @param event packet
4675  * @return notification_id
4676  * @note: btstack_type 1
4677  */
4678 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){
4679     return event[6];
4680 }
4681 
4682 /**
4683  * @brief Get field con_handle from event AVRCP_SUBEVENT_OPERATION_START
4684  * @param event packet
4685  * @return con_handle
4686  * @note: btstack_type H
4687  */
4688 static inline hci_con_handle_t avrcp_subevent_operation_start_get_con_handle(const uint8_t * event){
4689     return little_endian_read_16(event, 3);
4690 }
4691 /**
4692  * @brief Get field status from event AVRCP_SUBEVENT_OPERATION_START
4693  * @param event packet
4694  * @return status
4695  * @note: btstack_type 1
4696  */
4697 static inline uint8_t avrcp_subevent_operation_start_get_status(const uint8_t * event){
4698     return event[5];
4699 }
4700 /**
4701  * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START
4702  * @param event packet
4703  * @return operation_id
4704  * @note: btstack_type 1
4705  */
4706 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){
4707     return event[6];
4708 }
4709 
4710 /**
4711  * @brief Get field con_handle from event AVRCP_SUBEVENT_OPERATION_COMPLETE
4712  * @param event packet
4713  * @return con_handle
4714  * @note: btstack_type H
4715  */
4716 static inline hci_con_handle_t avrcp_subevent_operation_complete_get_con_handle(const uint8_t * event){
4717     return little_endian_read_16(event, 3);
4718 }
4719 /**
4720  * @brief Get field status from event AVRCP_SUBEVENT_OPERATION_COMPLETE
4721  * @param event packet
4722  * @return status
4723  * @note: btstack_type 1
4724  */
4725 static inline uint8_t avrcp_subevent_operation_complete_get_status(const uint8_t * event){
4726     return event[5];
4727 }
4728 /**
4729  * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE
4730  * @param event packet
4731  * @return operation_id
4732  * @note: btstack_type 1
4733  */
4734 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){
4735     return event[6];
4736 }
4737 
4738 /**
4739  * @brief Get field con_handle from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE
4740  * @param event packet
4741  * @return con_handle
4742  * @note: btstack_type H
4743  */
4744 static inline hci_con_handle_t avrcp_subevent_player_application_value_response_get_con_handle(const uint8_t * event){
4745     return little_endian_read_16(event, 3);
4746 }
4747 /**
4748  * @brief Get field status from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE
4749  * @param event packet
4750  * @return status
4751  * @note: btstack_type 1
4752  */
4753 static inline uint8_t avrcp_subevent_player_application_value_response_get_status(const uint8_t * event){
4754     return event[5];
4755 }
4756 
4757 
4758 
4759 /* API_END */
4760 
4761 #if defined __cplusplus
4762 }
4763 #endif
4764 
4765 #endif // __BTSTACK_EVENT_H
4766