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