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