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