xref: /btstack/src/btstack_event.h (revision f12924e0a61c0582b548a1e70cea1bd59ba21f1d)
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 handle from event HCI_EVENT_SCO_CAN_SEND_NOW
948  * @param event packet
949  * @param Pointer to storage for handle
950  * @note: btstack_type B
951  */
952 static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){
953     reverse_bd_addr(&event[2], handle);
954 }
955 
956 /**
957  * @brief Get field status from event L2CAP_EVENT_CHANNEL_OPENED
958  * @param event packet
959  * @return status
960  * @note: btstack_type 1
961  */
962 static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * event){
963     return event[2];
964 }
965 /**
966  * @brief Get field address from event L2CAP_EVENT_CHANNEL_OPENED
967  * @param event packet
968  * @param Pointer to storage for address
969  * @note: btstack_type B
970  */
971 static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
972     reverse_bd_addr(&event[3], address);
973 }
974 /**
975  * @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED
976  * @param event packet
977  * @return handle
978  * @note: btstack_type H
979  */
980 static inline hci_con_handle_t l2cap_event_channel_opened_get_handle(const uint8_t * event){
981     return little_endian_read_16(event, 9);
982 }
983 /**
984  * @brief Get field psm from event L2CAP_EVENT_CHANNEL_OPENED
985  * @param event packet
986  * @return psm
987  * @note: btstack_type 2
988  */
989 static inline uint16_t l2cap_event_channel_opened_get_psm(const uint8_t * event){
990     return little_endian_read_16(event, 11);
991 }
992 /**
993  * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_OPENED
994  * @param event packet
995  * @return local_cid
996  * @note: btstack_type 2
997  */
998 static inline uint16_t l2cap_event_channel_opened_get_local_cid(const uint8_t * event){
999     return little_endian_read_16(event, 13);
1000 }
1001 /**
1002  * @brief Get field remote_cid from event L2CAP_EVENT_CHANNEL_OPENED
1003  * @param event packet
1004  * @return remote_cid
1005  * @note: btstack_type 2
1006  */
1007 static inline uint16_t l2cap_event_channel_opened_get_remote_cid(const uint8_t * event){
1008     return little_endian_read_16(event, 15);
1009 }
1010 /**
1011  * @brief Get field local_mtu from event L2CAP_EVENT_CHANNEL_OPENED
1012  * @param event packet
1013  * @return local_mtu
1014  * @note: btstack_type 2
1015  */
1016 static inline uint16_t l2cap_event_channel_opened_get_local_mtu(const uint8_t * event){
1017     return little_endian_read_16(event, 17);
1018 }
1019 /**
1020  * @brief Get field remote_mtu from event L2CAP_EVENT_CHANNEL_OPENED
1021  * @param event packet
1022  * @return remote_mtu
1023  * @note: btstack_type 2
1024  */
1025 static inline uint16_t l2cap_event_channel_opened_get_remote_mtu(const uint8_t * event){
1026     return little_endian_read_16(event, 19);
1027 }
1028 /**
1029  * @brief Get field flush_timeout from event L2CAP_EVENT_CHANNEL_OPENED
1030  * @param event packet
1031  * @return flush_timeout
1032  * @note: btstack_type 2
1033  */
1034 static inline uint16_t l2cap_event_channel_opened_get_flush_timeout(const uint8_t * event){
1035     return little_endian_read_16(event, 21);
1036 }
1037 /**
1038  * @brief Get field incoming from event L2CAP_EVENT_CHANNEL_OPENED
1039  * @param event packet
1040  * @return incoming
1041  * @note: btstack_type 1
1042  */
1043 static inline uint8_t l2cap_event_channel_opened_get_incoming(const uint8_t * event){
1044     return event[23];
1045 }
1046 
1047 /**
1048  * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED
1049  * @param event packet
1050  * @return local_cid
1051  * @note: btstack_type 2
1052  */
1053 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){
1054     return little_endian_read_16(event, 2);
1055 }
1056 
1057 /**
1058  * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION
1059  * @param event packet
1060  * @param Pointer to storage for address
1061  * @note: btstack_type B
1062  */
1063 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1064     reverse_bd_addr(&event[2], address);
1065 }
1066 /**
1067  * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION
1068  * @param event packet
1069  * @return handle
1070  * @note: btstack_type H
1071  */
1072 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){
1073     return little_endian_read_16(event, 8);
1074 }
1075 /**
1076  * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION
1077  * @param event packet
1078  * @return psm
1079  * @note: btstack_type 2
1080  */
1081 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){
1082     return little_endian_read_16(event, 10);
1083 }
1084 /**
1085  * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1086  * @param event packet
1087  * @return local_cid
1088  * @note: btstack_type 2
1089  */
1090 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){
1091     return little_endian_read_16(event, 12);
1092 }
1093 /**
1094  * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1095  * @param event packet
1096  * @return remote_cid
1097  * @note: btstack_type 2
1098  */
1099 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){
1100     return little_endian_read_16(event, 14);
1101 }
1102 
1103 /**
1104  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1105  * @param event packet
1106  * @return handle
1107  * @note: btstack_type H
1108  */
1109 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){
1110     return little_endian_read_16(event, 2);
1111 }
1112 /**
1113  * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1114  * @param event packet
1115  * @return interval_min
1116  * @note: btstack_type 2
1117  */
1118 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){
1119     return little_endian_read_16(event, 4);
1120 }
1121 /**
1122  * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1123  * @param event packet
1124  * @return interval_max
1125  * @note: btstack_type 2
1126  */
1127 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){
1128     return little_endian_read_16(event, 6);
1129 }
1130 /**
1131  * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1132  * @param event packet
1133  * @return latencey
1134  * @note: btstack_type 2
1135  */
1136 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){
1137     return little_endian_read_16(event, 8);
1138 }
1139 /**
1140  * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1141  * @param event packet
1142  * @return timeout_multiplier
1143  * @note: btstack_type 2
1144  */
1145 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){
1146     return little_endian_read_16(event, 10);
1147 }
1148 
1149 /**
1150  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE
1151  * @param event packet
1152  * @return handle
1153  * @note: btstack_type H
1154  */
1155 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){
1156     return little_endian_read_16(event, 2);
1157 }
1158 
1159 /**
1160  * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW
1161  * @param event packet
1162  * @return local_cid
1163  * @note: btstack_type 2
1164  */
1165 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){
1166     return little_endian_read_16(event, 2);
1167 }
1168 
1169 /**
1170  * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1171  * @param event packet
1172  * @return address_type
1173  * @note: btstack_type 1
1174  */
1175 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){
1176     return event[2];
1177 }
1178 /**
1179  * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1180  * @param event packet
1181  * @param Pointer to storage for address
1182  * @note: btstack_type B
1183  */
1184 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1185     reverse_bd_addr(&event[3], address);
1186 }
1187 /**
1188  * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1189  * @param event packet
1190  * @return handle
1191  * @note: btstack_type H
1192  */
1193 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){
1194     return little_endian_read_16(event, 9);
1195 }
1196 /**
1197  * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1198  * @param event packet
1199  * @return psm
1200  * @note: btstack_type 2
1201  */
1202 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){
1203     return little_endian_read_16(event, 11);
1204 }
1205 /**
1206  * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1207  * @param event packet
1208  * @return local_cid
1209  * @note: btstack_type 2
1210  */
1211 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){
1212     return little_endian_read_16(event, 13);
1213 }
1214 /**
1215  * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1216  * @param event packet
1217  * @return remote_cid
1218  * @note: btstack_type 2
1219  */
1220 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){
1221     return little_endian_read_16(event, 15);
1222 }
1223 /**
1224  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1225  * @param event packet
1226  * @return remote_mtu
1227  * @note: btstack_type 2
1228  */
1229 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){
1230     return little_endian_read_16(event, 17);
1231 }
1232 
1233 /**
1234  * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED
1235  * @param event packet
1236  * @return status
1237  * @note: btstack_type 1
1238  */
1239 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){
1240     return event[2];
1241 }
1242 /**
1243  * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED
1244  * @param event packet
1245  * @return address_type
1246  * @note: btstack_type 1
1247  */
1248 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){
1249     return event[3];
1250 }
1251 /**
1252  * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED
1253  * @param event packet
1254  * @param Pointer to storage for address
1255  * @note: btstack_type B
1256  */
1257 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
1258     reverse_bd_addr(&event[4], address);
1259 }
1260 /**
1261  * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED
1262  * @param event packet
1263  * @return handle
1264  * @note: btstack_type H
1265  */
1266 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){
1267     return little_endian_read_16(event, 10);
1268 }
1269 /**
1270  * @brief Get field incoming from event L2CAP_EVENT_LE_CHANNEL_OPENED
1271  * @param event packet
1272  * @return incoming
1273  * @note: btstack_type 1
1274  */
1275 static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){
1276     return event[12];
1277 }
1278 /**
1279  * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED
1280  * @param event packet
1281  * @return psm
1282  * @note: btstack_type 2
1283  */
1284 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){
1285     return little_endian_read_16(event, 13);
1286 }
1287 /**
1288  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1289  * @param event packet
1290  * @return local_cid
1291  * @note: btstack_type 2
1292  */
1293 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){
1294     return little_endian_read_16(event, 15);
1295 }
1296 /**
1297  * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1298  * @param event packet
1299  * @return remote_cid
1300  * @note: btstack_type 2
1301  */
1302 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){
1303     return little_endian_read_16(event, 17);
1304 }
1305 /**
1306  * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1307  * @param event packet
1308  * @return local_mtu
1309  * @note: btstack_type 2
1310  */
1311 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){
1312     return little_endian_read_16(event, 19);
1313 }
1314 /**
1315  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1316  * @param event packet
1317  * @return remote_mtu
1318  * @note: btstack_type 2
1319  */
1320 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){
1321     return little_endian_read_16(event, 21);
1322 }
1323 
1324 /**
1325  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED
1326  * @param event packet
1327  * @return local_cid
1328  * @note: btstack_type 2
1329  */
1330 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){
1331     return little_endian_read_16(event, 2);
1332 }
1333 
1334 /**
1335  * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW
1336  * @param event packet
1337  * @return local_cid
1338  * @note: btstack_type 2
1339  */
1340 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){
1341     return little_endian_read_16(event, 2);
1342 }
1343 
1344 /**
1345  * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT
1346  * @param event packet
1347  * @return local_cid
1348  * @note: btstack_type 2
1349  */
1350 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){
1351     return little_endian_read_16(event, 2);
1352 }
1353 
1354 /**
1355  * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED
1356  * @param event packet
1357  * @return status
1358  * @note: btstack_type 1
1359  */
1360 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){
1361     return event[2];
1362 }
1363 /**
1364  * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED
1365  * @param event packet
1366  * @param Pointer to storage for bd_addr
1367  * @note: btstack_type B
1368  */
1369 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1370     reverse_bd_addr(&event[3], bd_addr);
1371 }
1372 /**
1373  * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED
1374  * @param event packet
1375  * @return con_handle
1376  * @note: btstack_type 2
1377  */
1378 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){
1379     return little_endian_read_16(event, 9);
1380 }
1381 /**
1382  * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED
1383  * @param event packet
1384  * @return server_channel
1385  * @note: btstack_type 1
1386  */
1387 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){
1388     return event[11];
1389 }
1390 /**
1391  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED
1392  * @param event packet
1393  * @return rfcomm_cid
1394  * @note: btstack_type 2
1395  */
1396 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){
1397     return little_endian_read_16(event, 12);
1398 }
1399 /**
1400  * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED
1401  * @param event packet
1402  * @return max_frame_size
1403  * @note: btstack_type 2
1404  */
1405 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){
1406     return little_endian_read_16(event, 14);
1407 }
1408 /**
1409  * @brief Get field incoming from event RFCOMM_EVENT_CHANNEL_OPENED
1410  * @param event packet
1411  * @return incoming
1412  * @note: btstack_type 1
1413  */
1414 static inline uint8_t rfcomm_event_channel_opened_get_incoming(const uint8_t * event){
1415     return event[16];
1416 }
1417 
1418 /**
1419  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED
1420  * @param event packet
1421  * @return rfcomm_cid
1422  * @note: btstack_type 2
1423  */
1424 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){
1425     return little_endian_read_16(event, 2);
1426 }
1427 
1428 /**
1429  * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION
1430  * @param event packet
1431  * @param Pointer to storage for bd_addr
1432  * @note: btstack_type B
1433  */
1434 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1435     reverse_bd_addr(&event[2], bd_addr);
1436 }
1437 /**
1438  * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION
1439  * @param event packet
1440  * @return server_channel
1441  * @note: btstack_type 1
1442  */
1443 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){
1444     return event[8];
1445 }
1446 /**
1447  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION
1448  * @param event packet
1449  * @return rfcomm_cid
1450  * @note: btstack_type 2
1451  */
1452 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){
1453     return little_endian_read_16(event, 9);
1454 }
1455 
1456 /**
1457  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1458  * @param event packet
1459  * @return rfcomm_cid
1460  * @note: btstack_type 2
1461  */
1462 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){
1463     return little_endian_read_16(event, 2);
1464 }
1465 /**
1466  * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1467  * @param event packet
1468  * @return line_status
1469  * @note: btstack_type 1
1470  */
1471 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){
1472     return event[4];
1473 }
1474 
1475 /**
1476  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1477  * @param event packet
1478  * @return rfcomm_cid
1479  * @note: btstack_type 2
1480  */
1481 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){
1482     return little_endian_read_16(event, 2);
1483 }
1484 /**
1485  * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1486  * @param event packet
1487  * @return modem_status
1488  * @note: btstack_type 1
1489  */
1490 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){
1491     return event[4];
1492 }
1493 
1494 /**
1495  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW
1496  * @param event packet
1497  * @return rfcomm_cid
1498  * @note: btstack_type 2
1499  */
1500 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){
1501     return little_endian_read_16(event, 2);
1502 }
1503 
1504 /**
1505  * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE
1506  * @param event packet
1507  * @return status
1508  * @note: btstack_type 1
1509  */
1510 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){
1511     return event[2];
1512 }
1513 
1514 /**
1515  * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1516  * @param event packet
1517  * @return rfcomm_channel
1518  * @note: btstack_type 1
1519  */
1520 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){
1521     return event[2];
1522 }
1523 /**
1524  * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1525  * @param event packet
1526  * @return name
1527  * @note: btstack_type T
1528  */
1529 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){
1530     return (const char *) &event[3];
1531 }
1532 
1533 /**
1534  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1535  * @param event packet
1536  * @return record_id
1537  * @note: btstack_type 2
1538  */
1539 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){
1540     return little_endian_read_16(event, 2);
1541 }
1542 /**
1543  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1544  * @param event packet
1545  * @return attribute_id
1546  * @note: btstack_type 2
1547  */
1548 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){
1549     return little_endian_read_16(event, 4);
1550 }
1551 /**
1552  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1553  * @param event packet
1554  * @return attribute_length
1555  * @note: btstack_type 2
1556  */
1557 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){
1558     return little_endian_read_16(event, 6);
1559 }
1560 /**
1561  * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1562  * @param event packet
1563  * @return data_offset
1564  * @note: btstack_type 2
1565  */
1566 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){
1567     return little_endian_read_16(event, 8);
1568 }
1569 /**
1570  * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1571  * @param event packet
1572  * @return data
1573  * @note: btstack_type 1
1574  */
1575 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){
1576     return event[10];
1577 }
1578 
1579 /**
1580  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1581  * @param event packet
1582  * @return record_id
1583  * @note: btstack_type 2
1584  */
1585 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){
1586     return little_endian_read_16(event, 2);
1587 }
1588 /**
1589  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1590  * @param event packet
1591  * @return attribute_id
1592  * @note: btstack_type 2
1593  */
1594 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){
1595     return little_endian_read_16(event, 4);
1596 }
1597 /**
1598  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1599  * @param event packet
1600  * @return attribute_length
1601  * @note: btstack_type L
1602  */
1603 static inline int sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){
1604     return little_endian_read_16(event, 6);
1605 }
1606 /**
1607  * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1608  * @param event packet
1609  * @return attribute_value
1610  * @note: btstack_type V
1611  */
1612 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){
1613     return &event[8];
1614 }
1615 
1616 /**
1617  * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1618  * @param event packet
1619  * @return total_count
1620  * @note: btstack_type 2
1621  */
1622 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){
1623     return little_endian_read_16(event, 2);
1624 }
1625 /**
1626  * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1627  * @param event packet
1628  * @return record_index
1629  * @note: btstack_type 2
1630  */
1631 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){
1632     return little_endian_read_16(event, 4);
1633 }
1634 /**
1635  * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1636  * @param event packet
1637  * @return record_handle
1638  * @note: btstack_type 4
1639  */
1640 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){
1641     return little_endian_read_32(event, 6);
1642 }
1643 
1644 #ifdef ENABLE_BLE
1645 /**
1646  * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE
1647  * @param event packet
1648  * @return handle
1649  * @note: btstack_type H
1650  */
1651 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){
1652     return little_endian_read_16(event, 2);
1653 }
1654 /**
1655  * @brief Get field status from event GATT_EVENT_QUERY_COMPLETE
1656  * @param event packet
1657  * @return status
1658  * @note: btstack_type 1
1659  */
1660 static inline uint8_t gatt_event_query_complete_get_status(const uint8_t * event){
1661     return event[4];
1662 }
1663 #endif
1664 
1665 #ifdef ENABLE_BLE
1666 /**
1667  * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT
1668  * @param event packet
1669  * @return handle
1670  * @note: btstack_type H
1671  */
1672 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){
1673     return little_endian_read_16(event, 2);
1674 }
1675 /**
1676  * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT
1677  * @param event packet
1678  * @param Pointer to storage for service
1679  * @note: btstack_type X
1680  */
1681 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1682     gatt_client_deserialize_service(event, 4, service);
1683 }
1684 #endif
1685 
1686 #ifdef ENABLE_BLE
1687 /**
1688  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1689  * @param event packet
1690  * @return handle
1691  * @note: btstack_type H
1692  */
1693 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){
1694     return little_endian_read_16(event, 2);
1695 }
1696 /**
1697  * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1698  * @param event packet
1699  * @param Pointer to storage for characteristic
1700  * @note: btstack_type Y
1701  */
1702 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){
1703     gatt_client_deserialize_characteristic(event, 4, characteristic);
1704 }
1705 #endif
1706 
1707 #ifdef ENABLE_BLE
1708 /**
1709  * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1710  * @param event packet
1711  * @return handle
1712  * @note: btstack_type H
1713  */
1714 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){
1715     return little_endian_read_16(event, 2);
1716 }
1717 /**
1718  * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1719  * @param event packet
1720  * @return include_handle
1721  * @note: btstack_type 2
1722  */
1723 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){
1724     return little_endian_read_16(event, 4);
1725 }
1726 /**
1727  * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1728  * @param event packet
1729  * @param Pointer to storage for service
1730  * @note: btstack_type X
1731  */
1732 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1733     gatt_client_deserialize_service(event, 6, service);
1734 }
1735 #endif
1736 
1737 #ifdef ENABLE_BLE
1738 /**
1739  * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1740  * @param event packet
1741  * @return handle
1742  * @note: btstack_type H
1743  */
1744 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){
1745     return little_endian_read_16(event, 2);
1746 }
1747 /**
1748  * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1749  * @param event packet
1750  * @param Pointer to storage for characteristic_descriptor
1751  * @note: btstack_type Z
1752  */
1753 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){
1754     gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor);
1755 }
1756 #endif
1757 
1758 #ifdef ENABLE_BLE
1759 /**
1760  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1761  * @param event packet
1762  * @return handle
1763  * @note: btstack_type H
1764  */
1765 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){
1766     return little_endian_read_16(event, 2);
1767 }
1768 /**
1769  * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1770  * @param event packet
1771  * @return value_handle
1772  * @note: btstack_type 2
1773  */
1774 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1775     return little_endian_read_16(event, 4);
1776 }
1777 /**
1778  * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1779  * @param event packet
1780  * @return value_length
1781  * @note: btstack_type L
1782  */
1783 static inline int gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){
1784     return little_endian_read_16(event, 6);
1785 }
1786 /**
1787  * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1788  * @param event packet
1789  * @return value
1790  * @note: btstack_type V
1791  */
1792 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){
1793     return &event[8];
1794 }
1795 #endif
1796 
1797 #ifdef ENABLE_BLE
1798 /**
1799  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1800  * @param event packet
1801  * @return handle
1802  * @note: btstack_type H
1803  */
1804 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){
1805     return little_endian_read_16(event, 2);
1806 }
1807 /**
1808  * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1809  * @param event packet
1810  * @return value_handle
1811  * @note: btstack_type 2
1812  */
1813 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1814     return little_endian_read_16(event, 4);
1815 }
1816 /**
1817  * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1818  * @param event packet
1819  * @return value_offset
1820  * @note: btstack_type 2
1821  */
1822 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){
1823     return little_endian_read_16(event, 6);
1824 }
1825 /**
1826  * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1827  * @param event packet
1828  * @return value_length
1829  * @note: btstack_type L
1830  */
1831 static inline int gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){
1832     return little_endian_read_16(event, 8);
1833 }
1834 /**
1835  * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1836  * @param event packet
1837  * @return value
1838  * @note: btstack_type V
1839  */
1840 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){
1841     return &event[10];
1842 }
1843 #endif
1844 
1845 #ifdef ENABLE_BLE
1846 /**
1847  * @brief Get field handle from event GATT_EVENT_NOTIFICATION
1848  * @param event packet
1849  * @return handle
1850  * @note: btstack_type H
1851  */
1852 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){
1853     return little_endian_read_16(event, 2);
1854 }
1855 /**
1856  * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION
1857  * @param event packet
1858  * @return value_handle
1859  * @note: btstack_type 2
1860  */
1861 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){
1862     return little_endian_read_16(event, 4);
1863 }
1864 /**
1865  * @brief Get field value_length from event GATT_EVENT_NOTIFICATION
1866  * @param event packet
1867  * @return value_length
1868  * @note: btstack_type L
1869  */
1870 static inline int gatt_event_notification_get_value_length(const uint8_t * event){
1871     return little_endian_read_16(event, 6);
1872 }
1873 /**
1874  * @brief Get field value from event GATT_EVENT_NOTIFICATION
1875  * @param event packet
1876  * @return value
1877  * @note: btstack_type V
1878  */
1879 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){
1880     return &event[8];
1881 }
1882 #endif
1883 
1884 #ifdef ENABLE_BLE
1885 /**
1886  * @brief Get field handle from event GATT_EVENT_INDICATION
1887  * @param event packet
1888  * @return handle
1889  * @note: btstack_type H
1890  */
1891 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){
1892     return little_endian_read_16(event, 2);
1893 }
1894 /**
1895  * @brief Get field value_handle from event GATT_EVENT_INDICATION
1896  * @param event packet
1897  * @return value_handle
1898  * @note: btstack_type 2
1899  */
1900 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){
1901     return little_endian_read_16(event, 4);
1902 }
1903 /**
1904  * @brief Get field value_length from event GATT_EVENT_INDICATION
1905  * @param event packet
1906  * @return value_length
1907  * @note: btstack_type L
1908  */
1909 static inline int gatt_event_indication_get_value_length(const uint8_t * event){
1910     return little_endian_read_16(event, 6);
1911 }
1912 /**
1913  * @brief Get field value from event GATT_EVENT_INDICATION
1914  * @param event packet
1915  * @return value
1916  * @note: btstack_type V
1917  */
1918 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){
1919     return &event[8];
1920 }
1921 #endif
1922 
1923 #ifdef ENABLE_BLE
1924 /**
1925  * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1926  * @param event packet
1927  * @return descriptor_handle
1928  * @note: btstack_type H
1929  */
1930 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){
1931     return little_endian_read_16(event, 2);
1932 }
1933 /**
1934  * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1935  * @param event packet
1936  * @return descriptor_length
1937  * @note: btstack_type 2
1938  */
1939 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1940     return little_endian_read_16(event, 4);
1941 }
1942 /**
1943  * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1944  * @param event packet
1945  * @return descriptor
1946  * @note: btstack_type L
1947  */
1948 static inline int gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
1949     return little_endian_read_16(event, 6);
1950 }
1951 #endif
1952 
1953 #ifdef ENABLE_BLE
1954 /**
1955  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1956  * @param event packet
1957  * @return handle
1958  * @note: btstack_type H
1959  */
1960 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){
1961     return little_endian_read_16(event, 2);
1962 }
1963 /**
1964  * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1965  * @param event packet
1966  * @return descriptor_offset
1967  * @note: btstack_type 2
1968  */
1969 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){
1970     return little_endian_read_16(event, 4);
1971 }
1972 /**
1973  * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1974  * @param event packet
1975  * @return descriptor_length
1976  * @note: btstack_type L
1977  */
1978 static inline int gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1979     return little_endian_read_16(event, 6);
1980 }
1981 /**
1982  * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1983  * @param event packet
1984  * @return descriptor
1985  * @note: btstack_type V
1986  */
1987 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
1988     return &event[8];
1989 }
1990 #endif
1991 
1992 #ifdef ENABLE_BLE
1993 /**
1994  * @brief Get field handle from event GATT_EVENT_MTU
1995  * @param event packet
1996  * @return handle
1997  * @note: btstack_type H
1998  */
1999 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){
2000     return little_endian_read_16(event, 2);
2001 }
2002 /**
2003  * @brief Get field MTU from event GATT_EVENT_MTU
2004  * @param event packet
2005  * @return MTU
2006  * @note: btstack_type 2
2007  */
2008 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){
2009     return little_endian_read_16(event, 4);
2010 }
2011 #endif
2012 
2013 /**
2014  * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
2015  * @param event packet
2016  * @return handle
2017  * @note: btstack_type H
2018  */
2019 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){
2020     return little_endian_read_16(event, 2);
2021 }
2022 /**
2023  * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
2024  * @param event packet
2025  * @return MTU
2026  * @note: btstack_type 2
2027  */
2028 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){
2029     return little_endian_read_16(event, 4);
2030 }
2031 
2032 /**
2033  * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2034  * @param event packet
2035  * @return status
2036  * @note: btstack_type 1
2037  */
2038 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){
2039     return event[2];
2040 }
2041 /**
2042  * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2043  * @param event packet
2044  * @return conn_handle
2045  * @note: btstack_type H
2046  */
2047 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){
2048     return little_endian_read_16(event, 3);
2049 }
2050 /**
2051  * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2052  * @param event packet
2053  * @return attribute_handle
2054  * @note: btstack_type 2
2055  */
2056 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){
2057     return little_endian_read_16(event, 5);
2058 }
2059 
2060 
2061 /**
2062  * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED
2063  * @param event packet
2064  * @return status
2065  * @note: btstack_type 1
2066  */
2067 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){
2068     return event[2];
2069 }
2070 /**
2071  * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED
2072  * @param event packet
2073  * @return service_uuid
2074  * @note: btstack_type 2
2075  */
2076 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){
2077     return little_endian_read_16(event, 3);
2078 }
2079 
2080 /**
2081  * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED
2082  * @param event packet
2083  * @return status
2084  * @note: btstack_type 1
2085  */
2086 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){
2087     return event[2];
2088 }
2089 /**
2090  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED
2091  * @param event packet
2092  * @return bnep_cid
2093  * @note: btstack_type 2
2094  */
2095 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){
2096     return little_endian_read_16(event, 3);
2097 }
2098 /**
2099  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED
2100  * @param event packet
2101  * @return source_uuid
2102  * @note: btstack_type 2
2103  */
2104 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){
2105     return little_endian_read_16(event, 5);
2106 }
2107 /**
2108  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED
2109  * @param event packet
2110  * @return destination_uuid
2111  * @note: btstack_type 2
2112  */
2113 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){
2114     return little_endian_read_16(event, 7);
2115 }
2116 /**
2117  * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED
2118  * @param event packet
2119  * @return mtu
2120  * @note: btstack_type 2
2121  */
2122 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){
2123     return little_endian_read_16(event, 9);
2124 }
2125 /**
2126  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED
2127  * @param event packet
2128  * @param Pointer to storage for remote_address
2129  * @note: btstack_type B
2130  */
2131 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2132     reverse_bd_addr(&event[11], remote_address);
2133 }
2134 
2135 /**
2136  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED
2137  * @param event packet
2138  * @return bnep_cid
2139  * @note: btstack_type 2
2140  */
2141 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){
2142     return little_endian_read_16(event, 2);
2143 }
2144 /**
2145  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2146  * @param event packet
2147  * @return source_uuid
2148  * @note: btstack_type 2
2149  */
2150 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){
2151     return little_endian_read_16(event, 4);
2152 }
2153 /**
2154  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2155  * @param event packet
2156  * @return destination_uuid
2157  * @note: btstack_type 2
2158  */
2159 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){
2160     return little_endian_read_16(event, 6);
2161 }
2162 /**
2163  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED
2164  * @param event packet
2165  * @param Pointer to storage for remote_address
2166  * @note: btstack_type B
2167  */
2168 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2169     reverse_bd_addr(&event[8], remote_address);
2170 }
2171 
2172 /**
2173  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT
2174  * @param event packet
2175  * @return bnep_cid
2176  * @note: btstack_type 2
2177  */
2178 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){
2179     return little_endian_read_16(event, 2);
2180 }
2181 /**
2182  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2183  * @param event packet
2184  * @return source_uuid
2185  * @note: btstack_type 2
2186  */
2187 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){
2188     return little_endian_read_16(event, 4);
2189 }
2190 /**
2191  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2192  * @param event packet
2193  * @return destination_uuid
2194  * @note: btstack_type 2
2195  */
2196 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){
2197     return little_endian_read_16(event, 6);
2198 }
2199 /**
2200  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT
2201  * @param event packet
2202  * @param Pointer to storage for remote_address
2203  * @note: btstack_type B
2204  */
2205 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2206     reverse_bd_addr(&event[8], remote_address);
2207 }
2208 /**
2209  * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT
2210  * @param event packet
2211  * @return channel_state
2212  * @note: btstack_type 1
2213  */
2214 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){
2215     return event[14];
2216 }
2217 
2218 /**
2219  * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW
2220  * @param event packet
2221  * @return bnep_cid
2222  * @note: btstack_type 2
2223  */
2224 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){
2225     return little_endian_read_16(event, 2);
2226 }
2227 /**
2228  * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW
2229  * @param event packet
2230  * @return source_uuid
2231  * @note: btstack_type 2
2232  */
2233 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){
2234     return little_endian_read_16(event, 4);
2235 }
2236 /**
2237  * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW
2238  * @param event packet
2239  * @return destination_uuid
2240  * @note: btstack_type 2
2241  */
2242 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){
2243     return little_endian_read_16(event, 6);
2244 }
2245 /**
2246  * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW
2247  * @param event packet
2248  * @param Pointer to storage for remote_address
2249  * @note: btstack_type B
2250  */
2251 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2252     reverse_bd_addr(&event[8], remote_address);
2253 }
2254 
2255 #ifdef ENABLE_BLE
2256 /**
2257  * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST
2258  * @param event packet
2259  * @return handle
2260  * @note: btstack_type H
2261  */
2262 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){
2263     return little_endian_read_16(event, 2);
2264 }
2265 /**
2266  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST
2267  * @param event packet
2268  * @return addr_type
2269  * @note: btstack_type 1
2270  */
2271 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){
2272     return event[4];
2273 }
2274 /**
2275  * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST
2276  * @param event packet
2277  * @param Pointer to storage for address
2278  * @note: btstack_type B
2279  */
2280 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){
2281     reverse_bd_addr(&event[5], address);
2282 }
2283 #endif
2284 
2285 #ifdef ENABLE_BLE
2286 /**
2287  * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL
2288  * @param event packet
2289  * @return handle
2290  * @note: btstack_type H
2291  */
2292 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){
2293     return little_endian_read_16(event, 2);
2294 }
2295 /**
2296  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL
2297  * @param event packet
2298  * @return addr_type
2299  * @note: btstack_type 1
2300  */
2301 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){
2302     return event[4];
2303 }
2304 /**
2305  * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL
2306  * @param event packet
2307  * @param Pointer to storage for address
2308  * @note: btstack_type B
2309  */
2310 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){
2311     reverse_bd_addr(&event[5], address);
2312 }
2313 #endif
2314 
2315 #ifdef ENABLE_BLE
2316 /**
2317  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2318  * @param event packet
2319  * @return handle
2320  * @note: btstack_type H
2321  */
2322 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){
2323     return little_endian_read_16(event, 2);
2324 }
2325 /**
2326  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2327  * @param event packet
2328  * @return addr_type
2329  * @note: btstack_type 1
2330  */
2331 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){
2332     return event[4];
2333 }
2334 /**
2335  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2336  * @param event packet
2337  * @param Pointer to storage for address
2338  * @note: btstack_type B
2339  */
2340 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){
2341     reverse_bd_addr(&event[5], address);
2342 }
2343 /**
2344  * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2345  * @param event packet
2346  * @return passkey
2347  * @note: btstack_type 4
2348  */
2349 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){
2350     return little_endian_read_32(event, 11);
2351 }
2352 #endif
2353 
2354 #ifdef ENABLE_BLE
2355 /**
2356  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2357  * @param event packet
2358  * @return handle
2359  * @note: btstack_type H
2360  */
2361 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){
2362     return little_endian_read_16(event, 2);
2363 }
2364 /**
2365  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2366  * @param event packet
2367  * @return addr_type
2368  * @note: btstack_type 1
2369  */
2370 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){
2371     return event[4];
2372 }
2373 /**
2374  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2375  * @param event packet
2376  * @param Pointer to storage for address
2377  * @note: btstack_type B
2378  */
2379 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){
2380     reverse_bd_addr(&event[5], address);
2381 }
2382 #endif
2383 
2384 #ifdef ENABLE_BLE
2385 /**
2386  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER
2387  * @param event packet
2388  * @return handle
2389  * @note: btstack_type H
2390  */
2391 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){
2392     return little_endian_read_16(event, 2);
2393 }
2394 /**
2395  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER
2396  * @param event packet
2397  * @return addr_type
2398  * @note: btstack_type 1
2399  */
2400 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){
2401     return event[4];
2402 }
2403 /**
2404  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER
2405  * @param event packet
2406  * @param Pointer to storage for address
2407  * @note: btstack_type B
2408  */
2409 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){
2410     reverse_bd_addr(&event[5], address);
2411 }
2412 #endif
2413 
2414 #ifdef ENABLE_BLE
2415 /**
2416  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL
2417  * @param event packet
2418  * @return handle
2419  * @note: btstack_type H
2420  */
2421 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){
2422     return little_endian_read_16(event, 2);
2423 }
2424 /**
2425  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL
2426  * @param event packet
2427  * @return addr_type
2428  * @note: btstack_type 1
2429  */
2430 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){
2431     return event[4];
2432 }
2433 /**
2434  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL
2435  * @param event packet
2436  * @param Pointer to storage for address
2437  * @note: btstack_type B
2438  */
2439 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){
2440     reverse_bd_addr(&event[5], address);
2441 }
2442 #endif
2443 
2444 #ifdef ENABLE_BLE
2445 /**
2446  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2447  * @param event packet
2448  * @return handle
2449  * @note: btstack_type H
2450  */
2451 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){
2452     return little_endian_read_16(event, 2);
2453 }
2454 /**
2455  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2456  * @param event packet
2457  * @return addr_type
2458  * @note: btstack_type 1
2459  */
2460 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){
2461     return event[4];
2462 }
2463 /**
2464  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2465  * @param event packet
2466  * @param Pointer to storage for address
2467  * @note: btstack_type B
2468  */
2469 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){
2470     reverse_bd_addr(&event[5], address);
2471 }
2472 /**
2473  * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2474  * @param event packet
2475  * @return passkey
2476  * @note: btstack_type 4
2477  */
2478 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){
2479     return little_endian_read_32(event, 11);
2480 }
2481 #endif
2482 
2483 #ifdef ENABLE_BLE
2484 /**
2485  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2486  * @param event packet
2487  * @return handle
2488  * @note: btstack_type H
2489  */
2490 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){
2491     return little_endian_read_16(event, 2);
2492 }
2493 /**
2494  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2495  * @param event packet
2496  * @return addr_type
2497  * @note: btstack_type 1
2498  */
2499 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){
2500     return event[4];
2501 }
2502 /**
2503  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2504  * @param event packet
2505  * @param Pointer to storage for address
2506  * @note: btstack_type B
2507  */
2508 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){
2509     reverse_bd_addr(&event[5], address);
2510 }
2511 #endif
2512 
2513 #ifdef ENABLE_BLE
2514 /**
2515  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2516  * @param event packet
2517  * @return handle
2518  * @note: btstack_type H
2519  */
2520 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){
2521     return little_endian_read_16(event, 2);
2522 }
2523 /**
2524  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2525  * @param event packet
2526  * @return addr_type
2527  * @note: btstack_type 1
2528  */
2529 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){
2530     return event[4];
2531 }
2532 /**
2533  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2534  * @param event packet
2535  * @param Pointer to storage for address
2536  * @note: btstack_type B
2537  */
2538 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){
2539     reverse_bd_addr(&event[5], address);
2540 }
2541 #endif
2542 
2543 #ifdef ENABLE_BLE
2544 /**
2545  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2546  * @param event packet
2547  * @return handle
2548  * @note: btstack_type H
2549  */
2550 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){
2551     return little_endian_read_16(event, 2);
2552 }
2553 /**
2554  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2555  * @param event packet
2556  * @return addr_type
2557  * @note: btstack_type 1
2558  */
2559 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){
2560     return event[4];
2561 }
2562 /**
2563  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2564  * @param event packet
2565  * @param Pointer to storage for address
2566  * @note: btstack_type B
2567  */
2568 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){
2569     reverse_bd_addr(&event[5], address);
2570 }
2571 #endif
2572 
2573 #ifdef ENABLE_BLE
2574 /**
2575  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2576  * @param event packet
2577  * @return handle
2578  * @note: btstack_type H
2579  */
2580 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){
2581     return little_endian_read_16(event, 2);
2582 }
2583 /**
2584  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2585  * @param event packet
2586  * @return addr_type
2587  * @note: btstack_type 1
2588  */
2589 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){
2590     return event[4];
2591 }
2592 /**
2593  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2594  * @param event packet
2595  * @param Pointer to storage for address
2596  * @note: btstack_type B
2597  */
2598 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){
2599     reverse_bd_addr(&event[5], address);
2600 }
2601 /**
2602  * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2603  * @param event packet
2604  * @return identity_addr_type
2605  * @note: btstack_type 1
2606  */
2607 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){
2608     return event[11];
2609 }
2610 /**
2611  * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2612  * @param event packet
2613  * @param Pointer to storage for identity_address
2614  * @note: btstack_type B
2615  */
2616 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
2617     reverse_bd_addr(&event[12], identity_address);
2618 }
2619 /**
2620  * @brief Get field index_internal from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2621  * @param event packet
2622  * @return index_internal
2623  * @note: btstack_type 2
2624  */
2625 static inline uint16_t sm_event_identity_resolving_succeeded_get_index_internal(const uint8_t * event){
2626     return little_endian_read_16(event, 18);
2627 }
2628 #endif
2629 
2630 #ifdef ENABLE_BLE
2631 /**
2632  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST
2633  * @param event packet
2634  * @return handle
2635  * @note: btstack_type H
2636  */
2637 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){
2638     return little_endian_read_16(event, 2);
2639 }
2640 /**
2641  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST
2642  * @param event packet
2643  * @return addr_type
2644  * @note: btstack_type 1
2645  */
2646 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){
2647     return event[4];
2648 }
2649 /**
2650  * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST
2651  * @param event packet
2652  * @param Pointer to storage for address
2653  * @note: btstack_type B
2654  */
2655 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){
2656     reverse_bd_addr(&event[5], address);
2657 }
2658 #endif
2659 
2660 #ifdef ENABLE_BLE
2661 /**
2662  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT
2663  * @param event packet
2664  * @return handle
2665  * @note: btstack_type H
2666  */
2667 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){
2668     return little_endian_read_16(event, 2);
2669 }
2670 /**
2671  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT
2672  * @param event packet
2673  * @return addr_type
2674  * @note: btstack_type 1
2675  */
2676 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){
2677     return event[4];
2678 }
2679 /**
2680  * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT
2681  * @param event packet
2682  * @param Pointer to storage for address
2683  * @note: btstack_type B
2684  */
2685 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){
2686     reverse_bd_addr(&event[5], address);
2687 }
2688 /**
2689  * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT
2690  * @param event packet
2691  * @return authorization_result
2692  * @note: btstack_type 1
2693  */
2694 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){
2695     return event[11];
2696 }
2697 #endif
2698 
2699 #ifdef ENABLE_BLE
2700 /**
2701  * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION
2702  * @param event packet
2703  * @return handle
2704  * @note: btstack_type H
2705  */
2706 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){
2707     return little_endian_read_16(event, 2);
2708 }
2709 /**
2710  * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION
2711  * @param event packet
2712  * @return action
2713  * @note: btstack_type 1
2714  */
2715 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){
2716     return event[4];
2717 }
2718 #endif
2719 
2720 #ifdef ENABLE_BLE
2721 /**
2722  * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED
2723  * @param event packet
2724  * @return handle
2725  * @note: btstack_type H
2726  */
2727 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){
2728     return little_endian_read_16(event, 2);
2729 }
2730 /**
2731  * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED
2732  * @param event packet
2733  * @return addr_type
2734  * @note: btstack_type 1
2735  */
2736 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){
2737     return event[4];
2738 }
2739 /**
2740  * @brief Get field address from event SM_EVENT_IDENTITY_CREATED
2741  * @param event packet
2742  * @param Pointer to storage for address
2743  * @note: btstack_type B
2744  */
2745 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){
2746     reverse_bd_addr(&event[5], address);
2747 }
2748 /**
2749  * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED
2750  * @param event packet
2751  * @return identity_addr_type
2752  * @note: btstack_type 1
2753  */
2754 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){
2755     return event[11];
2756 }
2757 /**
2758  * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED
2759  * @param event packet
2760  * @param Pointer to storage for identity_address
2761  * @note: btstack_type B
2762  */
2763 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
2764     reverse_bd_addr(&event[12], identity_address);
2765 }
2766 #endif
2767 
2768 /**
2769  * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL
2770  * @param event packet
2771  * @return handle
2772  * @note: btstack_type H
2773  */
2774 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){
2775     return little_endian_read_16(event, 2);
2776 }
2777 /**
2778  * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL
2779  * @param event packet
2780  * @return security_level
2781  * @note: btstack_type 1
2782  */
2783 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){
2784     return event[4];
2785 }
2786 
2787 /**
2788  * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2789  * @param event packet
2790  * @return status
2791  * @note: btstack_type 1
2792  */
2793 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){
2794     return event[2];
2795 }
2796 /**
2797  * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2798  * @param event packet
2799  * @param Pointer to storage for address
2800  * @note: btstack_type B
2801  */
2802 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){
2803     reverse_bd_addr(&event[3], address);
2804 }
2805 
2806 /**
2807  * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT
2808  * @param event packet
2809  * @return advertising_event_type
2810  * @note: btstack_type 1
2811  */
2812 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){
2813     return event[2];
2814 }
2815 /**
2816  * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT
2817  * @param event packet
2818  * @return address_type
2819  * @note: btstack_type 1
2820  */
2821 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){
2822     return event[3];
2823 }
2824 /**
2825  * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT
2826  * @param event packet
2827  * @param Pointer to storage for address
2828  * @note: btstack_type B
2829  */
2830 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){
2831     reverse_bd_addr(&event[4], address);
2832 }
2833 /**
2834  * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT
2835  * @param event packet
2836  * @return rssi
2837  * @note: btstack_type 1
2838  */
2839 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){
2840     return event[10];
2841 }
2842 /**
2843  * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT
2844  * @param event packet
2845  * @return data_length
2846  * @note: btstack_type J
2847  */
2848 static inline int gap_event_advertising_report_get_data_length(const uint8_t * event){
2849     return event[11];
2850 }
2851 /**
2852  * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT
2853  * @param event packet
2854  * @return data
2855  * @note: btstack_type V
2856  */
2857 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){
2858     return &event[12];
2859 }
2860 
2861 /**
2862  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2863  * @param event packet
2864  * @return status
2865  * @note: btstack_type 1
2866  */
2867 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){
2868     return event[3];
2869 }
2870 /**
2871  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2872  * @param event packet
2873  * @return connection_handle
2874  * @note: btstack_type H
2875  */
2876 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){
2877     return little_endian_read_16(event, 4);
2878 }
2879 /**
2880  * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2881  * @param event packet
2882  * @return role
2883  * @note: btstack_type 1
2884  */
2885 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){
2886     return event[6];
2887 }
2888 /**
2889  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2890  * @param event packet
2891  * @return peer_address_type
2892  * @note: btstack_type 1
2893  */
2894 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){
2895     return event[7];
2896 }
2897 /**
2898  * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2899  * @param event packet
2900  * @param Pointer to storage for peer_address
2901  * @note: btstack_type B
2902  */
2903 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){
2904     reverse_bd_addr(&event[8], peer_address);
2905 }
2906 /**
2907  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2908  * @param event packet
2909  * @return conn_interval
2910  * @note: btstack_type 2
2911  */
2912 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){
2913     return little_endian_read_16(event, 14);
2914 }
2915 /**
2916  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2917  * @param event packet
2918  * @return conn_latency
2919  * @note: btstack_type 2
2920  */
2921 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){
2922     return little_endian_read_16(event, 16);
2923 }
2924 /**
2925  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2926  * @param event packet
2927  * @return supervision_timeout
2928  * @note: btstack_type 2
2929  */
2930 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){
2931     return little_endian_read_16(event, 18);
2932 }
2933 /**
2934  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2935  * @param event packet
2936  * @return master_clock_accuracy
2937  * @note: btstack_type 1
2938  */
2939 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){
2940     return event[20];
2941 }
2942 
2943 /**
2944  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2945  * @param event packet
2946  * @return status
2947  * @note: btstack_type 1
2948  */
2949 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){
2950     return event[3];
2951 }
2952 /**
2953  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2954  * @param event packet
2955  * @return connection_handle
2956  * @note: btstack_type H
2957  */
2958 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){
2959     return little_endian_read_16(event, 4);
2960 }
2961 /**
2962  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2963  * @param event packet
2964  * @return conn_interval
2965  * @note: btstack_type 2
2966  */
2967 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){
2968     return little_endian_read_16(event, 6);
2969 }
2970 /**
2971  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE
2972  * @param event packet
2973  * @return conn_latency
2974  * @note: btstack_type 2
2975  */
2976 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){
2977     return little_endian_read_16(event, 8);
2978 }
2979 
2980 /**
2981  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_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_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){
2987 //      not implemented yet
2988 //  }
2989 /**
2990  * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
2991  * @param event packet
2992  * @return random_number
2993  * @note: btstack_type D
2994  */
2995 //  static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){
2996 //      not implemented yet
2997 //  }
2998 /**
2999  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE
3000  * @param event packet
3001  * @return encryption_diversifier
3002  * @note: btstack_type 2
3003  */
3004 //  static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){
3005 //      not implemented yet
3006 //  }
3007 
3008 /**
3009  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3010  * @param event packet
3011  * @return connection_handle
3012  * @note: btstack_type H
3013  */
3014 //  static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){
3015 //      not implemented yet
3016 //  }
3017 /**
3018  * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3019  * @param event packet
3020  * @return random_number
3021  * @note: btstack_type D
3022  */
3023 //  static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){
3024 //      not implemented yet
3025 //  }
3026 /**
3027  * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST
3028  * @param event packet
3029  * @return encryption_diversifier
3030  * @note: btstack_type 2
3031  */
3032 //  static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){
3033 //      not implemented yet
3034 //  }
3035 
3036 /**
3037  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3038  * @param event packet
3039  * @return connection_handle
3040  * @note: btstack_type H
3041  */
3042 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){
3043     return little_endian_read_16(event, 3);
3044 }
3045 /**
3046  * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3047  * @param event packet
3048  * @return interval_min
3049  * @note: btstack_type 2
3050  */
3051 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){
3052     return little_endian_read_16(event, 5);
3053 }
3054 /**
3055  * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3056  * @param event packet
3057  * @return interval_max
3058  * @note: btstack_type 2
3059  */
3060 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){
3061     return little_endian_read_16(event, 7);
3062 }
3063 /**
3064  * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3065  * @param event packet
3066  * @return latency
3067  * @note: btstack_type 2
3068  */
3069 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){
3070     return little_endian_read_16(event, 9);
3071 }
3072 /**
3073  * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST
3074  * @param event packet
3075  * @return timeout
3076  * @note: btstack_type 2
3077  */
3078 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){
3079     return little_endian_read_16(event, 11);
3080 }
3081 
3082 /**
3083  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3084  * @param event packet
3085  * @return connection_handle
3086  * @note: btstack_type H
3087  */
3088 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){
3089     return little_endian_read_16(event, 3);
3090 }
3091 /**
3092  * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3093  * @param event packet
3094  * @return max_tx_octets
3095  * @note: btstack_type 2
3096  */
3097 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){
3098     return little_endian_read_16(event, 5);
3099 }
3100 /**
3101  * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3102  * @param event packet
3103  * @return max_tx_time
3104  * @note: btstack_type 2
3105  */
3106 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){
3107     return little_endian_read_16(event, 7);
3108 }
3109 /**
3110  * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3111  * @param event packet
3112  * @return max_rx_octets
3113  * @note: btstack_type 2
3114  */
3115 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){
3116     return little_endian_read_16(event, 9);
3117 }
3118 /**
3119  * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE
3120  * @param event packet
3121  * @return max_rx_time
3122  * @note: btstack_type 2
3123  */
3124 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){
3125     return little_endian_read_16(event, 11);
3126 }
3127 
3128 /**
3129  * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3130  * @param event packet
3131  * @return status
3132  * @note: btstack_type 1
3133  */
3134 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){
3135     return event[3];
3136 }
3137 /**
3138  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3139  * @param event packet
3140  * @param Pointer to storage for dhkey_x
3141  * @note: btstack_type Q
3142  */
3143 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3144     reverse_bytes(&event[4], dhkey_x, 32);
3145 }
3146 /**
3147  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
3148  * @param event packet
3149  * @param Pointer to storage for dhkey_y
3150  * @note: btstack_type Q
3151  */
3152 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3153     reverse_bytes(&event[36], dhkey_y, 32);
3154 }
3155 
3156 /**
3157  * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3158  * @param event packet
3159  * @return status
3160  * @note: btstack_type 1
3161  */
3162 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){
3163     return event[3];
3164 }
3165 /**
3166  * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3167  * @param event packet
3168  * @param Pointer to storage for dhkey_x
3169  * @note: btstack_type Q
3170  */
3171 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
3172     reverse_bytes(&event[4], dhkey_x, 32);
3173 }
3174 /**
3175  * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE
3176  * @param event packet
3177  * @param Pointer to storage for dhkey_y
3178  * @note: btstack_type Q
3179  */
3180 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
3181     reverse_bytes(&event[36], dhkey_y, 32);
3182 }
3183 
3184 /**
3185  * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3186  * @param event packet
3187  * @return status
3188  * @note: btstack_type 1
3189  */
3190 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){
3191     return event[3];
3192 }
3193 /**
3194  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3195  * @param event packet
3196  * @return connection_handle
3197  * @note: btstack_type H
3198  */
3199 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){
3200     return little_endian_read_16(event, 4);
3201 }
3202 /**
3203  * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3204  * @param event packet
3205  * @return role
3206  * @note: btstack_type 1
3207  */
3208 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){
3209     return event[6];
3210 }
3211 /**
3212  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3213  * @param event packet
3214  * @return peer_address_type
3215  * @note: btstack_type 1
3216  */
3217 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){
3218     return event[7];
3219 }
3220 /**
3221  * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3222  * @param event packet
3223  * @param Pointer to storage for perr_addresss
3224  * @note: btstack_type B
3225  */
3226 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){
3227     reverse_bd_addr(&event[8], perr_addresss);
3228 }
3229 /**
3230  * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3231  * @param event packet
3232  * @param Pointer to storage for local_resolvable_private_addres
3233  * @note: btstack_type B
3234  */
3235 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){
3236     reverse_bd_addr(&event[14], local_resolvable_private_addres);
3237 }
3238 /**
3239  * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3240  * @param event packet
3241  * @param Pointer to storage for peer_resolvable_private_addres
3242  * @note: btstack_type B
3243  */
3244 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){
3245     reverse_bd_addr(&event[20], peer_resolvable_private_addres);
3246 }
3247 /**
3248  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3249  * @param event packet
3250  * @return conn_interval
3251  * @note: btstack_type 2
3252  */
3253 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){
3254     return little_endian_read_16(event, 26);
3255 }
3256 /**
3257  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3258  * @param event packet
3259  * @return conn_latency
3260  * @note: btstack_type 2
3261  */
3262 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){
3263     return little_endian_read_16(event, 28);
3264 }
3265 /**
3266  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3267  * @param event packet
3268  * @return supervision_timeout
3269  * @note: btstack_type 2
3270  */
3271 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){
3272     return little_endian_read_16(event, 30);
3273 }
3274 /**
3275  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
3276  * @param event packet
3277  * @return master_clock_accuracy
3278  * @note: btstack_type 1
3279  */
3280 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){
3281     return event[32];
3282 }
3283 
3284 /**
3285  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
3286  * @param event packet
3287  * @return status
3288  * @note: btstack_type 1
3289  */
3290 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){
3291     return event[3];
3292 }
3293 
3294 /**
3295  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
3296  * @param event packet
3297  * @return status
3298  * @note: btstack_type 1
3299  */
3300 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){
3301     return event[3];
3302 }
3303 
3304 /**
3305  * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3306  * @param event packet
3307  * @return status
3308  * @note: btstack_type 1
3309  */
3310 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){
3311     return event[3];
3312 }
3313 /**
3314  * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
3315  * @param event packet
3316  * @return handle
3317  * @note: btstack_type H
3318  */
3319 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
3320     return little_endian_read_16(event, 4);
3321 }
3322 
3323 /**
3324  * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
3325  * @param event packet
3326  * @return status
3327  * @note: btstack_type 1
3328  */
3329 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){
3330     return event[3];
3331 }
3332 
3333 
3334 /**
3335  * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
3336  * @param event packet
3337  * @return gain
3338  * @note: btstack_type 1
3339  */
3340 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){
3341     return event[3];
3342 }
3343 
3344 /**
3345  * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
3346  * @param event packet
3347  * @return gain
3348  * @note: btstack_type 1
3349  */
3350 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){
3351     return event[3];
3352 }
3353 
3354 /**
3355  * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND
3356  * @param event packet
3357  * @return value_length
3358  * @note: btstack_type J
3359  */
3360 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){
3361     return event[3];
3362 }
3363 /**
3364  * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND
3365  * @param event packet
3366  * @return value
3367  * @note: btstack_type V
3368  */
3369 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){
3370     return &event[4];
3371 }
3372 
3373 /**
3374  * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION
3375  * @param event packet
3376  * @return value_length
3377  * @note: btstack_type J
3378  */
3379 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){
3380     return event[3];
3381 }
3382 /**
3383  * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION
3384  * @param event packet
3385  * @return value
3386  * @note: btstack_type V
3387  */
3388 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){
3389     return &event[4];
3390 }
3391 
3392 /**
3393  * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3394  * @param event packet
3395  * @return status
3396  * @note: btstack_type 1
3397  */
3398 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){
3399     return event[3];
3400 }
3401 /**
3402  * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3403  * @param event packet
3404  * @return con_handle
3405  * @note: btstack_type H
3406  */
3407 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){
3408     return little_endian_read_16(event, 4);
3409 }
3410 /**
3411  * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
3412  * @param event packet
3413  * @param Pointer to storage for bd_addr
3414  * @note: btstack_type B
3415  */
3416 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3417     reverse_bd_addr(&event[6], bd_addr);
3418 }
3419 
3420 
3421 /**
3422  * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3423  * @param event packet
3424  * @return status
3425  * @note: btstack_type 1
3426  */
3427 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
3428     return event[3];
3429 }
3430 /**
3431  * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3432  * @param event packet
3433  * @return handle
3434  * @note: btstack_type H
3435  */
3436 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
3437     return little_endian_read_16(event, 4);
3438 }
3439 /**
3440  * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3441  * @param event packet
3442  * @param Pointer to storage for bd_addr
3443  * @note: btstack_type B
3444  */
3445 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3446     reverse_bd_addr(&event[6], bd_addr);
3447 }
3448 /**
3449  * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3450  * @param event packet
3451  * @return negotiated_codec
3452  * @note: btstack_type 1
3453  */
3454 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){
3455     return event[12];
3456 }
3457 
3458 
3459 /**
3460  * @brief Get field status from event HFP_SUBEVENT_COMPLETE
3461  * @param event packet
3462  * @return status
3463  * @note: btstack_type 1
3464  */
3465 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){
3466     return event[3];
3467 }
3468 
3469 /**
3470  * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3471  * @param event packet
3472  * @return indicator_index
3473  * @note: btstack_type 1
3474  */
3475 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){
3476     return event[3];
3477 }
3478 /**
3479  * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3480  * @param event packet
3481  * @return indicator_status
3482  * @note: btstack_type 1
3483  */
3484 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){
3485     return event[4];
3486 }
3487 /**
3488  * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3489  * @param event packet
3490  * @return indicator_name
3491  * @note: btstack_type T
3492  */
3493 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){
3494     return (const char *) &event[5];
3495 }
3496 
3497 /**
3498  * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3499  * @param event packet
3500  * @return network_operator_mode
3501  * @note: btstack_type 1
3502  */
3503 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){
3504     return event[3];
3505 }
3506 /**
3507  * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3508  * @param event packet
3509  * @return network_operator_format
3510  * @note: btstack_type 1
3511  */
3512 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){
3513     return event[4];
3514 }
3515 /**
3516  * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3517  * @param event packet
3518  * @return network_operator_name
3519  * @note: btstack_type 1
3520  */
3521 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){
3522     return event[5];
3523 }
3524 
3525 /**
3526  * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR
3527  * @param event packet
3528  * @return error
3529  * @note: btstack_type 1
3530  */
3531 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){
3532     return event[3];
3533 }
3534 
3535 
3536 
3537 
3538 /**
3539  * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
3540  * @param event packet
3541  * @return number
3542  * @note: btstack_type T
3543  */
3544 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){
3545     return (const char *) &event[3];
3546 }
3547 
3548 
3549 /**
3550  * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG
3551  * @param event packet
3552  * @return number
3553  * @note: btstack_type T
3554  */
3555 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){
3556     return (const char *) &event[3];
3557 }
3558 
3559 /**
3560  * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES
3561  * @param event packet
3562  * @return dtmf
3563  * @note: btstack_type T
3564  */
3565 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){
3566     return (const char *) &event[3];
3567 }
3568 
3569 
3570 
3571 
3572 /**
3573  * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME
3574  * @param event packet
3575  * @return status
3576  * @note: btstack_type 1
3577  */
3578 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){
3579     return event[3];
3580 }
3581 /**
3582  * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME
3583  * @param event packet
3584  * @return gain
3585  * @note: btstack_type 1
3586  */
3587 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){
3588     return event[4];
3589 }
3590 
3591 /**
3592  * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME
3593  * @param event packet
3594  * @return status
3595  * @note: btstack_type 1
3596  */
3597 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){
3598     return event[3];
3599 }
3600 /**
3601  * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME
3602  * @param event packet
3603  * @return gain
3604  * @note: btstack_type 1
3605  */
3606 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){
3607     return event[4];
3608 }
3609 
3610 /**
3611  * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3612  * @param event packet
3613  * @return type
3614  * @note: btstack_type 1
3615  */
3616 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){
3617     return event[3];
3618 }
3619 /**
3620  * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3621  * @param event packet
3622  * @return number
3623  * @note: btstack_type T
3624  */
3625 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){
3626     return (const char *) &event[4];
3627 }
3628 
3629 /**
3630  * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3631  * @param event packet
3632  * @return type
3633  * @note: btstack_type 1
3634  */
3635 static inline uint8_t hfp_subevent_calling_line_indetification_notification_get_type(const uint8_t * event){
3636     return event[3];
3637 }
3638 /**
3639  * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3640  * @param event packet
3641  * @return number
3642  * @note: btstack_type T
3643  */
3644 static inline const char * hfp_subevent_calling_line_indetification_notification_get_number(const uint8_t * event){
3645     return (const char *) &event[4];
3646 }
3647 
3648 /**
3649  * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3650  * @param event packet
3651  * @return clcc_idx
3652  * @note: btstack_type 1
3653  */
3654 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){
3655     return event[3];
3656 }
3657 /**
3658  * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3659  * @param event packet
3660  * @return clcc_dir
3661  * @note: btstack_type 1
3662  */
3663 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){
3664     return event[4];
3665 }
3666 /**
3667  * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3668  * @param event packet
3669  * @return clcc_status
3670  * @note: btstack_type 1
3671  */
3672 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){
3673     return event[5];
3674 }
3675 /**
3676  * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3677  * @param event packet
3678  * @return clcc_mpty
3679  * @note: btstack_type 1
3680  */
3681 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){
3682     return event[6];
3683 }
3684 /**
3685  * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3686  * @param event packet
3687  * @return bnip_type
3688  * @note: btstack_type 1
3689  */
3690 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){
3691     return event[7];
3692 }
3693 /**
3694  * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3695  * @param event packet
3696  * @return bnip_number
3697  * @note: btstack_type T
3698  */
3699 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){
3700     return (const char *) &event[8];
3701 }
3702 
3703 /**
3704  * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3705  * @param event packet
3706  * @return status
3707  * @note: btstack_type 1
3708  */
3709 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){
3710     return event[3];
3711 }
3712 /**
3713  * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3714  * @param event packet
3715  * @return bnip_type
3716  * @note: btstack_type 1
3717  */
3718 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){
3719     return event[4];
3720 }
3721 /**
3722  * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3723  * @param event packet
3724  * @return bnip_number
3725  * @note: btstack_type T
3726  */
3727 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){
3728     return (const char *) &event[5];
3729 }
3730 
3731 /**
3732  * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS
3733  * @param event packet
3734  * @return value
3735  * @note: btstack_type T
3736  */
3737 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){
3738     return (const char *) &event[3];
3739 }
3740 
3741 #ifdef ENABLE_BLE
3742 /**
3743  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
3744  * @param event packet
3745  * @return handle
3746  * @note: btstack_type H
3747  */
3748 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){
3749     return little_endian_read_16(event, 3);
3750 }
3751 #endif
3752 
3753 #ifdef ENABLE_BLE
3754 /**
3755  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3756  * @param event packet
3757  * @return handle
3758  * @note: btstack_type H
3759  */
3760 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){
3761     return little_endian_read_16(event, 3);
3762 }
3763 /**
3764  * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3765  * @param event packet
3766  * @return attribute_id
3767  * @note: btstack_type 2
3768  */
3769 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){
3770     return little_endian_read_16(event, 5);
3771 }
3772 /**
3773  * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3774  * @param event packet
3775  * @return text
3776  * @note: btstack_type T
3777  */
3778 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){
3779     return (const char *) &event[7];
3780 }
3781 #endif
3782 
3783 #ifdef ENABLE_BLE
3784 /**
3785  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED
3786  * @param event packet
3787  * @return handle
3788  * @note: btstack_type H
3789  */
3790 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){
3791     return little_endian_read_16(event, 3);
3792 }
3793 #endif
3794 
3795 /**
3796  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3797  * @param event packet
3798  * @return con_handle
3799  * @note: btstack_type H
3800  */
3801 static inline hci_con_handle_t avdtp_subevent_signaling_accept_get_con_handle(const uint8_t * event){
3802     return little_endian_read_16(event, 3);
3803 }
3804 /**
3805  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT
3806  * @param event packet
3807  * @return signal_identifier
3808  * @note: btstack_type 1
3809  */
3810 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){
3811     return event[5];
3812 }
3813 
3814 /**
3815  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_REJECT
3816  * @param event packet
3817  * @return con_handle
3818  * @note: btstack_type H
3819  */
3820 static inline hci_con_handle_t avdtp_subevent_signaling_reject_get_con_handle(const uint8_t * event){
3821     return little_endian_read_16(event, 3);
3822 }
3823 /**
3824  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT
3825  * @param event packet
3826  * @return signal_identifier
3827  * @note: btstack_type 1
3828  */
3829 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){
3830     return event[5];
3831 }
3832 
3833 /**
3834  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3835  * @param event packet
3836  * @return con_handle
3837  * @note: btstack_type H
3838  */
3839 static inline hci_con_handle_t avdtp_subevent_signaling_general_reject_get_con_handle(const uint8_t * event){
3840     return little_endian_read_16(event, 3);
3841 }
3842 /**
3843  * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT
3844  * @param event packet
3845  * @return signal_identifier
3846  * @note: btstack_type 1
3847  */
3848 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){
3849     return event[5];
3850 }
3851 
3852 /**
3853  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3854  * @param event packet
3855  * @return con_handle
3856  * @note: btstack_type H
3857  */
3858 static inline hci_con_handle_t avdtp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){
3859     return little_endian_read_16(event, 3);
3860 }
3861 /**
3862  * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3863  * @param event packet
3864  * @param Pointer to storage for bd_addr
3865  * @note: btstack_type B
3866  */
3867 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3868     reverse_bd_addr(&event[5], bd_addr);
3869 }
3870 /**
3871  * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
3872  * @param event packet
3873  * @return status
3874  * @note: btstack_type 1
3875  */
3876 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){
3877     return event[11];
3878 }
3879 
3880 
3881 /**
3882  * @brief Get field handle from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3883  * @param event packet
3884  * @return handle
3885  * @note: btstack_type H
3886  */
3887 static inline hci_con_handle_t avdtp_subevent_signaling_sep_found_get_handle(const uint8_t * event){
3888     return little_endian_read_16(event, 3);
3889 }
3890 /**
3891  * @brief Get field seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3892  * @param event packet
3893  * @return seid
3894  * @note: btstack_type 1
3895  */
3896 static inline uint8_t avdtp_subevent_signaling_sep_found_get_seid(const uint8_t * event){
3897     return event[5];
3898 }
3899 /**
3900  * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3901  * @param event packet
3902  * @return in_use
3903  * @note: btstack_type 1
3904  */
3905 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){
3906     return event[6];
3907 }
3908 /**
3909  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3910  * @param event packet
3911  * @return media_type
3912  * @note: btstack_type 1
3913  */
3914 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){
3915     return event[7];
3916 }
3917 /**
3918  * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND
3919  * @param event packet
3920  * @return sep_type
3921  * @note: btstack_type 1
3922  */
3923 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){
3924     return event[8];
3925 }
3926 
3927 /**
3928  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3929  * @param event packet
3930  * @return con_handle
3931  * @note: btstack_type H
3932  */
3933 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_capability_get_con_handle(const uint8_t * event){
3934     return little_endian_read_16(event, 3);
3935 }
3936 /**
3937  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3938  * @param event packet
3939  * @return media_type
3940  * @note: btstack_type 1
3941  */
3942 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){
3943     return event[5];
3944 }
3945 /**
3946  * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3947  * @param event packet
3948  * @return sampling_frequency_bitmap
3949  * @note: btstack_type 1
3950  */
3951 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){
3952     return event[6];
3953 }
3954 /**
3955  * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3956  * @param event packet
3957  * @return channel_mode_bitmap
3958  * @note: btstack_type 1
3959  */
3960 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){
3961     return event[7];
3962 }
3963 /**
3964  * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3965  * @param event packet
3966  * @return block_length_bitmap
3967  * @note: btstack_type 1
3968  */
3969 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){
3970     return event[8];
3971 }
3972 /**
3973  * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3974  * @param event packet
3975  * @return subbands_bitmap
3976  * @note: btstack_type 1
3977  */
3978 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){
3979     return event[9];
3980 }
3981 /**
3982  * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3983  * @param event packet
3984  * @return allocation_method_bitmap
3985  * @note: btstack_type 1
3986  */
3987 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){
3988     return event[10];
3989 }
3990 /**
3991  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
3992  * @param event packet
3993  * @return min_bitpool_value
3994  * @note: btstack_type 1
3995  */
3996 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){
3997     return event[11];
3998 }
3999 /**
4000  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY
4001  * @param event packet
4002  * @return max_bitpool_value
4003  * @note: btstack_type 1
4004  */
4005 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){
4006     return event[12];
4007 }
4008 
4009 /**
4010  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4011  * @param event packet
4012  * @return con_handle
4013  * @note: btstack_type H
4014  */
4015 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_capability_get_con_handle(const uint8_t * event){
4016     return little_endian_read_16(event, 3);
4017 }
4018 /**
4019  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4020  * @param event packet
4021  * @return media_type
4022  * @note: btstack_type 1
4023  */
4024 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){
4025     return event[5];
4026 }
4027 /**
4028  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4029  * @param event packet
4030  * @return media_codec_type
4031  * @note: btstack_type 2
4032  */
4033 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){
4034     return little_endian_read_16(event, 6);
4035 }
4036 /**
4037  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY
4038  * @param event packet
4039  * @return media_codec_information_len
4040  * @note: btstack_type 2
4041  */
4042 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){
4043     return little_endian_read_16(event, 8);
4044 }
4045 
4046 /**
4047  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4048  * @param event packet
4049  * @return con_handle
4050  * @note: btstack_type H
4051  */
4052 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_con_handle(const uint8_t * event){
4053     return little_endian_read_16(event, 3);
4054 }
4055 /**
4056  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4057  * @param event packet
4058  * @return reconfigure
4059  * @note: btstack_type 1
4060  */
4061 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){
4062     return event[5];
4063 }
4064 /**
4065  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4066  * @param event packet
4067  * @return media_type
4068  * @note: btstack_type 1
4069  */
4070 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){
4071     return event[6];
4072 }
4073 /**
4074  * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4075  * @param event packet
4076  * @return sampling_frequency
4077  * @note: btstack_type 2
4078  */
4079 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){
4080     return little_endian_read_16(event, 7);
4081 }
4082 /**
4083  * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4084  * @param event packet
4085  * @return channel_mode
4086  * @note: btstack_type 1
4087  */
4088 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){
4089     return event[9];
4090 }
4091 /**
4092  * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4093  * @param event packet
4094  * @return num_channels
4095  * @note: btstack_type 1
4096  */
4097 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){
4098     return event[10];
4099 }
4100 /**
4101  * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4102  * @param event packet
4103  * @return block_length
4104  * @note: btstack_type 1
4105  */
4106 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){
4107     return event[11];
4108 }
4109 /**
4110  * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4111  * @param event packet
4112  * @return subbands
4113  * @note: btstack_type 1
4114  */
4115 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){
4116     return event[12];
4117 }
4118 /**
4119  * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4120  * @param event packet
4121  * @return allocation_method
4122  * @note: btstack_type 1
4123  */
4124 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){
4125     return event[13];
4126 }
4127 /**
4128  * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4129  * @param event packet
4130  * @return min_bitpool_value
4131  * @note: btstack_type 1
4132  */
4133 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){
4134     return event[14];
4135 }
4136 /**
4137  * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
4138  * @param event packet
4139  * @return max_bitpool_value
4140  * @note: btstack_type 1
4141  */
4142 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){
4143     return event[15];
4144 }
4145 
4146 /**
4147  * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4148  * @param event packet
4149  * @return con_handle
4150  * @note: btstack_type H
4151  */
4152 static inline hci_con_handle_t avdtp_subevent_signaling_media_codec_other_configuration_get_con_handle(const uint8_t * event){
4153     return little_endian_read_16(event, 3);
4154 }
4155 /**
4156  * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4157  * @param event packet
4158  * @return reconfigure
4159  * @note: btstack_type 1
4160  */
4161 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){
4162     return event[5];
4163 }
4164 /**
4165  * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4166  * @param event packet
4167  * @return media_type
4168  * @note: btstack_type 1
4169  */
4170 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){
4171     return event[6];
4172 }
4173 /**
4174  * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4175  * @param event packet
4176  * @return media_codec_type
4177  * @note: btstack_type 2
4178  */
4179 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){
4180     return little_endian_read_16(event, 7);
4181 }
4182 /**
4183  * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION
4184  * @param event packet
4185  * @return media_codec_information_len
4186  * @note: btstack_type 2
4187  */
4188 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){
4189     return little_endian_read_16(event, 9);
4190 }
4191 
4192 
4193 
4194 /* API_END */
4195 
4196 #if defined __cplusplus
4197 }
4198 #endif
4199 
4200 #endif // __BTSTACK_EVENT_H
4201