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