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