xref: /btstack/src/btstack_event.h (revision 4427624894ec374df686ec53d8a308b25291cfd3)
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 /**
1039  * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED
1040  * @param event packet
1041  * @return local_cid
1042  * @note: btstack_type 2
1043  */
1044 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){
1045     return little_endian_read_16(event, 2);
1046 }
1047 
1048 /**
1049  * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION
1050  * @param event packet
1051  * @param Pointer to storage for address
1052  * @note: btstack_type B
1053  */
1054 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1055     reverse_bd_addr(&event[2], address);
1056 }
1057 /**
1058  * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION
1059  * @param event packet
1060  * @return handle
1061  * @note: btstack_type H
1062  */
1063 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){
1064     return little_endian_read_16(event, 8);
1065 }
1066 /**
1067  * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION
1068  * @param event packet
1069  * @return psm
1070  * @note: btstack_type 2
1071  */
1072 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){
1073     return little_endian_read_16(event, 10);
1074 }
1075 /**
1076  * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1077  * @param event packet
1078  * @return local_cid
1079  * @note: btstack_type 2
1080  */
1081 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){
1082     return little_endian_read_16(event, 12);
1083 }
1084 /**
1085  * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION
1086  * @param event packet
1087  * @return remote_cid
1088  * @note: btstack_type 2
1089  */
1090 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){
1091     return little_endian_read_16(event, 14);
1092 }
1093 
1094 /**
1095  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1096  * @param event packet
1097  * @return handle
1098  * @note: btstack_type H
1099  */
1100 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){
1101     return little_endian_read_16(event, 2);
1102 }
1103 /**
1104  * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1105  * @param event packet
1106  * @return interval_min
1107  * @note: btstack_type 2
1108  */
1109 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){
1110     return little_endian_read_16(event, 4);
1111 }
1112 /**
1113  * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1114  * @param event packet
1115  * @return interval_max
1116  * @note: btstack_type 2
1117  */
1118 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){
1119     return little_endian_read_16(event, 6);
1120 }
1121 /**
1122  * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1123  * @param event packet
1124  * @return latencey
1125  * @note: btstack_type 2
1126  */
1127 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){
1128     return little_endian_read_16(event, 8);
1129 }
1130 /**
1131  * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
1132  * @param event packet
1133  * @return timeout_multiplier
1134  * @note: btstack_type 2
1135  */
1136 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){
1137     return little_endian_read_16(event, 10);
1138 }
1139 
1140 /**
1141  * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE
1142  * @param event packet
1143  * @return handle
1144  * @note: btstack_type H
1145  */
1146 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){
1147     return little_endian_read_16(event, 2);
1148 }
1149 
1150 /**
1151  * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW
1152  * @param event packet
1153  * @return local_cid
1154  * @note: btstack_type 2
1155  */
1156 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){
1157     return little_endian_read_16(event, 2);
1158 }
1159 
1160 /**
1161  * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1162  * @param event packet
1163  * @return address_type
1164  * @note: btstack_type 1
1165  */
1166 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){
1167     return event[2];
1168 }
1169 /**
1170  * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1171  * @param event packet
1172  * @param Pointer to storage for address
1173  * @note: btstack_type B
1174  */
1175 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
1176     reverse_bd_addr(&event[3], address);
1177 }
1178 /**
1179  * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1180  * @param event packet
1181  * @return handle
1182  * @note: btstack_type H
1183  */
1184 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){
1185     return little_endian_read_16(event, 9);
1186 }
1187 /**
1188  * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1189  * @param event packet
1190  * @return psm
1191  * @note: btstack_type 2
1192  */
1193 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){
1194     return little_endian_read_16(event, 11);
1195 }
1196 /**
1197  * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1198  * @param event packet
1199  * @return local_cid
1200  * @note: btstack_type 2
1201  */
1202 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){
1203     return little_endian_read_16(event, 13);
1204 }
1205 /**
1206  * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1207  * @param event packet
1208  * @return remote_cid
1209  * @note: btstack_type 2
1210  */
1211 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){
1212     return little_endian_read_16(event, 15);
1213 }
1214 /**
1215  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION
1216  * @param event packet
1217  * @return remote_mtu
1218  * @note: btstack_type 2
1219  */
1220 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){
1221     return little_endian_read_16(event, 17);
1222 }
1223 
1224 /**
1225  * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED
1226  * @param event packet
1227  * @return status
1228  * @note: btstack_type 1
1229  */
1230 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){
1231     return event[2];
1232 }
1233 /**
1234  * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED
1235  * @param event packet
1236  * @return address_type
1237  * @note: btstack_type 1
1238  */
1239 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){
1240     return event[3];
1241 }
1242 /**
1243  * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED
1244  * @param event packet
1245  * @param Pointer to storage for address
1246  * @note: btstack_type B
1247  */
1248 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
1249     reverse_bd_addr(&event[4], address);
1250 }
1251 /**
1252  * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED
1253  * @param event packet
1254  * @return handle
1255  * @note: btstack_type H
1256  */
1257 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){
1258     return little_endian_read_16(event, 10);
1259 }
1260 /**
1261  * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED
1262  * @param event packet
1263  * @return psm
1264  * @note: btstack_type 2
1265  */
1266 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){
1267     return little_endian_read_16(event, 12);
1268 }
1269 /**
1270  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1271  * @param event packet
1272  * @return local_cid
1273  * @note: btstack_type 2
1274  */
1275 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){
1276     return little_endian_read_16(event, 14);
1277 }
1278 /**
1279  * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED
1280  * @param event packet
1281  * @return remote_cid
1282  * @note: btstack_type 2
1283  */
1284 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){
1285     return little_endian_read_16(event, 16);
1286 }
1287 /**
1288  * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1289  * @param event packet
1290  * @return local_mtu
1291  * @note: btstack_type 2
1292  */
1293 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){
1294     return little_endian_read_16(event, 18);
1295 }
1296 /**
1297  * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED
1298  * @param event packet
1299  * @return remote_mtu
1300  * @note: btstack_type 2
1301  */
1302 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){
1303     return little_endian_read_16(event, 20);
1304 }
1305 
1306 /**
1307  * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED
1308  * @param event packet
1309  * @return local_cid
1310  * @note: btstack_type 2
1311  */
1312 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){
1313     return little_endian_read_16(event, 2);
1314 }
1315 
1316 /**
1317  * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW
1318  * @param event packet
1319  * @return local_cid
1320  * @note: btstack_type 2
1321  */
1322 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){
1323     return little_endian_read_16(event, 2);
1324 }
1325 
1326 /**
1327  * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT
1328  * @param event packet
1329  * @return local_cid
1330  * @note: btstack_type 2
1331  */
1332 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){
1333     return little_endian_read_16(event, 2);
1334 }
1335 
1336 /**
1337  * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED
1338  * @param event packet
1339  * @return status
1340  * @note: btstack_type 1
1341  */
1342 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){
1343     return event[2];
1344 }
1345 /**
1346  * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED
1347  * @param event packet
1348  * @param Pointer to storage for bd_addr
1349  * @note: btstack_type B
1350  */
1351 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1352     reverse_bd_addr(&event[3], bd_addr);
1353 }
1354 /**
1355  * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED
1356  * @param event packet
1357  * @return con_handle
1358  * @note: btstack_type 2
1359  */
1360 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){
1361     return little_endian_read_16(event, 9);
1362 }
1363 /**
1364  * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED
1365  * @param event packet
1366  * @return server_channel
1367  * @note: btstack_type 1
1368  */
1369 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){
1370     return event[11];
1371 }
1372 /**
1373  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED
1374  * @param event packet
1375  * @return rfcomm_cid
1376  * @note: btstack_type 2
1377  */
1378 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){
1379     return little_endian_read_16(event, 12);
1380 }
1381 /**
1382  * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED
1383  * @param event packet
1384  * @return max_frame_size
1385  * @note: btstack_type 2
1386  */
1387 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){
1388     return little_endian_read_16(event, 14);
1389 }
1390 
1391 /**
1392  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED
1393  * @param event packet
1394  * @return rfcomm_cid
1395  * @note: btstack_type 2
1396  */
1397 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){
1398     return little_endian_read_16(event, 2);
1399 }
1400 
1401 /**
1402  * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION
1403  * @param event packet
1404  * @param Pointer to storage for bd_addr
1405  * @note: btstack_type B
1406  */
1407 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
1408     reverse_bd_addr(&event[2], bd_addr);
1409 }
1410 /**
1411  * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION
1412  * @param event packet
1413  * @return server_channel
1414  * @note: btstack_type 1
1415  */
1416 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){
1417     return event[8];
1418 }
1419 /**
1420  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION
1421  * @param event packet
1422  * @return rfcomm_cid
1423  * @note: btstack_type 2
1424  */
1425 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){
1426     return little_endian_read_16(event, 9);
1427 }
1428 
1429 /**
1430  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1431  * @param event packet
1432  * @return rfcomm_cid
1433  * @note: btstack_type 2
1434  */
1435 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){
1436     return little_endian_read_16(event, 2);
1437 }
1438 /**
1439  * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS
1440  * @param event packet
1441  * @return line_status
1442  * @note: btstack_type 1
1443  */
1444 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){
1445     return event[4];
1446 }
1447 
1448 /**
1449  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1450  * @param event packet
1451  * @return rfcomm_cid
1452  * @note: btstack_type 2
1453  */
1454 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){
1455     return little_endian_read_16(event, 2);
1456 }
1457 /**
1458  * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS
1459  * @param event packet
1460  * @return modem_status
1461  * @note: btstack_type 1
1462  */
1463 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){
1464     return event[4];
1465 }
1466 
1467 /**
1468  * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW
1469  * @param event packet
1470  * @return rfcomm_cid
1471  * @note: btstack_type 2
1472  */
1473 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){
1474     return little_endian_read_16(event, 2);
1475 }
1476 
1477 /**
1478  * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE
1479  * @param event packet
1480  * @return status
1481  * @note: btstack_type 1
1482  */
1483 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){
1484     return event[2];
1485 }
1486 
1487 /**
1488  * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1489  * @param event packet
1490  * @return rfcomm_channel
1491  * @note: btstack_type 1
1492  */
1493 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){
1494     return event[2];
1495 }
1496 /**
1497  * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE
1498  * @param event packet
1499  * @return name
1500  * @note: btstack_type T
1501  */
1502 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){
1503     return (const char *) &event[3];
1504 }
1505 
1506 /**
1507  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1508  * @param event packet
1509  * @return record_id
1510  * @note: btstack_type 2
1511  */
1512 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){
1513     return little_endian_read_16(event, 2);
1514 }
1515 /**
1516  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1517  * @param event packet
1518  * @return attribute_id
1519  * @note: btstack_type 2
1520  */
1521 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){
1522     return little_endian_read_16(event, 4);
1523 }
1524 /**
1525  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1526  * @param event packet
1527  * @return attribute_length
1528  * @note: btstack_type 2
1529  */
1530 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){
1531     return little_endian_read_16(event, 6);
1532 }
1533 /**
1534  * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1535  * @param event packet
1536  * @return data_offset
1537  * @note: btstack_type 2
1538  */
1539 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){
1540     return little_endian_read_16(event, 8);
1541 }
1542 /**
1543  * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE
1544  * @param event packet
1545  * @return data
1546  * @note: btstack_type 1
1547  */
1548 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){
1549     return event[10];
1550 }
1551 
1552 /**
1553  * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1554  * @param event packet
1555  * @return record_id
1556  * @note: btstack_type 2
1557  */
1558 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){
1559     return little_endian_read_16(event, 2);
1560 }
1561 /**
1562  * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1563  * @param event packet
1564  * @return attribute_id
1565  * @note: btstack_type 2
1566  */
1567 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){
1568     return little_endian_read_16(event, 4);
1569 }
1570 /**
1571  * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1572  * @param event packet
1573  * @return attribute_length
1574  * @note: btstack_type L
1575  */
1576 static inline int sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){
1577     return little_endian_read_16(event, 6);
1578 }
1579 /**
1580  * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE
1581  * @param event packet
1582  * @return attribute_value
1583  * @note: btstack_type V
1584  */
1585 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){
1586     return &event[8];
1587 }
1588 
1589 /**
1590  * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1591  * @param event packet
1592  * @return total_count
1593  * @note: btstack_type 2
1594  */
1595 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){
1596     return little_endian_read_16(event, 2);
1597 }
1598 /**
1599  * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1600  * @param event packet
1601  * @return record_index
1602  * @note: btstack_type 2
1603  */
1604 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){
1605     return little_endian_read_16(event, 4);
1606 }
1607 /**
1608  * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE
1609  * @param event packet
1610  * @return record_handle
1611  * @note: btstack_type 4
1612  */
1613 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){
1614     return little_endian_read_32(event, 6);
1615 }
1616 
1617 #ifdef ENABLE_BLE
1618 /**
1619  * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE
1620  * @param event packet
1621  * @return handle
1622  * @note: btstack_type H
1623  */
1624 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){
1625     return little_endian_read_16(event, 2);
1626 }
1627 /**
1628  * @brief Get field status from event GATT_EVENT_QUERY_COMPLETE
1629  * @param event packet
1630  * @return status
1631  * @note: btstack_type 1
1632  */
1633 static inline uint8_t gatt_event_query_complete_get_status(const uint8_t * event){
1634     return event[4];
1635 }
1636 #endif
1637 
1638 #ifdef ENABLE_BLE
1639 /**
1640  * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT
1641  * @param event packet
1642  * @return handle
1643  * @note: btstack_type H
1644  */
1645 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){
1646     return little_endian_read_16(event, 2);
1647 }
1648 /**
1649  * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT
1650  * @param event packet
1651  * @param Pointer to storage for service
1652  * @note: btstack_type X
1653  */
1654 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1655     gatt_client_deserialize_service(event, 4, service);
1656 }
1657 #endif
1658 
1659 #ifdef ENABLE_BLE
1660 /**
1661  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1662  * @param event packet
1663  * @return handle
1664  * @note: btstack_type H
1665  */
1666 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){
1667     return little_endian_read_16(event, 2);
1668 }
1669 /**
1670  * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT
1671  * @param event packet
1672  * @param Pointer to storage for characteristic
1673  * @note: btstack_type Y
1674  */
1675 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){
1676     gatt_client_deserialize_characteristic(event, 4, characteristic);
1677 }
1678 #endif
1679 
1680 #ifdef ENABLE_BLE
1681 /**
1682  * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1683  * @param event packet
1684  * @return handle
1685  * @note: btstack_type H
1686  */
1687 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){
1688     return little_endian_read_16(event, 2);
1689 }
1690 /**
1691  * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1692  * @param event packet
1693  * @return include_handle
1694  * @note: btstack_type 2
1695  */
1696 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){
1697     return little_endian_read_16(event, 4);
1698 }
1699 /**
1700  * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT
1701  * @param event packet
1702  * @param Pointer to storage for service
1703  * @note: btstack_type X
1704  */
1705 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
1706     gatt_client_deserialize_service(event, 6, service);
1707 }
1708 #endif
1709 
1710 #ifdef ENABLE_BLE
1711 /**
1712  * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1713  * @param event packet
1714  * @return handle
1715  * @note: btstack_type H
1716  */
1717 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){
1718     return little_endian_read_16(event, 2);
1719 }
1720 /**
1721  * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT
1722  * @param event packet
1723  * @param Pointer to storage for characteristic_descriptor
1724  * @note: btstack_type Z
1725  */
1726 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){
1727     gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor);
1728 }
1729 #endif
1730 
1731 #ifdef ENABLE_BLE
1732 /**
1733  * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1734  * @param event packet
1735  * @return handle
1736  * @note: btstack_type H
1737  */
1738 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){
1739     return little_endian_read_16(event, 2);
1740 }
1741 /**
1742  * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1743  * @param event packet
1744  * @return value_handle
1745  * @note: btstack_type 2
1746  */
1747 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1748     return little_endian_read_16(event, 4);
1749 }
1750 /**
1751  * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1752  * @param event packet
1753  * @return value_length
1754  * @note: btstack_type L
1755  */
1756 static inline int gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){
1757     return little_endian_read_16(event, 6);
1758 }
1759 /**
1760  * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT
1761  * @param event packet
1762  * @return value
1763  * @note: btstack_type V
1764  */
1765 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){
1766     return &event[8];
1767 }
1768 #endif
1769 
1770 #ifdef ENABLE_BLE
1771 /**
1772  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1773  * @param event packet
1774  * @return handle
1775  * @note: btstack_type H
1776  */
1777 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){
1778     return little_endian_read_16(event, 2);
1779 }
1780 /**
1781  * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1782  * @param event packet
1783  * @return value_handle
1784  * @note: btstack_type 2
1785  */
1786 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){
1787     return little_endian_read_16(event, 4);
1788 }
1789 /**
1790  * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1791  * @param event packet
1792  * @return value_offset
1793  * @note: btstack_type 2
1794  */
1795 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){
1796     return little_endian_read_16(event, 6);
1797 }
1798 /**
1799  * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1800  * @param event packet
1801  * @return value_length
1802  * @note: btstack_type L
1803  */
1804 static inline int gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){
1805     return little_endian_read_16(event, 8);
1806 }
1807 /**
1808  * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT
1809  * @param event packet
1810  * @return value
1811  * @note: btstack_type V
1812  */
1813 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){
1814     return &event[10];
1815 }
1816 #endif
1817 
1818 #ifdef ENABLE_BLE
1819 /**
1820  * @brief Get field handle from event GATT_EVENT_NOTIFICATION
1821  * @param event packet
1822  * @return handle
1823  * @note: btstack_type H
1824  */
1825 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){
1826     return little_endian_read_16(event, 2);
1827 }
1828 /**
1829  * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION
1830  * @param event packet
1831  * @return value_handle
1832  * @note: btstack_type 2
1833  */
1834 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){
1835     return little_endian_read_16(event, 4);
1836 }
1837 /**
1838  * @brief Get field value_length from event GATT_EVENT_NOTIFICATION
1839  * @param event packet
1840  * @return value_length
1841  * @note: btstack_type L
1842  */
1843 static inline int gatt_event_notification_get_value_length(const uint8_t * event){
1844     return little_endian_read_16(event, 6);
1845 }
1846 /**
1847  * @brief Get field value from event GATT_EVENT_NOTIFICATION
1848  * @param event packet
1849  * @return value
1850  * @note: btstack_type V
1851  */
1852 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){
1853     return &event[8];
1854 }
1855 #endif
1856 
1857 #ifdef ENABLE_BLE
1858 /**
1859  * @brief Get field handle from event GATT_EVENT_INDICATION
1860  * @param event packet
1861  * @return handle
1862  * @note: btstack_type H
1863  */
1864 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){
1865     return little_endian_read_16(event, 2);
1866 }
1867 /**
1868  * @brief Get field value_handle from event GATT_EVENT_INDICATION
1869  * @param event packet
1870  * @return value_handle
1871  * @note: btstack_type 2
1872  */
1873 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){
1874     return little_endian_read_16(event, 4);
1875 }
1876 /**
1877  * @brief Get field value_length from event GATT_EVENT_INDICATION
1878  * @param event packet
1879  * @return value_length
1880  * @note: btstack_type L
1881  */
1882 static inline int gatt_event_indication_get_value_length(const uint8_t * event){
1883     return little_endian_read_16(event, 6);
1884 }
1885 /**
1886  * @brief Get field value from event GATT_EVENT_INDICATION
1887  * @param event packet
1888  * @return value
1889  * @note: btstack_type V
1890  */
1891 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){
1892     return &event[8];
1893 }
1894 #endif
1895 
1896 #ifdef ENABLE_BLE
1897 /**
1898  * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1899  * @param event packet
1900  * @return descriptor_handle
1901  * @note: btstack_type H
1902  */
1903 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){
1904     return little_endian_read_16(event, 2);
1905 }
1906 /**
1907  * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1908  * @param event packet
1909  * @return descriptor_length
1910  * @note: btstack_type 2
1911  */
1912 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1913     return little_endian_read_16(event, 4);
1914 }
1915 /**
1916  * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1917  * @param event packet
1918  * @return descriptor
1919  * @note: btstack_type L
1920  */
1921 static inline int gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
1922     return little_endian_read_16(event, 6);
1923 }
1924 #endif
1925 
1926 #ifdef ENABLE_BLE
1927 /**
1928  * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1929  * @param event packet
1930  * @return handle
1931  * @note: btstack_type H
1932  */
1933 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){
1934     return little_endian_read_16(event, 2);
1935 }
1936 /**
1937  * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1938  * @param event packet
1939  * @return descriptor_offset
1940  * @note: btstack_type 2
1941  */
1942 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){
1943     return little_endian_read_16(event, 4);
1944 }
1945 /**
1946  * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1947  * @param event packet
1948  * @return descriptor_length
1949  * @note: btstack_type L
1950  */
1951 static inline int gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){
1952     return little_endian_read_16(event, 6);
1953 }
1954 /**
1955  * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT
1956  * @param event packet
1957  * @return descriptor
1958  * @note: btstack_type V
1959  */
1960 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){
1961     return &event[8];
1962 }
1963 #endif
1964 
1965 #ifdef ENABLE_BLE
1966 /**
1967  * @brief Get field handle from event GATT_EVENT_MTU
1968  * @param event packet
1969  * @return handle
1970  * @note: btstack_type H
1971  */
1972 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){
1973     return little_endian_read_16(event, 2);
1974 }
1975 /**
1976  * @brief Get field MTU from event GATT_EVENT_MTU
1977  * @param event packet
1978  * @return MTU
1979  * @note: btstack_type 2
1980  */
1981 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){
1982     return little_endian_read_16(event, 4);
1983 }
1984 #endif
1985 
1986 /**
1987  * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
1988  * @param event packet
1989  * @return handle
1990  * @note: btstack_type H
1991  */
1992 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){
1993     return little_endian_read_16(event, 2);
1994 }
1995 /**
1996  * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE
1997  * @param event packet
1998  * @return MTU
1999  * @note: btstack_type 2
2000  */
2001 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){
2002     return little_endian_read_16(event, 4);
2003 }
2004 
2005 /**
2006  * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2007  * @param event packet
2008  * @return status
2009  * @note: btstack_type 1
2010  */
2011 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){
2012     return event[2];
2013 }
2014 /**
2015  * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2016  * @param event packet
2017  * @return conn_handle
2018  * @note: btstack_type H
2019  */
2020 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){
2021     return little_endian_read_16(event, 3);
2022 }
2023 /**
2024  * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE
2025  * @param event packet
2026  * @return attribute_handle
2027  * @note: btstack_type 2
2028  */
2029 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){
2030     return little_endian_read_16(event, 5);
2031 }
2032 
2033 
2034 /**
2035  * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED
2036  * @param event packet
2037  * @return status
2038  * @note: btstack_type 1
2039  */
2040 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){
2041     return event[2];
2042 }
2043 /**
2044  * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED
2045  * @param event packet
2046  * @return service_uuid
2047  * @note: btstack_type 2
2048  */
2049 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){
2050     return little_endian_read_16(event, 3);
2051 }
2052 
2053 /**
2054  * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED
2055  * @param event packet
2056  * @return status
2057  * @note: btstack_type 1
2058  */
2059 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){
2060     return event[2];
2061 }
2062 /**
2063  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED
2064  * @param event packet
2065  * @return bnep_cid
2066  * @note: btstack_type 2
2067  */
2068 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){
2069     return little_endian_read_16(event, 3);
2070 }
2071 /**
2072  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED
2073  * @param event packet
2074  * @return source_uuid
2075  * @note: btstack_type 2
2076  */
2077 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){
2078     return little_endian_read_16(event, 5);
2079 }
2080 /**
2081  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED
2082  * @param event packet
2083  * @return destination_uuid
2084  * @note: btstack_type 2
2085  */
2086 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){
2087     return little_endian_read_16(event, 7);
2088 }
2089 /**
2090  * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED
2091  * @param event packet
2092  * @return mtu
2093  * @note: btstack_type 2
2094  */
2095 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){
2096     return little_endian_read_16(event, 9);
2097 }
2098 /**
2099  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED
2100  * @param event packet
2101  * @param Pointer to storage for remote_address
2102  * @note: btstack_type B
2103  */
2104 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2105     reverse_bd_addr(&event[11], remote_address);
2106 }
2107 
2108 /**
2109  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED
2110  * @param event packet
2111  * @return bnep_cid
2112  * @note: btstack_type 2
2113  */
2114 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){
2115     return little_endian_read_16(event, 2);
2116 }
2117 /**
2118  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2119  * @param event packet
2120  * @return source_uuid
2121  * @note: btstack_type 2
2122  */
2123 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){
2124     return little_endian_read_16(event, 4);
2125 }
2126 /**
2127  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED
2128  * @param event packet
2129  * @return destination_uuid
2130  * @note: btstack_type 2
2131  */
2132 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){
2133     return little_endian_read_16(event, 6);
2134 }
2135 /**
2136  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED
2137  * @param event packet
2138  * @param Pointer to storage for remote_address
2139  * @note: btstack_type B
2140  */
2141 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2142     reverse_bd_addr(&event[8], remote_address);
2143 }
2144 
2145 /**
2146  * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT
2147  * @param event packet
2148  * @return bnep_cid
2149  * @note: btstack_type 2
2150  */
2151 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){
2152     return little_endian_read_16(event, 2);
2153 }
2154 /**
2155  * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2156  * @param event packet
2157  * @return source_uuid
2158  * @note: btstack_type 2
2159  */
2160 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){
2161     return little_endian_read_16(event, 4);
2162 }
2163 /**
2164  * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT
2165  * @param event packet
2166  * @return destination_uuid
2167  * @note: btstack_type 2
2168  */
2169 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){
2170     return little_endian_read_16(event, 6);
2171 }
2172 /**
2173  * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT
2174  * @param event packet
2175  * @param Pointer to storage for remote_address
2176  * @note: btstack_type B
2177  */
2178 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2179     reverse_bd_addr(&event[8], remote_address);
2180 }
2181 /**
2182  * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT
2183  * @param event packet
2184  * @return channel_state
2185  * @note: btstack_type 1
2186  */
2187 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){
2188     return event[14];
2189 }
2190 
2191 /**
2192  * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW
2193  * @param event packet
2194  * @return bnep_cid
2195  * @note: btstack_type 2
2196  */
2197 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){
2198     return little_endian_read_16(event, 2);
2199 }
2200 /**
2201  * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW
2202  * @param event packet
2203  * @return source_uuid
2204  * @note: btstack_type 2
2205  */
2206 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){
2207     return little_endian_read_16(event, 4);
2208 }
2209 /**
2210  * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW
2211  * @param event packet
2212  * @return destination_uuid
2213  * @note: btstack_type 2
2214  */
2215 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){
2216     return little_endian_read_16(event, 6);
2217 }
2218 /**
2219  * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW
2220  * @param event packet
2221  * @param Pointer to storage for remote_address
2222  * @note: btstack_type B
2223  */
2224 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
2225     reverse_bd_addr(&event[8], remote_address);
2226 }
2227 
2228 #ifdef ENABLE_BLE
2229 /**
2230  * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST
2231  * @param event packet
2232  * @return handle
2233  * @note: btstack_type H
2234  */
2235 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){
2236     return little_endian_read_16(event, 2);
2237 }
2238 /**
2239  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST
2240  * @param event packet
2241  * @return addr_type
2242  * @note: btstack_type 1
2243  */
2244 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){
2245     return event[4];
2246 }
2247 /**
2248  * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST
2249  * @param event packet
2250  * @param Pointer to storage for address
2251  * @note: btstack_type B
2252  */
2253 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){
2254     reverse_bd_addr(&event[5], address);
2255 }
2256 #endif
2257 
2258 #ifdef ENABLE_BLE
2259 /**
2260  * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL
2261  * @param event packet
2262  * @return handle
2263  * @note: btstack_type H
2264  */
2265 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){
2266     return little_endian_read_16(event, 2);
2267 }
2268 /**
2269  * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL
2270  * @param event packet
2271  * @return addr_type
2272  * @note: btstack_type 1
2273  */
2274 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){
2275     return event[4];
2276 }
2277 /**
2278  * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL
2279  * @param event packet
2280  * @param Pointer to storage for address
2281  * @note: btstack_type B
2282  */
2283 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){
2284     reverse_bd_addr(&event[5], address);
2285 }
2286 #endif
2287 
2288 #ifdef ENABLE_BLE
2289 /**
2290  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2291  * @param event packet
2292  * @return handle
2293  * @note: btstack_type H
2294  */
2295 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){
2296     return little_endian_read_16(event, 2);
2297 }
2298 /**
2299  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2300  * @param event packet
2301  * @return addr_type
2302  * @note: btstack_type 1
2303  */
2304 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){
2305     return event[4];
2306 }
2307 /**
2308  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2309  * @param event packet
2310  * @param Pointer to storage for address
2311  * @note: btstack_type B
2312  */
2313 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){
2314     reverse_bd_addr(&event[5], address);
2315 }
2316 /**
2317  * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
2318  * @param event packet
2319  * @return passkey
2320  * @note: btstack_type 4
2321  */
2322 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){
2323     return little_endian_read_32(event, 11);
2324 }
2325 #endif
2326 
2327 #ifdef ENABLE_BLE
2328 /**
2329  * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2330  * @param event packet
2331  * @return handle
2332  * @note: btstack_type H
2333  */
2334 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){
2335     return little_endian_read_16(event, 2);
2336 }
2337 /**
2338  * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2339  * @param event packet
2340  * @return addr_type
2341  * @note: btstack_type 1
2342  */
2343 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){
2344     return event[4];
2345 }
2346 /**
2347  * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL
2348  * @param event packet
2349  * @param Pointer to storage for address
2350  * @note: btstack_type B
2351  */
2352 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){
2353     reverse_bd_addr(&event[5], address);
2354 }
2355 #endif
2356 
2357 #ifdef ENABLE_BLE
2358 /**
2359  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER
2360  * @param event packet
2361  * @return handle
2362  * @note: btstack_type H
2363  */
2364 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){
2365     return little_endian_read_16(event, 2);
2366 }
2367 /**
2368  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER
2369  * @param event packet
2370  * @return addr_type
2371  * @note: btstack_type 1
2372  */
2373 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){
2374     return event[4];
2375 }
2376 /**
2377  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER
2378  * @param event packet
2379  * @param Pointer to storage for address
2380  * @note: btstack_type B
2381  */
2382 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){
2383     reverse_bd_addr(&event[5], address);
2384 }
2385 #endif
2386 
2387 #ifdef ENABLE_BLE
2388 /**
2389  * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL
2390  * @param event packet
2391  * @return handle
2392  * @note: btstack_type H
2393  */
2394 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){
2395     return little_endian_read_16(event, 2);
2396 }
2397 /**
2398  * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL
2399  * @param event packet
2400  * @return addr_type
2401  * @note: btstack_type 1
2402  */
2403 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){
2404     return event[4];
2405 }
2406 /**
2407  * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL
2408  * @param event packet
2409  * @param Pointer to storage for address
2410  * @note: btstack_type B
2411  */
2412 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){
2413     reverse_bd_addr(&event[5], address);
2414 }
2415 #endif
2416 
2417 #ifdef ENABLE_BLE
2418 /**
2419  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2420  * @param event packet
2421  * @return handle
2422  * @note: btstack_type H
2423  */
2424 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){
2425     return little_endian_read_16(event, 2);
2426 }
2427 /**
2428  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2429  * @param event packet
2430  * @return addr_type
2431  * @note: btstack_type 1
2432  */
2433 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){
2434     return event[4];
2435 }
2436 /**
2437  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2438  * @param event packet
2439  * @param Pointer to storage for address
2440  * @note: btstack_type B
2441  */
2442 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){
2443     reverse_bd_addr(&event[5], address);
2444 }
2445 /**
2446  * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
2447  * @param event packet
2448  * @return passkey
2449  * @note: btstack_type 4
2450  */
2451 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){
2452     return little_endian_read_32(event, 11);
2453 }
2454 #endif
2455 
2456 #ifdef ENABLE_BLE
2457 /**
2458  * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2459  * @param event packet
2460  * @return handle
2461  * @note: btstack_type H
2462  */
2463 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){
2464     return little_endian_read_16(event, 2);
2465 }
2466 /**
2467  * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2468  * @param event packet
2469  * @return addr_type
2470  * @note: btstack_type 1
2471  */
2472 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){
2473     return event[4];
2474 }
2475 /**
2476  * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
2477  * @param event packet
2478  * @param Pointer to storage for address
2479  * @note: btstack_type B
2480  */
2481 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){
2482     reverse_bd_addr(&event[5], address);
2483 }
2484 #endif
2485 
2486 #ifdef ENABLE_BLE
2487 /**
2488  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2489  * @param event packet
2490  * @return handle
2491  * @note: btstack_type H
2492  */
2493 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){
2494     return little_endian_read_16(event, 2);
2495 }
2496 /**
2497  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2498  * @param event packet
2499  * @return addr_type
2500  * @note: btstack_type 1
2501  */
2502 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){
2503     return event[4];
2504 }
2505 /**
2506  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED
2507  * @param event packet
2508  * @param Pointer to storage for address
2509  * @note: btstack_type B
2510  */
2511 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){
2512     reverse_bd_addr(&event[5], address);
2513 }
2514 #endif
2515 
2516 #ifdef ENABLE_BLE
2517 /**
2518  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2519  * @param event packet
2520  * @return handle
2521  * @note: btstack_type H
2522  */
2523 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){
2524     return little_endian_read_16(event, 2);
2525 }
2526 /**
2527  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2528  * @param event packet
2529  * @return addr_type
2530  * @note: btstack_type 1
2531  */
2532 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){
2533     return event[4];
2534 }
2535 /**
2536  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED
2537  * @param event packet
2538  * @param Pointer to storage for address
2539  * @note: btstack_type B
2540  */
2541 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){
2542     reverse_bd_addr(&event[5], address);
2543 }
2544 #endif
2545 
2546 #ifdef ENABLE_BLE
2547 /**
2548  * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2549  * @param event packet
2550  * @return handle
2551  * @note: btstack_type H
2552  */
2553 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){
2554     return little_endian_read_16(event, 2);
2555 }
2556 /**
2557  * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2558  * @param event packet
2559  * @return addr_type
2560  * @note: btstack_type 1
2561  */
2562 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){
2563     return event[4];
2564 }
2565 /**
2566  * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2567  * @param event packet
2568  * @param Pointer to storage for address
2569  * @note: btstack_type B
2570  */
2571 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){
2572     reverse_bd_addr(&event[5], address);
2573 }
2574 /**
2575  * @brief Get field le_device_db_index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
2576  * @param event packet
2577  * @return le_device_db_index
2578  * @note: btstack_type 2
2579  */
2580 static inline uint16_t sm_event_identity_resolving_succeeded_get_le_device_db_index(const uint8_t * event){
2581     return little_endian_read_16(event, 11);
2582 }
2583 #endif
2584 
2585 #ifdef ENABLE_BLE
2586 /**
2587  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST
2588  * @param event packet
2589  * @return handle
2590  * @note: btstack_type H
2591  */
2592 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){
2593     return little_endian_read_16(event, 2);
2594 }
2595 /**
2596  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST
2597  * @param event packet
2598  * @return addr_type
2599  * @note: btstack_type 1
2600  */
2601 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){
2602     return event[4];
2603 }
2604 /**
2605  * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST
2606  * @param event packet
2607  * @param Pointer to storage for address
2608  * @note: btstack_type B
2609  */
2610 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){
2611     reverse_bd_addr(&event[5], address);
2612 }
2613 #endif
2614 
2615 #ifdef ENABLE_BLE
2616 /**
2617  * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT
2618  * @param event packet
2619  * @return handle
2620  * @note: btstack_type H
2621  */
2622 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){
2623     return little_endian_read_16(event, 2);
2624 }
2625 /**
2626  * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT
2627  * @param event packet
2628  * @return addr_type
2629  * @note: btstack_type 1
2630  */
2631 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){
2632     return event[4];
2633 }
2634 /**
2635  * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT
2636  * @param event packet
2637  * @param Pointer to storage for address
2638  * @note: btstack_type B
2639  */
2640 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){
2641     reverse_bd_addr(&event[5], address);
2642 }
2643 /**
2644  * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT
2645  * @param event packet
2646  * @return authorization_result
2647  * @note: btstack_type 1
2648  */
2649 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){
2650     return event[11];
2651 }
2652 #endif
2653 
2654 #ifdef ENABLE_BLE
2655 /**
2656  * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION
2657  * @param event packet
2658  * @return handle
2659  * @note: btstack_type H
2660  */
2661 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){
2662     return little_endian_read_16(event, 2);
2663 }
2664 /**
2665  * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION
2666  * @param event packet
2667  * @return action
2668  * @note: btstack_type 1
2669  */
2670 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){
2671     return event[4];
2672 }
2673 #endif
2674 
2675 /**
2676  * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL
2677  * @param event packet
2678  * @return handle
2679  * @note: btstack_type H
2680  */
2681 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){
2682     return little_endian_read_16(event, 2);
2683 }
2684 /**
2685  * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL
2686  * @param event packet
2687  * @return security_level
2688  * @note: btstack_type 1
2689  */
2690 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){
2691     return event[4];
2692 }
2693 
2694 /**
2695  * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2696  * @param event packet
2697  * @return status
2698  * @note: btstack_type 1
2699  */
2700 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){
2701     return event[2];
2702 }
2703 /**
2704  * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
2705  * @param event packet
2706  * @param Pointer to storage for address
2707  * @note: btstack_type B
2708  */
2709 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){
2710     reverse_bd_addr(&event[3], address);
2711 }
2712 
2713 /**
2714  * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT
2715  * @param event packet
2716  * @return advertising_event_type
2717  * @note: btstack_type 1
2718  */
2719 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){
2720     return event[2];
2721 }
2722 /**
2723  * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT
2724  * @param event packet
2725  * @return address_type
2726  * @note: btstack_type 1
2727  */
2728 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){
2729     return event[3];
2730 }
2731 /**
2732  * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT
2733  * @param event packet
2734  * @param Pointer to storage for address
2735  * @note: btstack_type B
2736  */
2737 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){
2738     reverse_bd_addr(&event[4], address);
2739 }
2740 /**
2741  * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT
2742  * @param event packet
2743  * @return rssi
2744  * @note: btstack_type 1
2745  */
2746 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){
2747     return event[10];
2748 }
2749 /**
2750  * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT
2751  * @param event packet
2752  * @return data_length
2753  * @note: btstack_type J
2754  */
2755 static inline int gap_event_advertising_report_get_data_length(const uint8_t * event){
2756     return event[11];
2757 }
2758 /**
2759  * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT
2760  * @param event packet
2761  * @return data
2762  * @note: btstack_type V
2763  */
2764 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){
2765     return &event[12];
2766 }
2767 
2768 /**
2769  * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2770  * @param event packet
2771  * @return status
2772  * @note: btstack_type 1
2773  */
2774 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){
2775     return event[3];
2776 }
2777 /**
2778  * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2779  * @param event packet
2780  * @return connection_handle
2781  * @note: btstack_type H
2782  */
2783 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){
2784     return little_endian_read_16(event, 4);
2785 }
2786 /**
2787  * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2788  * @param event packet
2789  * @return role
2790  * @note: btstack_type 1
2791  */
2792 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){
2793     return event[6];
2794 }
2795 /**
2796  * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2797  * @param event packet
2798  * @return peer_address_type
2799  * @note: btstack_type 1
2800  */
2801 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){
2802     return event[7];
2803 }
2804 /**
2805  * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2806  * @param event packet
2807  * @param Pointer to storage for peer_address
2808  * @note: btstack_type B
2809  */
2810 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){
2811     reverse_bd_addr(&event[8], peer_address);
2812 }
2813 /**
2814  * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2815  * @param event packet
2816  * @return conn_interval
2817  * @note: btstack_type 2
2818  */
2819 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){
2820     return little_endian_read_16(event, 14);
2821 }
2822 /**
2823  * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2824  * @param event packet
2825  * @return conn_latency
2826  * @note: btstack_type 2
2827  */
2828 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){
2829     return little_endian_read_16(event, 16);
2830 }
2831 /**
2832  * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2833  * @param event packet
2834  * @return supervision_timeout
2835  * @note: btstack_type 2
2836  */
2837 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){
2838     return little_endian_read_16(event, 18);
2839 }
2840 /**
2841  * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
2842  * @param event packet
2843  * @return master_clock_accuracy
2844  * @note: btstack_type 1
2845  */
2846 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){
2847     return event[20];
2848 }
2849 
2850 /**
2851  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE
2852  * @param event packet
2853  * @return status
2854  * @note: btstack_type 1
2855  */
2856 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){
2857     return event[3];
2858 }
2859 
2860 /**
2861  * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE
2862  * @param event packet
2863  * @return status
2864  * @note: btstack_type 1
2865  */
2866 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){
2867     return event[3];
2868 }
2869 
2870 /**
2871  * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
2872  * @param event packet
2873  * @return status
2874  * @note: btstack_type 1
2875  */
2876 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){
2877     return event[3];
2878 }
2879 /**
2880  * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE
2881  * @param event packet
2882  * @return handle
2883  * @note: btstack_type H
2884  */
2885 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){
2886     return little_endian_read_16(event, 4);
2887 }
2888 
2889 /**
2890  * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE
2891  * @param event packet
2892  * @return status
2893  * @note: btstack_type 1
2894  */
2895 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){
2896     return event[3];
2897 }
2898 
2899 
2900 /**
2901  * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED
2902  * @param event packet
2903  * @return gain
2904  * @note: btstack_type 1
2905  */
2906 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){
2907     return event[3];
2908 }
2909 
2910 /**
2911  * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED
2912  * @param event packet
2913  * @return gain
2914  * @note: btstack_type 1
2915  */
2916 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){
2917     return event[3];
2918 }
2919 
2920 /**
2921  * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND
2922  * @param event packet
2923  * @return value_length
2924  * @note: btstack_type J
2925  */
2926 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){
2927     return event[3];
2928 }
2929 /**
2930  * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND
2931  * @param event packet
2932  * @return value
2933  * @note: btstack_type V
2934  */
2935 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){
2936     return &event[4];
2937 }
2938 
2939 /**
2940  * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION
2941  * @param event packet
2942  * @return value_length
2943  * @note: btstack_type J
2944  */
2945 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){
2946     return event[3];
2947 }
2948 /**
2949  * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION
2950  * @param event packet
2951  * @return value
2952  * @note: btstack_type V
2953  */
2954 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){
2955     return &event[4];
2956 }
2957 
2958 /**
2959  * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
2960  * @param event packet
2961  * @return status
2962  * @note: btstack_type 1
2963  */
2964 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){
2965     return event[3];
2966 }
2967 /**
2968  * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
2969  * @param event packet
2970  * @return con_handle
2971  * @note: btstack_type H
2972  */
2973 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){
2974     return little_endian_read_16(event, 4);
2975 }
2976 /**
2977  * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED
2978  * @param event packet
2979  * @param Pointer to storage for bd_addr
2980  * @note: btstack_type B
2981  */
2982 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
2983     reverse_bd_addr(&event[6], bd_addr);
2984 }
2985 
2986 
2987 /**
2988  * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
2989  * @param event packet
2990  * @return status
2991  * @note: btstack_type 1
2992  */
2993 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){
2994     return event[3];
2995 }
2996 /**
2997  * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
2998  * @param event packet
2999  * @return handle
3000  * @note: btstack_type H
3001  */
3002 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){
3003     return little_endian_read_16(event, 4);
3004 }
3005 /**
3006  * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3007  * @param event packet
3008  * @param Pointer to storage for bd_addr
3009  * @note: btstack_type B
3010  */
3011 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
3012     reverse_bd_addr(&event[6], bd_addr);
3013 }
3014 /**
3015  * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
3016  * @param event packet
3017  * @return negotiated_codec
3018  * @note: btstack_type 1
3019  */
3020 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){
3021     return event[12];
3022 }
3023 
3024 
3025 /**
3026  * @brief Get field status from event HFP_SUBEVENT_COMPLETE
3027  * @param event packet
3028  * @return status
3029  * @note: btstack_type 1
3030  */
3031 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){
3032     return event[3];
3033 }
3034 
3035 /**
3036  * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3037  * @param event packet
3038  * @return indicator_index
3039  * @note: btstack_type 1
3040  */
3041 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){
3042     return event[3];
3043 }
3044 /**
3045  * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3046  * @param event packet
3047  * @return indicator_status
3048  * @note: btstack_type 1
3049  */
3050 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){
3051     return event[4];
3052 }
3053 /**
3054  * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED
3055  * @param event packet
3056  * @return indicator_name
3057  * @note: btstack_type T
3058  */
3059 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){
3060     return (const char *) &event[5];
3061 }
3062 
3063 /**
3064  * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3065  * @param event packet
3066  * @return network_operator_mode
3067  * @note: btstack_type 1
3068  */
3069 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){
3070     return event[3];
3071 }
3072 /**
3073  * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3074  * @param event packet
3075  * @return network_operator_format
3076  * @note: btstack_type 1
3077  */
3078 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){
3079     return event[4];
3080 }
3081 /**
3082  * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED
3083  * @param event packet
3084  * @return network_operator_name
3085  * @note: btstack_type 1
3086  */
3087 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){
3088     return event[5];
3089 }
3090 
3091 /**
3092  * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR
3093  * @param event packet
3094  * @return error
3095  * @note: btstack_type 1
3096  */
3097 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){
3098     return event[3];
3099 }
3100 
3101 
3102 
3103 
3104 /**
3105  * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER
3106  * @param event packet
3107  * @return number
3108  * @note: btstack_type T
3109  */
3110 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){
3111     return (const char *) &event[3];
3112 }
3113 
3114 
3115 /**
3116  * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG
3117  * @param event packet
3118  * @return number
3119  * @note: btstack_type T
3120  */
3121 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){
3122     return (const char *) &event[3];
3123 }
3124 
3125 /**
3126  * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES
3127  * @param event packet
3128  * @return dtmf
3129  * @note: btstack_type T
3130  */
3131 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){
3132     return (const char *) &event[3];
3133 }
3134 
3135 
3136 
3137 
3138 /**
3139  * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME
3140  * @param event packet
3141  * @return status
3142  * @note: btstack_type 1
3143  */
3144 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){
3145     return event[3];
3146 }
3147 /**
3148  * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME
3149  * @param event packet
3150  * @return gain
3151  * @note: btstack_type 1
3152  */
3153 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){
3154     return event[4];
3155 }
3156 
3157 /**
3158  * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME
3159  * @param event packet
3160  * @return status
3161  * @note: btstack_type 1
3162  */
3163 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){
3164     return event[3];
3165 }
3166 /**
3167  * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME
3168  * @param event packet
3169  * @return gain
3170  * @note: btstack_type 1
3171  */
3172 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){
3173     return event[4];
3174 }
3175 
3176 /**
3177  * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3178  * @param event packet
3179  * @return type
3180  * @note: btstack_type 1
3181  */
3182 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){
3183     return event[3];
3184 }
3185 /**
3186  * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION
3187  * @param event packet
3188  * @return number
3189  * @note: btstack_type T
3190  */
3191 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){
3192     return (const char *) &event[4];
3193 }
3194 
3195 /**
3196  * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3197  * @param event packet
3198  * @return type
3199  * @note: btstack_type 1
3200  */
3201 static inline uint8_t hfp_subevent_calling_line_indetification_notification_get_type(const uint8_t * event){
3202     return event[3];
3203 }
3204 /**
3205  * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION
3206  * @param event packet
3207  * @return number
3208  * @note: btstack_type T
3209  */
3210 static inline const char * hfp_subevent_calling_line_indetification_notification_get_number(const uint8_t * event){
3211     return (const char *) &event[4];
3212 }
3213 
3214 /**
3215  * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3216  * @param event packet
3217  * @return clcc_idx
3218  * @note: btstack_type 1
3219  */
3220 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){
3221     return event[3];
3222 }
3223 /**
3224  * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3225  * @param event packet
3226  * @return clcc_dir
3227  * @note: btstack_type 1
3228  */
3229 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){
3230     return event[4];
3231 }
3232 /**
3233  * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3234  * @param event packet
3235  * @return clcc_status
3236  * @note: btstack_type 1
3237  */
3238 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){
3239     return event[5];
3240 }
3241 /**
3242  * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3243  * @param event packet
3244  * @return clcc_mpty
3245  * @note: btstack_type 1
3246  */
3247 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){
3248     return event[6];
3249 }
3250 /**
3251  * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3252  * @param event packet
3253  * @return bnip_type
3254  * @note: btstack_type 1
3255  */
3256 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){
3257     return event[7];
3258 }
3259 /**
3260  * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS
3261  * @param event packet
3262  * @return bnip_number
3263  * @note: btstack_type T
3264  */
3265 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){
3266     return (const char *) &event[8];
3267 }
3268 
3269 /**
3270  * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3271  * @param event packet
3272  * @return status
3273  * @note: btstack_type 1
3274  */
3275 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){
3276     return event[3];
3277 }
3278 /**
3279  * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3280  * @param event packet
3281  * @return bnip_type
3282  * @note: btstack_type 1
3283  */
3284 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){
3285     return event[4];
3286 }
3287 /**
3288  * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION
3289  * @param event packet
3290  * @return bnip_number
3291  * @note: btstack_type T
3292  */
3293 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){
3294     return (const char *) &event[5];
3295 }
3296 
3297 /**
3298  * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS
3299  * @param event packet
3300  * @return value
3301  * @note: btstack_type T
3302  */
3303 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){
3304     return (const char *) &event[3];
3305 }
3306 
3307 #ifdef ENABLE_BLE
3308 /**
3309  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED
3310  * @param event packet
3311  * @return handle
3312  * @note: btstack_type H
3313  */
3314 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){
3315     return little_endian_read_16(event, 3);
3316 }
3317 #endif
3318 
3319 #ifdef ENABLE_BLE
3320 /**
3321  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3322  * @param event packet
3323  * @return handle
3324  * @note: btstack_type H
3325  */
3326 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){
3327     return little_endian_read_16(event, 3);
3328 }
3329 /**
3330  * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3331  * @param event packet
3332  * @return attribute_id
3333  * @note: btstack_type 2
3334  */
3335 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){
3336     return little_endian_read_16(event, 5);
3337 }
3338 /**
3339  * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION
3340  * @param event packet
3341  * @return text
3342  * @note: btstack_type T
3343  */
3344 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){
3345     return (const char *) &event[7];
3346 }
3347 #endif
3348 
3349 #ifdef ENABLE_BLE
3350 /**
3351  * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED
3352  * @param event packet
3353  * @return handle
3354  * @note: btstack_type H
3355  */
3356 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){
3357     return little_endian_read_16(event, 3);
3358 }
3359 #endif
3360 
3361 
3362 
3363 /* API_END */
3364 
3365 #if defined __cplusplus
3366 }
3367 #endif
3368 
3369 #endif // __BTSTACK_EVENT_H
3370