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_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4013 * @param event packet 4014 * @return clcc_mpty 4015 * @note: btstack_type 1 4016 */ 4017 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 4018 return event[6]; 4019 } 4020 /** 4021 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4022 * @param event packet 4023 * @return bnip_type 4024 * @note: btstack_type 1 4025 */ 4026 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 4027 return event[7]; 4028 } 4029 /** 4030 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4031 * @param event packet 4032 * @return bnip_number 4033 * @note: btstack_type T 4034 */ 4035 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 4036 return (const char *) &event[8]; 4037 } 4038 4039 /** 4040 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4041 * @param event packet 4042 * @return status 4043 * @note: btstack_type 1 4044 */ 4045 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 4046 return event[3]; 4047 } 4048 /** 4049 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4050 * @param event packet 4051 * @return bnip_type 4052 * @note: btstack_type 1 4053 */ 4054 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 4055 return event[4]; 4056 } 4057 /** 4058 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4059 * @param event packet 4060 * @return bnip_number 4061 * @note: btstack_type T 4062 */ 4063 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 4064 return (const char *) &event[5]; 4065 } 4066 4067 /** 4068 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 4069 * @param event packet 4070 * @return value 4071 * @note: btstack_type T 4072 */ 4073 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 4074 return (const char *) &event[3]; 4075 } 4076 4077 #ifdef ENABLE_BLE 4078 /** 4079 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 4080 * @param event packet 4081 * @return handle 4082 * @note: btstack_type H 4083 */ 4084 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 4085 return little_endian_read_16(event, 3); 4086 } 4087 #endif 4088 4089 #ifdef ENABLE_BLE 4090 /** 4091 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4092 * @param event packet 4093 * @return handle 4094 * @note: btstack_type H 4095 */ 4096 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 4097 return little_endian_read_16(event, 3); 4098 } 4099 /** 4100 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4101 * @param event packet 4102 * @return attribute_id 4103 * @note: btstack_type 2 4104 */ 4105 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 4106 return little_endian_read_16(event, 5); 4107 } 4108 /** 4109 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4110 * @param event packet 4111 * @return text 4112 * @note: btstack_type T 4113 */ 4114 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 4115 return (const char *) &event[7]; 4116 } 4117 #endif 4118 4119 #ifdef ENABLE_BLE 4120 /** 4121 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 4122 * @param event packet 4123 * @return handle 4124 * @note: btstack_type H 4125 */ 4126 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 4127 return little_endian_read_16(event, 3); 4128 } 4129 #endif 4130 4131 /** 4132 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4133 * @param event packet 4134 * @return avdtp_cid 4135 * @note: btstack_type 2 4136 */ 4137 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 4138 return little_endian_read_16(event, 3); 4139 } 4140 /** 4141 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4142 * @param event packet 4143 * @return local_seid 4144 * @note: btstack_type 1 4145 */ 4146 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 4147 return event[5]; 4148 } 4149 /** 4150 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4151 * @param event packet 4152 * @return signal_identifier 4153 * @note: btstack_type 1 4154 */ 4155 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 4156 return event[6]; 4157 } 4158 4159 /** 4160 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4161 * @param event packet 4162 * @return avdtp_cid 4163 * @note: btstack_type 2 4164 */ 4165 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 4166 return little_endian_read_16(event, 3); 4167 } 4168 /** 4169 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4170 * @param event packet 4171 * @return local_seid 4172 * @note: btstack_type 1 4173 */ 4174 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 4175 return event[5]; 4176 } 4177 /** 4178 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 4179 * @param event packet 4180 * @return signal_identifier 4181 * @note: btstack_type 1 4182 */ 4183 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 4184 return event[6]; 4185 } 4186 4187 /** 4188 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4189 * @param event packet 4190 * @return avdtp_cid 4191 * @note: btstack_type 2 4192 */ 4193 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 4194 return little_endian_read_16(event, 3); 4195 } 4196 /** 4197 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4198 * @param event packet 4199 * @return local_seid 4200 * @note: btstack_type 1 4201 */ 4202 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 4203 return event[5]; 4204 } 4205 /** 4206 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4207 * @param event packet 4208 * @return signal_identifier 4209 * @note: btstack_type 1 4210 */ 4211 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 4212 return event[6]; 4213 } 4214 4215 /** 4216 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4217 * @param event packet 4218 * @return avdtp_cid 4219 * @note: btstack_type 2 4220 */ 4221 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 4222 return little_endian_read_16(event, 3); 4223 } 4224 /** 4225 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4226 * @param event packet 4227 * @param Pointer to storage for bd_addr 4228 * @note: btstack_type B 4229 */ 4230 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4231 reverse_bd_addr(&event[5], bd_addr); 4232 } 4233 /** 4234 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4235 * @param event packet 4236 * @return status 4237 * @note: btstack_type 1 4238 */ 4239 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 4240 return event[11]; 4241 } 4242 4243 /** 4244 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 4245 * @param event packet 4246 * @return avdtp_cid 4247 * @note: btstack_type 2 4248 */ 4249 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 4250 return little_endian_read_16(event, 3); 4251 } 4252 4253 /** 4254 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4255 * @param event packet 4256 * @return avdtp_cid 4257 * @note: btstack_type 2 4258 */ 4259 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 4260 return little_endian_read_16(event, 3); 4261 } 4262 /** 4263 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4264 * @param event packet 4265 * @return remote_seid 4266 * @note: btstack_type 1 4267 */ 4268 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 4269 return event[5]; 4270 } 4271 /** 4272 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4273 * @param event packet 4274 * @return in_use 4275 * @note: btstack_type 1 4276 */ 4277 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 4278 return event[6]; 4279 } 4280 /** 4281 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4282 * @param event packet 4283 * @return media_type 4284 * @note: btstack_type 1 4285 */ 4286 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 4287 return event[7]; 4288 } 4289 /** 4290 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4291 * @param event packet 4292 * @return sep_type 4293 * @note: btstack_type 1 4294 */ 4295 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 4296 return event[8]; 4297 } 4298 4299 /** 4300 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4301 * @param event packet 4302 * @return avdtp_cid 4303 * @note: btstack_type 2 4304 */ 4305 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 4306 return little_endian_read_16(event, 3); 4307 } 4308 /** 4309 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4310 * @param event packet 4311 * @return local_seid 4312 * @note: btstack_type 1 4313 */ 4314 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_local_seid(const uint8_t * event){ 4315 return event[5]; 4316 } 4317 /** 4318 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4319 * @param event packet 4320 * @return remote_seid 4321 * @note: btstack_type 1 4322 */ 4323 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 4324 return event[6]; 4325 } 4326 /** 4327 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4328 * @param event packet 4329 * @return media_type 4330 * @note: btstack_type 1 4331 */ 4332 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 4333 return event[7]; 4334 } 4335 /** 4336 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4337 * @param event packet 4338 * @return sampling_frequency_bitmap 4339 * @note: btstack_type 1 4340 */ 4341 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4342 return event[8]; 4343 } 4344 /** 4345 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4346 * @param event packet 4347 * @return channel_mode_bitmap 4348 * @note: btstack_type 1 4349 */ 4350 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 4351 return event[9]; 4352 } 4353 /** 4354 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4355 * @param event packet 4356 * @return block_length_bitmap 4357 * @note: btstack_type 1 4358 */ 4359 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 4360 return event[10]; 4361 } 4362 /** 4363 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4364 * @param event packet 4365 * @return subbands_bitmap 4366 * @note: btstack_type 1 4367 */ 4368 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 4369 return event[11]; 4370 } 4371 /** 4372 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4373 * @param event packet 4374 * @return allocation_method_bitmap 4375 * @note: btstack_type 1 4376 */ 4377 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 4378 return event[12]; 4379 } 4380 /** 4381 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4382 * @param event packet 4383 * @return min_bitpool_value 4384 * @note: btstack_type 1 4385 */ 4386 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 4387 return event[13]; 4388 } 4389 /** 4390 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4391 * @param event packet 4392 * @return max_bitpool_value 4393 * @note: btstack_type 1 4394 */ 4395 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 4396 return event[14]; 4397 } 4398 4399 /** 4400 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4401 * @param event packet 4402 * @return avdtp_cid 4403 * @note: btstack_type 2 4404 */ 4405 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 4406 return little_endian_read_16(event, 3); 4407 } 4408 /** 4409 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4410 * @param event packet 4411 * @return local_seid 4412 * @note: btstack_type 1 4413 */ 4414 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_local_seid(const uint8_t * event){ 4415 return event[5]; 4416 } 4417 /** 4418 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4419 * @param event packet 4420 * @return remote_seid 4421 * @note: btstack_type 1 4422 */ 4423 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 4424 return event[6]; 4425 } 4426 /** 4427 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4428 * @param event packet 4429 * @return media_type 4430 * @note: btstack_type 1 4431 */ 4432 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 4433 return event[7]; 4434 } 4435 /** 4436 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4437 * @param event packet 4438 * @return media_codec_type 4439 * @note: btstack_type 2 4440 */ 4441 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 4442 return little_endian_read_16(event, 8); 4443 } 4444 /** 4445 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4446 * @param event packet 4447 * @return media_codec_information_len 4448 * @note: btstack_type L 4449 */ 4450 static inline int avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 4451 return little_endian_read_16(event, 10); 4452 } 4453 /** 4454 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4455 * @param event packet 4456 * @return media_codec_information 4457 * @note: btstack_type V 4458 */ 4459 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 4460 return &event[12]; 4461 } 4462 4463 /** 4464 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4465 * @param event packet 4466 * @return avdtp_cid 4467 * @note: btstack_type 2 4468 */ 4469 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 4470 return little_endian_read_16(event, 3); 4471 } 4472 /** 4473 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4474 * @param event packet 4475 * @return local_seid 4476 * @note: btstack_type 1 4477 */ 4478 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_local_seid(const uint8_t * event){ 4479 return event[5]; 4480 } 4481 /** 4482 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4483 * @param event packet 4484 * @return remote_seid 4485 * @note: btstack_type 1 4486 */ 4487 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 4488 return event[6]; 4489 } 4490 4491 /** 4492 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4493 * @param event packet 4494 * @return avdtp_cid 4495 * @note: btstack_type 2 4496 */ 4497 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4498 return little_endian_read_16(event, 3); 4499 } 4500 /** 4501 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4502 * @param event packet 4503 * @return local_seid 4504 * @note: btstack_type 1 4505 */ 4506 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_local_seid(const uint8_t * event){ 4507 return event[5]; 4508 } 4509 /** 4510 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4511 * @param event packet 4512 * @return remote_seid 4513 * @note: btstack_type 1 4514 */ 4515 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 4516 return event[6]; 4517 } 4518 4519 /** 4520 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4521 * @param event packet 4522 * @return avdtp_cid 4523 * @note: btstack_type 2 4524 */ 4525 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 4526 return little_endian_read_16(event, 3); 4527 } 4528 /** 4529 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4530 * @param event packet 4531 * @return local_seid 4532 * @note: btstack_type 1 4533 */ 4534 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_local_seid(const uint8_t * event){ 4535 return event[5]; 4536 } 4537 /** 4538 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4539 * @param event packet 4540 * @return remote_seid 4541 * @note: btstack_type 1 4542 */ 4543 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 4544 return event[6]; 4545 } 4546 /** 4547 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4548 * @param event packet 4549 * @return recovery_type 4550 * @note: btstack_type 1 4551 */ 4552 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 4553 return event[7]; 4554 } 4555 /** 4556 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4557 * @param event packet 4558 * @return maximum_recovery_window_size 4559 * @note: btstack_type 1 4560 */ 4561 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 4562 return event[8]; 4563 } 4564 /** 4565 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4566 * @param event packet 4567 * @return maximum_number_media_packets 4568 * @note: btstack_type 1 4569 */ 4570 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 4571 return event[9]; 4572 } 4573 4574 /** 4575 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4576 * @param event packet 4577 * @return avdtp_cid 4578 * @note: btstack_type 2 4579 */ 4580 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 4581 return little_endian_read_16(event, 3); 4582 } 4583 /** 4584 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4585 * @param event packet 4586 * @return local_seid 4587 * @note: btstack_type 1 4588 */ 4589 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_local_seid(const uint8_t * event){ 4590 return event[5]; 4591 } 4592 /** 4593 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4594 * @param event packet 4595 * @return remote_seid 4596 * @note: btstack_type 1 4597 */ 4598 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 4599 return event[6]; 4600 } 4601 /** 4602 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4603 * @param event packet 4604 * @return cp_type 4605 * @note: btstack_type 2 4606 */ 4607 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 4608 return little_endian_read_16(event, 7); 4609 } 4610 /** 4611 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4612 * @param event packet 4613 * @return cp_type_value_len 4614 * @note: btstack_type L 4615 */ 4616 static inline int avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 4617 return little_endian_read_16(event, 9); 4618 } 4619 /** 4620 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4621 * @param event packet 4622 * @return cp_type_value 4623 * @note: btstack_type V 4624 */ 4625 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 4626 return &event[11]; 4627 } 4628 4629 /** 4630 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4631 * @param event packet 4632 * @return avdtp_cid 4633 * @note: btstack_type 2 4634 */ 4635 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 4636 return little_endian_read_16(event, 3); 4637 } 4638 /** 4639 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4640 * @param event packet 4641 * @return local_seid 4642 * @note: btstack_type 1 4643 */ 4644 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_local_seid(const uint8_t * event){ 4645 return event[5]; 4646 } 4647 /** 4648 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4649 * @param event packet 4650 * @return remote_seid 4651 * @note: btstack_type 1 4652 */ 4653 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 4654 return event[6]; 4655 } 4656 /** 4657 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4658 * @param event packet 4659 * @return fragmentation 4660 * @note: btstack_type 1 4661 */ 4662 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 4663 return event[7]; 4664 } 4665 /** 4666 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4667 * @param event packet 4668 * @return transport_identifiers_num 4669 * @note: btstack_type 1 4670 */ 4671 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 4672 return event[8]; 4673 } 4674 /** 4675 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4676 * @param event packet 4677 * @return transport_session_identifier_1 4678 * @note: btstack_type 1 4679 */ 4680 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 4681 return event[9]; 4682 } 4683 /** 4684 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4685 * @param event packet 4686 * @return transport_session_identifier_2 4687 * @note: btstack_type 1 4688 */ 4689 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 4690 return event[10]; 4691 } 4692 /** 4693 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4694 * @param event packet 4695 * @return transport_session_identifier_3 4696 * @note: btstack_type 1 4697 */ 4698 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 4699 return event[11]; 4700 } 4701 /** 4702 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4703 * @param event packet 4704 * @return tcid_1 4705 * @note: btstack_type 1 4706 */ 4707 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 4708 return event[12]; 4709 } 4710 /** 4711 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4712 * @param event packet 4713 * @return tcid_2 4714 * @note: btstack_type 1 4715 */ 4716 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 4717 return event[13]; 4718 } 4719 /** 4720 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4721 * @param event packet 4722 * @return tcid_3 4723 * @note: btstack_type 1 4724 */ 4725 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 4726 return event[14]; 4727 } 4728 4729 /** 4730 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4731 * @param event packet 4732 * @return avdtp_cid 4733 * @note: btstack_type 2 4734 */ 4735 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4736 return little_endian_read_16(event, 3); 4737 } 4738 /** 4739 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4740 * @param event packet 4741 * @return local_seid 4742 * @note: btstack_type 1 4743 */ 4744 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_local_seid(const uint8_t * event){ 4745 return event[5]; 4746 } 4747 /** 4748 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4749 * @param event packet 4750 * @return remote_seid 4751 * @note: btstack_type 1 4752 */ 4753 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 4754 return event[6]; 4755 } 4756 4757 /** 4758 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4759 * @param event packet 4760 * @return avdtp_cid 4761 * @note: btstack_type 2 4762 */ 4763 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 4764 return little_endian_read_16(event, 3); 4765 } 4766 /** 4767 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4768 * @param event packet 4769 * @return local_seid 4770 * @note: btstack_type 1 4771 */ 4772 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_local_seid(const uint8_t * event){ 4773 return event[5]; 4774 } 4775 /** 4776 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4777 * @param event packet 4778 * @return remote_seid 4779 * @note: btstack_type 1 4780 */ 4781 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 4782 return event[6]; 4783 } 4784 /** 4785 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4786 * @param event packet 4787 * @return back_ch 4788 * @note: btstack_type 1 4789 */ 4790 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 4791 return event[7]; 4792 } 4793 /** 4794 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4795 * @param event packet 4796 * @return media 4797 * @note: btstack_type 1 4798 */ 4799 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 4800 return event[8]; 4801 } 4802 /** 4803 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4804 * @param event packet 4805 * @return recovery 4806 * @note: btstack_type 1 4807 */ 4808 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 4809 return event[9]; 4810 } 4811 4812 /** 4813 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4814 * @param event packet 4815 * @return avdtp_cid 4816 * @note: btstack_type 2 4817 */ 4818 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 4819 return little_endian_read_16(event, 3); 4820 } 4821 /** 4822 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4823 * @param event packet 4824 * @return local_seid 4825 * @note: btstack_type 1 4826 */ 4827 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 4828 return event[5]; 4829 } 4830 /** 4831 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4832 * @param event packet 4833 * @return remote_seid 4834 * @note: btstack_type 1 4835 */ 4836 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 4837 return event[6]; 4838 } 4839 /** 4840 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4841 * @param event packet 4842 * @return reconfigure 4843 * @note: btstack_type 1 4844 */ 4845 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 4846 return event[7]; 4847 } 4848 /** 4849 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4850 * @param event packet 4851 * @return media_type 4852 * @note: btstack_type 1 4853 */ 4854 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 4855 return event[8]; 4856 } 4857 /** 4858 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4859 * @param event packet 4860 * @return sampling_frequency 4861 * @note: btstack_type 2 4862 */ 4863 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 4864 return little_endian_read_16(event, 9); 4865 } 4866 /** 4867 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4868 * @param event packet 4869 * @return channel_mode 4870 * @note: btstack_type 1 4871 */ 4872 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 4873 return event[11]; 4874 } 4875 /** 4876 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4877 * @param event packet 4878 * @return num_channels 4879 * @note: btstack_type 1 4880 */ 4881 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 4882 return event[12]; 4883 } 4884 /** 4885 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4886 * @param event packet 4887 * @return block_length 4888 * @note: btstack_type 1 4889 */ 4890 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 4891 return event[13]; 4892 } 4893 /** 4894 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4895 * @param event packet 4896 * @return subbands 4897 * @note: btstack_type 1 4898 */ 4899 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 4900 return event[14]; 4901 } 4902 /** 4903 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4904 * @param event packet 4905 * @return allocation_method 4906 * @note: btstack_type 1 4907 */ 4908 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 4909 return event[15]; 4910 } 4911 /** 4912 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4913 * @param event packet 4914 * @return min_bitpool_value 4915 * @note: btstack_type 1 4916 */ 4917 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 4918 return event[16]; 4919 } 4920 /** 4921 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4922 * @param event packet 4923 * @return max_bitpool_value 4924 * @note: btstack_type 1 4925 */ 4926 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 4927 return event[17]; 4928 } 4929 4930 /** 4931 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4932 * @param event packet 4933 * @return avdtp_cid 4934 * @note: btstack_type 2 4935 */ 4936 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 4937 return little_endian_read_16(event, 3); 4938 } 4939 /** 4940 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4941 * @param event packet 4942 * @return local_seid 4943 * @note: btstack_type 1 4944 */ 4945 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 4946 return event[5]; 4947 } 4948 /** 4949 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4950 * @param event packet 4951 * @return remote_seid 4952 * @note: btstack_type 1 4953 */ 4954 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 4955 return event[6]; 4956 } 4957 /** 4958 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4959 * @param event packet 4960 * @return reconfigure 4961 * @note: btstack_type 1 4962 */ 4963 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 4964 return event[7]; 4965 } 4966 /** 4967 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4968 * @param event packet 4969 * @return media_type 4970 * @note: btstack_type 1 4971 */ 4972 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 4973 return event[8]; 4974 } 4975 /** 4976 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4977 * @param event packet 4978 * @return media_codec_type 4979 * @note: btstack_type 2 4980 */ 4981 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 4982 return little_endian_read_16(event, 9); 4983 } 4984 /** 4985 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4986 * @param event packet 4987 * @return media_codec_information_len 4988 * @note: btstack_type L 4989 */ 4990 static inline int avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 4991 return little_endian_read_16(event, 11); 4992 } 4993 /** 4994 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4995 * @param event packet 4996 * @return media_codec_information 4997 * @note: btstack_type V 4998 */ 4999 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5000 return &event[13]; 5001 } 5002 5003 /** 5004 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5005 * @param event packet 5006 * @return avdtp_cid 5007 * @note: btstack_type 2 5008 */ 5009 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 5010 return little_endian_read_16(event, 3); 5011 } 5012 /** 5013 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5014 * @param event packet 5015 * @param Pointer to storage for bd_addr 5016 * @note: btstack_type B 5017 */ 5018 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5019 reverse_bd_addr(&event[5], bd_addr); 5020 } 5021 /** 5022 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5023 * @param event packet 5024 * @return local_seid 5025 * @note: btstack_type 1 5026 */ 5027 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 5028 return event[11]; 5029 } 5030 /** 5031 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5032 * @param event packet 5033 * @return remote_seid 5034 * @note: btstack_type 1 5035 */ 5036 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 5037 return event[12]; 5038 } 5039 /** 5040 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5041 * @param event packet 5042 * @return status 5043 * @note: btstack_type 1 5044 */ 5045 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 5046 return event[13]; 5047 } 5048 5049 /** 5050 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5051 * @param event packet 5052 * @return avdtp_cid 5053 * @note: btstack_type 2 5054 */ 5055 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 5056 return little_endian_read_16(event, 3); 5057 } 5058 /** 5059 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5060 * @param event packet 5061 * @return local_seid 5062 * @note: btstack_type 1 5063 */ 5064 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 5065 return event[5]; 5066 } 5067 5068 /** 5069 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5070 * @param event packet 5071 * @return avdtp_cid 5072 * @note: btstack_type 2 5073 */ 5074 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 5075 return little_endian_read_16(event, 3); 5076 } 5077 /** 5078 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5079 * @param event packet 5080 * @return local_seid 5081 * @note: btstack_type 1 5082 */ 5083 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5084 return event[5]; 5085 } 5086 /** 5087 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5088 * @param event packet 5089 * @return sequence_number 5090 * @note: btstack_type 2 5091 */ 5092 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 5093 return little_endian_read_16(event, 6); 5094 } 5095 5096 /** 5097 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITY_DONE 5098 * @param event packet 5099 * @return avdtp_cid 5100 * @note: btstack_type 2 5101 */ 5102 static inline uint16_t avdtp_subevent_signaling_capability_done_get_avdtp_cid(const uint8_t * event){ 5103 return little_endian_read_16(event, 3); 5104 } 5105 /** 5106 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITY_DONE 5107 * @param event packet 5108 * @return local_seid 5109 * @note: btstack_type 1 5110 */ 5111 static inline uint8_t avdtp_subevent_signaling_capability_done_get_local_seid(const uint8_t * event){ 5112 return event[5]; 5113 } 5114 /** 5115 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITY_DONE 5116 * @param event packet 5117 * @return remote_seid 5118 * @note: btstack_type 1 5119 */ 5120 static inline uint8_t avdtp_subevent_signaling_capability_done_get_remote_seid(const uint8_t * event){ 5121 return event[6]; 5122 } 5123 5124 /** 5125 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE 5126 * @param event packet 5127 * @return avdtp_cid 5128 * @note: btstack_type 2 5129 */ 5130 static inline uint16_t avdtp_subevent_signaling_sep_dicovery_done_get_avdtp_cid(const uint8_t * event){ 5131 return little_endian_read_16(event, 3); 5132 } 5133 5134 /** 5135 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5136 * @param event packet 5137 * @return a2dp_cid 5138 * @note: btstack_type 2 5139 */ 5140 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 5141 return little_endian_read_16(event, 3); 5142 } 5143 /** 5144 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5145 * @param event packet 5146 * @return local_seid 5147 * @note: btstack_type 1 5148 */ 5149 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5150 return event[5]; 5151 } 5152 5153 /** 5154 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5155 * @param event packet 5156 * @return a2dp_cid 5157 * @note: btstack_type 2 5158 */ 5159 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 5160 return little_endian_read_16(event, 3); 5161 } 5162 /** 5163 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5164 * @param event packet 5165 * @return int_seid 5166 * @note: btstack_type 1 5167 */ 5168 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_int_seid(const uint8_t * event){ 5169 return event[5]; 5170 } 5171 /** 5172 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5173 * @param event packet 5174 * @return acp_seid 5175 * @note: btstack_type 1 5176 */ 5177 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_acp_seid(const uint8_t * event){ 5178 return event[6]; 5179 } 5180 /** 5181 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5182 * @param event packet 5183 * @return reconfigure 5184 * @note: btstack_type 1 5185 */ 5186 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 5187 return event[7]; 5188 } 5189 /** 5190 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5191 * @param event packet 5192 * @return media_type 5193 * @note: btstack_type 1 5194 */ 5195 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 5196 return event[8]; 5197 } 5198 /** 5199 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5200 * @param event packet 5201 * @return sampling_frequency 5202 * @note: btstack_type 2 5203 */ 5204 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5205 return little_endian_read_16(event, 9); 5206 } 5207 /** 5208 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5209 * @param event packet 5210 * @return channel_mode 5211 * @note: btstack_type 1 5212 */ 5213 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5214 return event[11]; 5215 } 5216 /** 5217 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5218 * @param event packet 5219 * @return num_channels 5220 * @note: btstack_type 1 5221 */ 5222 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5223 return event[12]; 5224 } 5225 /** 5226 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5227 * @param event packet 5228 * @return block_length 5229 * @note: btstack_type 1 5230 */ 5231 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5232 return event[13]; 5233 } 5234 /** 5235 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5236 * @param event packet 5237 * @return subbands 5238 * @note: btstack_type 1 5239 */ 5240 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5241 return event[14]; 5242 } 5243 /** 5244 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5245 * @param event packet 5246 * @return allocation_method 5247 * @note: btstack_type 1 5248 */ 5249 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5250 return event[15]; 5251 } 5252 /** 5253 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5254 * @param event packet 5255 * @return min_bitpool_value 5256 * @note: btstack_type 1 5257 */ 5258 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5259 return event[16]; 5260 } 5261 /** 5262 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5263 * @param event packet 5264 * @return max_bitpool_value 5265 * @note: btstack_type 1 5266 */ 5267 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5268 return event[17]; 5269 } 5270 5271 /** 5272 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5273 * @param event packet 5274 * @return a2dp_cid 5275 * @note: btstack_type 2 5276 */ 5277 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 5278 return little_endian_read_16(event, 3); 5279 } 5280 /** 5281 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5282 * @param event packet 5283 * @return int_seid 5284 * @note: btstack_type 1 5285 */ 5286 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_int_seid(const uint8_t * event){ 5287 return event[5]; 5288 } 5289 /** 5290 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5291 * @param event packet 5292 * @return acp_seid 5293 * @note: btstack_type 1 5294 */ 5295 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_acp_seid(const uint8_t * event){ 5296 return event[6]; 5297 } 5298 /** 5299 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5300 * @param event packet 5301 * @return reconfigure 5302 * @note: btstack_type 1 5303 */ 5304 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5305 return event[7]; 5306 } 5307 /** 5308 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5309 * @param event packet 5310 * @return media_type 5311 * @note: btstack_type 1 5312 */ 5313 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5314 return event[8]; 5315 } 5316 /** 5317 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5318 * @param event packet 5319 * @return media_codec_type 5320 * @note: btstack_type 2 5321 */ 5322 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5323 return little_endian_read_16(event, 9); 5324 } 5325 /** 5326 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5327 * @param event packet 5328 * @return media_codec_information_len 5329 * @note: btstack_type L 5330 */ 5331 static inline int a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5332 return little_endian_read_16(event, 11); 5333 } 5334 /** 5335 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5336 * @param event packet 5337 * @return media_codec_information 5338 * @note: btstack_type V 5339 */ 5340 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5341 return &event[13]; 5342 } 5343 5344 /** 5345 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5346 * @param event packet 5347 * @return a2dp_cid 5348 * @note: btstack_type 2 5349 */ 5350 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 5351 return little_endian_read_16(event, 3); 5352 } 5353 /** 5354 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5355 * @param event packet 5356 * @param Pointer to storage for bd_addr 5357 * @note: btstack_type B 5358 */ 5359 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5360 reverse_bd_addr(&event[5], bd_addr); 5361 } 5362 /** 5363 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5364 * @param event packet 5365 * @return local_seid 5366 * @note: btstack_type 1 5367 */ 5368 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 5369 return event[11]; 5370 } 5371 /** 5372 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5373 * @param event packet 5374 * @return remote_seid 5375 * @note: btstack_type 1 5376 */ 5377 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 5378 return event[12]; 5379 } 5380 /** 5381 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5382 * @param event packet 5383 * @return status 5384 * @note: btstack_type 1 5385 */ 5386 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 5387 return event[13]; 5388 } 5389 5390 /** 5391 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 5392 * @param event packet 5393 * @return a2dp_cid 5394 * @note: btstack_type 2 5395 */ 5396 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 5397 return little_endian_read_16(event, 3); 5398 } 5399 /** 5400 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 5401 * @param event packet 5402 * @return local_seid 5403 * @note: btstack_type 1 5404 */ 5405 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 5406 return event[5]; 5407 } 5408 5409 /** 5410 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5411 * @param event packet 5412 * @return a2dp_cid 5413 * @note: btstack_type 2 5414 */ 5415 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 5416 return little_endian_read_16(event, 3); 5417 } 5418 /** 5419 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5420 * @param event packet 5421 * @return local_seid 5422 * @note: btstack_type 1 5423 */ 5424 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 5425 return event[5]; 5426 } 5427 5428 /** 5429 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 5430 * @param event packet 5431 * @return a2dp_cid 5432 * @note: btstack_type 2 5433 */ 5434 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 5435 return little_endian_read_16(event, 3); 5436 } 5437 /** 5438 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 5439 * @param event packet 5440 * @return local_seid 5441 * @note: btstack_type 1 5442 */ 5443 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 5444 return event[5]; 5445 } 5446 5447 /** 5448 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 5449 * @param event packet 5450 * @return a2dp_cid 5451 * @note: btstack_type 2 5452 */ 5453 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 5454 return little_endian_read_16(event, 3); 5455 } 5456 /** 5457 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 5458 * @param event packet 5459 * @return local_seid 5460 * @note: btstack_type 1 5461 */ 5462 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 5463 return event[5]; 5464 } 5465 5466 /** 5467 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5468 * @param event packet 5469 * @return a2dp_cid 5470 * @note: btstack_type 2 5471 */ 5472 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 5473 return little_endian_read_16(event, 3); 5474 } 5475 /** 5476 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5477 * @param event packet 5478 * @return local_seid 5479 * @note: btstack_type 1 5480 */ 5481 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 5482 return event[5]; 5483 } 5484 /** 5485 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5486 * @param event packet 5487 * @return signal_identifier 5488 * @note: btstack_type 1 5489 */ 5490 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 5491 return event[6]; 5492 } 5493 5494 /** 5495 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 5496 * @param event packet 5497 * @return a2dp_cid 5498 * @note: btstack_type 2 5499 */ 5500 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 5501 return little_endian_read_16(event, 3); 5502 } 5503 /** 5504 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 5505 * @param event packet 5506 * @return local_seid 5507 * @note: btstack_type 1 5508 */ 5509 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 5510 return event[5]; 5511 } 5512 /** 5513 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 5514 * @param event packet 5515 * @return signal_identifier 5516 * @note: btstack_type 1 5517 */ 5518 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 5519 return event[6]; 5520 } 5521 5522 /** 5523 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5524 * @param event packet 5525 * @return a2dp_cid 5526 * @note: btstack_type 2 5527 */ 5528 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 5529 return little_endian_read_16(event, 3); 5530 } 5531 /** 5532 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5533 * @param event packet 5534 * @param Pointer to storage for bd_addr 5535 * @note: btstack_type B 5536 */ 5537 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5538 reverse_bd_addr(&event[5], bd_addr); 5539 } 5540 /** 5541 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5542 * @param event packet 5543 * @return status 5544 * @note: btstack_type 1 5545 */ 5546 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 5547 return event[11]; 5548 } 5549 5550 /** 5551 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 5552 * @param event packet 5553 * @return a2dp_cid 5554 * @note: btstack_type 2 5555 */ 5556 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 5557 return little_endian_read_16(event, 3); 5558 } 5559 5560 /** 5561 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5562 * @param event packet 5563 * @return a2dp_cid 5564 * @note: btstack_type 2 5565 */ 5566 static inline uint16_t a2dp_subevent_stream_reconfigured_get_a2dp_cid(const uint8_t * event){ 5567 return little_endian_read_16(event, 3); 5568 } 5569 /** 5570 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5571 * @param event packet 5572 * @return local_seid 5573 * @note: btstack_type 1 5574 */ 5575 static inline uint8_t a2dp_subevent_stream_reconfigured_get_local_seid(const uint8_t * event){ 5576 return event[5]; 5577 } 5578 /** 5579 * @brief Get field status from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5580 * @param event packet 5581 * @return status 5582 * @note: btstack_type 1 5583 */ 5584 static inline uint8_t a2dp_subevent_stream_reconfigured_get_status(const uint8_t * event){ 5585 return event[6]; 5586 } 5587 5588 /** 5589 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5590 * @param event packet 5591 * @return status 5592 * @note: btstack_type 1 5593 */ 5594 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 5595 return event[3]; 5596 } 5597 /** 5598 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5599 * @param event packet 5600 * @param Pointer to storage for bd_addr 5601 * @note: btstack_type B 5602 */ 5603 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5604 reverse_bd_addr(&event[4], bd_addr); 5605 } 5606 /** 5607 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5608 * @param event packet 5609 * @return avrcp_cid 5610 * @note: btstack_type 2 5611 */ 5612 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 5613 return little_endian_read_16(event, 10); 5614 } 5615 5616 /** 5617 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 5618 * @param event packet 5619 * @return avrcp_cid 5620 * @note: btstack_type 2 5621 */ 5622 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 5623 return little_endian_read_16(event, 3); 5624 } 5625 5626 /** 5627 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5628 * @param event packet 5629 * @return avrcp_cid 5630 * @note: btstack_type 2 5631 */ 5632 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 5633 return little_endian_read_16(event, 3); 5634 } 5635 /** 5636 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5637 * @param event packet 5638 * @return command_type 5639 * @note: btstack_type 1 5640 */ 5641 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 5642 return event[5]; 5643 } 5644 /** 5645 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5646 * @param event packet 5647 * @return repeat_mode 5648 * @note: btstack_type 1 5649 */ 5650 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 5651 return event[6]; 5652 } 5653 /** 5654 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5655 * @param event packet 5656 * @return shuffle_mode 5657 * @note: btstack_type 1 5658 */ 5659 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 5660 return event[7]; 5661 } 5662 5663 /** 5664 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 5665 * @param event packet 5666 * @return avrcp_cid 5667 * @note: btstack_type 2 5668 */ 5669 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 5670 return little_endian_read_16(event, 3); 5671 } 5672 /** 5673 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 5674 * @param event packet 5675 * @return command_type 5676 * @note: btstack_type 1 5677 */ 5678 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 5679 return event[5]; 5680 } 5681 /** 5682 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 5683 * @param event packet 5684 * @return song_length 5685 * @note: btstack_type 4 5686 */ 5687 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 5688 return little_endian_read_32(event, 6); 5689 } 5690 /** 5691 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 5692 * @param event packet 5693 * @return song_position 5694 * @note: btstack_type 4 5695 */ 5696 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 5697 return little_endian_read_32(event, 10); 5698 } 5699 /** 5700 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 5701 * @param event packet 5702 * @return play_status 5703 * @note: btstack_type 1 5704 */ 5705 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 5706 return event[14]; 5707 } 5708 5709 /** 5710 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5711 * @param event packet 5712 * @return avrcp_cid 5713 * @note: btstack_type 2 5714 */ 5715 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 5716 return little_endian_read_16(event, 3); 5717 } 5718 /** 5719 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5720 * @param event packet 5721 * @return command_type 5722 * @note: btstack_type 1 5723 */ 5724 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 5725 return event[5]; 5726 } 5727 /** 5728 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5729 * @param event packet 5730 * @return play_status 5731 * @note: btstack_type 1 5732 */ 5733 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 5734 return event[6]; 5735 } 5736 5737 /** 5738 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5739 * @param event packet 5740 * @return avrcp_cid 5741 * @note: btstack_type 2 5742 */ 5743 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 5744 return little_endian_read_16(event, 3); 5745 } 5746 /** 5747 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5748 * @param event packet 5749 * @return command_type 5750 * @note: btstack_type 1 5751 */ 5752 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 5753 return event[5]; 5754 } 5755 5756 /** 5757 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5758 * @param event packet 5759 * @return avrcp_cid 5760 * @note: btstack_type 2 5761 */ 5762 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 5763 return little_endian_read_16(event, 3); 5764 } 5765 /** 5766 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5767 * @param event packet 5768 * @return command_type 5769 * @note: btstack_type 1 5770 */ 5771 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 5772 return event[5]; 5773 } 5774 5775 /** 5776 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5777 * @param event packet 5778 * @return avrcp_cid 5779 * @note: btstack_type 2 5780 */ 5781 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 5782 return little_endian_read_16(event, 3); 5783 } 5784 /** 5785 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5786 * @param event packet 5787 * @return command_type 5788 * @note: btstack_type 1 5789 */ 5790 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 5791 return event[5]; 5792 } 5793 5794 /** 5795 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5796 * @param event packet 5797 * @return avrcp_cid 5798 * @note: btstack_type 2 5799 */ 5800 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 5801 return little_endian_read_16(event, 3); 5802 } 5803 /** 5804 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5805 * @param event packet 5806 * @return command_type 5807 * @note: btstack_type 1 5808 */ 5809 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 5810 return event[5]; 5811 } 5812 /** 5813 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5814 * @param event packet 5815 * @return absolute_volume 5816 * @note: btstack_type 1 5817 */ 5818 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 5819 return event[6]; 5820 } 5821 5822 /** 5823 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5824 * @param event packet 5825 * @return avrcp_cid 5826 * @note: btstack_type 2 5827 */ 5828 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 5829 return little_endian_read_16(event, 3); 5830 } 5831 /** 5832 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5833 * @param event packet 5834 * @return command_type 5835 * @note: btstack_type 1 5836 */ 5837 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 5838 return event[5]; 5839 } 5840 /** 5841 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5842 * @param event packet 5843 * @return absolute_volume 5844 * @note: btstack_type 1 5845 */ 5846 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 5847 return event[6]; 5848 } 5849 5850 /** 5851 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5852 * @param event packet 5853 * @return avrcp_cid 5854 * @note: btstack_type 2 5855 */ 5856 static inline uint16_t avrcp_subevent_enable_notification_complete_get_avrcp_cid(const uint8_t * event){ 5857 return little_endian_read_16(event, 3); 5858 } 5859 /** 5860 * @brief Get field command_type from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5861 * @param event packet 5862 * @return command_type 5863 * @note: btstack_type 1 5864 */ 5865 static inline uint8_t avrcp_subevent_enable_notification_complete_get_command_type(const uint8_t * event){ 5866 return event[5]; 5867 } 5868 /** 5869 * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5870 * @param event packet 5871 * @return notification_id 5872 * @note: btstack_type 1 5873 */ 5874 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){ 5875 return event[6]; 5876 } 5877 5878 /** 5879 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 5880 * @param event packet 5881 * @return avrcp_cid 5882 * @note: btstack_type 2 5883 */ 5884 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 5885 return little_endian_read_16(event, 3); 5886 } 5887 /** 5888 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 5889 * @param event packet 5890 * @return command_type 5891 * @note: btstack_type 1 5892 */ 5893 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 5894 return event[5]; 5895 } 5896 /** 5897 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 5898 * @param event packet 5899 * @return operation_id 5900 * @note: btstack_type 1 5901 */ 5902 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 5903 return event[6]; 5904 } 5905 5906 /** 5907 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5908 * @param event packet 5909 * @return avrcp_cid 5910 * @note: btstack_type 2 5911 */ 5912 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 5913 return little_endian_read_16(event, 3); 5914 } 5915 /** 5916 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5917 * @param event packet 5918 * @return command_type 5919 * @note: btstack_type 1 5920 */ 5921 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 5922 return event[5]; 5923 } 5924 /** 5925 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5926 * @param event packet 5927 * @return operation_id 5928 * @note: btstack_type 1 5929 */ 5930 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 5931 return event[6]; 5932 } 5933 5934 /** 5935 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5936 * @param event packet 5937 * @return avrcp_cid 5938 * @note: btstack_type 2 5939 */ 5940 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 5941 return little_endian_read_16(event, 3); 5942 } 5943 /** 5944 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5945 * @param event packet 5946 * @return command_type 5947 * @note: btstack_type 1 5948 */ 5949 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 5950 return event[5]; 5951 } 5952 5953 /** 5954 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_COMPANY_IDS_QUERY 5955 * @param event packet 5956 * @return avrcp_cid 5957 * @note: btstack_type 2 5958 */ 5959 static inline uint16_t avrcp_subevent_company_ids_query_get_avrcp_cid(const uint8_t * event){ 5960 return little_endian_read_16(event, 3); 5961 } 5962 5963 /** 5964 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_EVENT_IDS_QUERY 5965 * @param event packet 5966 * @return avrcp_cid 5967 * @note: btstack_type 2 5968 */ 5969 static inline uint16_t avrcp_subevent_event_ids_query_get_avrcp_cid(const uint8_t * event){ 5970 return little_endian_read_16(event, 3); 5971 } 5972 5973 /** 5974 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 5975 * @param event packet 5976 * @return avrcp_cid 5977 * @note: btstack_type 2 5978 */ 5979 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 5980 return little_endian_read_16(event, 3); 5981 } 5982 5983 /** 5984 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 5985 * @param event packet 5986 * @return avrcp_cid 5987 * @note: btstack_type 2 5988 */ 5989 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 5990 return little_endian_read_16(event, 3); 5991 } 5992 /** 5993 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 5994 * @param event packet 5995 * @return operation_id 5996 * @note: btstack_type 1 5997 */ 5998 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 5999 return event[5]; 6000 } 6001 /** 6002 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 6003 * @param event packet 6004 * @return operands_length 6005 * @note: btstack_type 1 6006 */ 6007 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 6008 return event[6]; 6009 } 6010 /** 6011 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 6012 * @param event packet 6013 * @return operand 6014 * @note: btstack_type 1 6015 */ 6016 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 6017 return event[7]; 6018 } 6019 6020 /** 6021 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6022 * @param event packet 6023 * @return avrcp_cid 6024 * @note: btstack_type 2 6025 */ 6026 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 6027 return little_endian_read_16(event, 3); 6028 } 6029 /** 6030 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6031 * @param event packet 6032 * @return command_type 6033 * @note: btstack_type 1 6034 */ 6035 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 6036 return event[5]; 6037 } 6038 /** 6039 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6040 * @param event packet 6041 * @return track 6042 * @note: btstack_type 1 6043 */ 6044 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 6045 return event[6]; 6046 } 6047 6048 /** 6049 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6050 * @param event packet 6051 * @return avrcp_cid 6052 * @note: btstack_type 2 6053 */ 6054 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 6055 return little_endian_read_16(event, 3); 6056 } 6057 /** 6058 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6059 * @param event packet 6060 * @return command_type 6061 * @note: btstack_type 1 6062 */ 6063 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 6064 return event[5]; 6065 } 6066 /** 6067 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6068 * @param event packet 6069 * @return total_tracks 6070 * @note: btstack_type 1 6071 */ 6072 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 6073 return event[6]; 6074 } 6075 6076 /** 6077 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6078 * @param event packet 6079 * @return avrcp_cid 6080 * @note: btstack_type 2 6081 */ 6082 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 6083 return little_endian_read_16(event, 3); 6084 } 6085 /** 6086 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6087 * @param event packet 6088 * @return command_type 6089 * @note: btstack_type 1 6090 */ 6091 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 6092 return event[5]; 6093 } 6094 /** 6095 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6096 * @param event packet 6097 * @return song_length 6098 * @note: btstack_type 4 6099 */ 6100 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 6101 return little_endian_read_32(event, 6); 6102 } 6103 6104 /** 6105 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6106 * @param event packet 6107 * @return avrcp_cid 6108 * @note: btstack_type 2 6109 */ 6110 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 6111 return little_endian_read_16(event, 3); 6112 } 6113 /** 6114 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6115 * @param event packet 6116 * @return command_type 6117 * @note: btstack_type 1 6118 */ 6119 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 6120 return event[5]; 6121 } 6122 /** 6123 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6124 * @param event packet 6125 * @return value_len 6126 * @note: btstack_type J 6127 */ 6128 static inline int avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 6129 return event[6]; 6130 } 6131 /** 6132 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6133 * @param event packet 6134 * @return value 6135 * @note: btstack_type V 6136 */ 6137 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 6138 return &event[7]; 6139 } 6140 6141 /** 6142 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6143 * @param event packet 6144 * @return avrcp_cid 6145 * @note: btstack_type 2 6146 */ 6147 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 6148 return little_endian_read_16(event, 3); 6149 } 6150 /** 6151 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6152 * @param event packet 6153 * @return command_type 6154 * @note: btstack_type 1 6155 */ 6156 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 6157 return event[5]; 6158 } 6159 /** 6160 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6161 * @param event packet 6162 * @return value_len 6163 * @note: btstack_type J 6164 */ 6165 static inline int avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 6166 return event[6]; 6167 } 6168 /** 6169 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6170 * @param event packet 6171 * @return value 6172 * @note: btstack_type V 6173 */ 6174 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 6175 return &event[7]; 6176 } 6177 6178 /** 6179 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6180 * @param event packet 6181 * @return avrcp_cid 6182 * @note: btstack_type 2 6183 */ 6184 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 6185 return little_endian_read_16(event, 3); 6186 } 6187 /** 6188 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6189 * @param event packet 6190 * @return command_type 6191 * @note: btstack_type 1 6192 */ 6193 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 6194 return event[5]; 6195 } 6196 /** 6197 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6198 * @param event packet 6199 * @return value_len 6200 * @note: btstack_type J 6201 */ 6202 static inline int avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 6203 return event[6]; 6204 } 6205 /** 6206 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6207 * @param event packet 6208 * @return value 6209 * @note: btstack_type V 6210 */ 6211 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 6212 return &event[7]; 6213 } 6214 6215 /** 6216 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6217 * @param event packet 6218 * @return avrcp_cid 6219 * @note: btstack_type 2 6220 */ 6221 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 6222 return little_endian_read_16(event, 3); 6223 } 6224 /** 6225 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6226 * @param event packet 6227 * @return command_type 6228 * @note: btstack_type 1 6229 */ 6230 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 6231 return event[5]; 6232 } 6233 /** 6234 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6235 * @param event packet 6236 * @return value_len 6237 * @note: btstack_type J 6238 */ 6239 static inline int avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 6240 return event[6]; 6241 } 6242 /** 6243 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6244 * @param event packet 6245 * @return value 6246 * @note: btstack_type V 6247 */ 6248 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 6249 return &event[7]; 6250 } 6251 6252 /** 6253 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6254 * @param event packet 6255 * @return avrcp_cid 6256 * @note: btstack_type 2 6257 */ 6258 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 6259 return little_endian_read_16(event, 3); 6260 } 6261 /** 6262 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6263 * @param event packet 6264 * @return command_type 6265 * @note: btstack_type 1 6266 */ 6267 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 6268 return event[5]; 6269 } 6270 /** 6271 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6272 * @param event packet 6273 * @return status 6274 * @note: btstack_type 1 6275 */ 6276 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 6277 return event[6]; 6278 } 6279 6280 /** 6281 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6282 * @param event packet 6283 * @param Pointer to storage for bd_addr 6284 * @note: btstack_type B 6285 */ 6286 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6287 reverse_bd_addr(&event[3], bd_addr); 6288 } 6289 /** 6290 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6291 * @param event packet 6292 * @return browsing_cid 6293 * @note: btstack_type 2 6294 */ 6295 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 6296 return little_endian_read_16(event, 9); 6297 } 6298 6299 /** 6300 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6301 * @param event packet 6302 * @return status 6303 * @note: btstack_type 1 6304 */ 6305 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 6306 return event[3]; 6307 } 6308 /** 6309 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6310 * @param event packet 6311 * @param Pointer to storage for bd_addr 6312 * @note: btstack_type B 6313 */ 6314 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6315 reverse_bd_addr(&event[4], bd_addr); 6316 } 6317 /** 6318 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6319 * @param event packet 6320 * @return browsing_cid 6321 * @note: btstack_type 2 6322 */ 6323 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 6324 return little_endian_read_16(event, 10); 6325 } 6326 6327 /** 6328 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 6329 * @param event packet 6330 * @return browsing_cid 6331 * @note: btstack_type 2 6332 */ 6333 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 6334 return little_endian_read_16(event, 3); 6335 } 6336 6337 /** 6338 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_DONE 6339 * @param event packet 6340 * @return browsing_cid 6341 * @note: btstack_type 2 6342 */ 6343 static inline uint16_t avrcp_subevent_browsing_done_get_browsing_cid(const uint8_t * event){ 6344 return little_endian_read_16(event, 3); 6345 } 6346 /** 6347 * @brief Get field uid_counter from event AVRCP_SUBEVENT_BROWSING_DONE 6348 * @param event packet 6349 * @return uid_counter 6350 * @note: btstack_type 2 6351 */ 6352 static inline uint16_t avrcp_subevent_browsing_done_get_uid_counter(const uint8_t * event){ 6353 return little_endian_read_16(event, 5); 6354 } 6355 /** 6356 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_DONE 6357 * @param event packet 6358 * @return browsing_status 6359 * @note: btstack_type 1 6360 */ 6361 static inline uint8_t avrcp_subevent_browsing_done_get_browsing_status(const uint8_t * event){ 6362 return event[7]; 6363 } 6364 /** 6365 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_DONE 6366 * @param event packet 6367 * @return bluetooth_status 6368 * @note: btstack_type 1 6369 */ 6370 static inline uint8_t avrcp_subevent_browsing_done_get_bluetooth_status(const uint8_t * event){ 6371 return event[8]; 6372 } 6373 6374 /** 6375 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6376 * @param event packet 6377 * @return browsing_cid 6378 * @note: btstack_type 2 6379 */ 6380 static inline uint16_t avrcp_subevent_browsing_get_folder_items_get_browsing_cid(const uint8_t * event){ 6381 return little_endian_read_16(event, 3); 6382 } 6383 /** 6384 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6385 * @param event packet 6386 * @return scope 6387 * @note: btstack_type 1 6388 */ 6389 static inline uint8_t avrcp_subevent_browsing_get_folder_items_get_scope(const uint8_t * event){ 6390 return event[5]; 6391 } 6392 /** 6393 * @brief Get field attr_bitmap from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6394 * @param event packet 6395 * @return attr_bitmap 6396 * @note: btstack_type 4 6397 */ 6398 static inline uint32_t avrcp_subevent_browsing_get_folder_items_get_attr_bitmap(const uint8_t * event){ 6399 return little_endian_read_32(event, 6); 6400 } 6401 6402 /** 6403 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 6404 * @param event packet 6405 * @return browsing_cid 6406 * @note: btstack_type 2 6407 */ 6408 static inline uint16_t avrcp_subevent_browsing_get_total_num_items_get_browsing_cid(const uint8_t * event){ 6409 return little_endian_read_16(event, 3); 6410 } 6411 /** 6412 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 6413 * @param event packet 6414 * @return scope 6415 * @note: btstack_type 1 6416 */ 6417 static inline uint8_t avrcp_subevent_browsing_get_total_num_items_get_scope(const uint8_t * event){ 6418 return event[5]; 6419 } 6420 6421 /** 6422 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6423 * @param event packet 6424 * @return avrcp_cid 6425 * @note: btstack_type 2 6426 */ 6427 static inline uint16_t avrcp_subevent_notification_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 6428 return little_endian_read_16(event, 3); 6429 } 6430 /** 6431 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6432 * @param event packet 6433 * @return command_type 6434 * @note: btstack_type 1 6435 */ 6436 static inline uint8_t avrcp_subevent_notification_playback_pos_changed_get_command_type(const uint8_t * event){ 6437 return event[5]; 6438 } 6439 /** 6440 * @brief Get field playback_position_ms from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6441 * @param event packet 6442 * @return playback_position_ms 6443 * @note: btstack_type 4 6444 */ 6445 static inline uint32_t avrcp_subevent_notification_playback_pos_changed_get_playback_position_ms(const uint8_t * event){ 6446 return little_endian_read_32(event, 6); 6447 } 6448 6449 /** 6450 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 6451 * @param event packet 6452 * @return goep_cid 6453 * @note: btstack_type 2 6454 */ 6455 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 6456 return little_endian_read_16(event, 3); 6457 } 6458 /** 6459 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 6460 * @param event packet 6461 * @return status 6462 * @note: btstack_type 1 6463 */ 6464 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 6465 return event[5]; 6466 } 6467 /** 6468 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 6469 * @param event packet 6470 * @param Pointer to storage for bd_addr 6471 * @note: btstack_type B 6472 */ 6473 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6474 reverse_bd_addr(&event[6], bd_addr); 6475 } 6476 /** 6477 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 6478 * @param event packet 6479 * @return con_handle 6480 * @note: btstack_type H 6481 */ 6482 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6483 return little_endian_read_16(event, 12); 6484 } 6485 /** 6486 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 6487 * @param event packet 6488 * @return incoming 6489 * @note: btstack_type 1 6490 */ 6491 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 6492 return event[14]; 6493 } 6494 6495 /** 6496 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 6497 * @param event packet 6498 * @return goep_cid 6499 * @note: btstack_type 2 6500 */ 6501 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6502 return little_endian_read_16(event, 3); 6503 } 6504 6505 /** 6506 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 6507 * @param event packet 6508 * @return goep_cid 6509 * @note: btstack_type 2 6510 */ 6511 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 6512 return little_endian_read_16(event, 3); 6513 } 6514 6515 /** 6516 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 6517 * @param event packet 6518 * @return pbap_cid 6519 * @note: btstack_type 2 6520 */ 6521 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 6522 return little_endian_read_16(event, 3); 6523 } 6524 /** 6525 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 6526 * @param event packet 6527 * @return status 6528 * @note: btstack_type 1 6529 */ 6530 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 6531 return event[5]; 6532 } 6533 /** 6534 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 6535 * @param event packet 6536 * @param Pointer to storage for bd_addr 6537 * @note: btstack_type B 6538 */ 6539 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6540 reverse_bd_addr(&event[6], bd_addr); 6541 } 6542 /** 6543 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 6544 * @param event packet 6545 * @return con_handle 6546 * @note: btstack_type H 6547 */ 6548 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6549 return little_endian_read_16(event, 12); 6550 } 6551 /** 6552 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 6553 * @param event packet 6554 * @return incoming 6555 * @note: btstack_type 1 6556 */ 6557 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 6558 return event[14]; 6559 } 6560 6561 /** 6562 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 6563 * @param event packet 6564 * @return goep_cid 6565 * @note: btstack_type 2 6566 */ 6567 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6568 return little_endian_read_16(event, 3); 6569 } 6570 6571 /** 6572 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 6573 * @param event packet 6574 * @return goep_cid 6575 * @note: btstack_type 2 6576 */ 6577 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 6578 return little_endian_read_16(event, 3); 6579 } 6580 /** 6581 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 6582 * @param event packet 6583 * @return status 6584 * @note: btstack_type 1 6585 */ 6586 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 6587 return event[5]; 6588 } 6589 6590 /** 6591 * @brief Get field goep_cid from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6592 * @param event packet 6593 * @return goep_cid 6594 * @note: btstack_type 2 6595 */ 6596 static inline uint16_t pbap_subevent_phonebook_size_get_goep_cid(const uint8_t * event){ 6597 return little_endian_read_16(event, 3); 6598 } 6599 /** 6600 * @brief Get field status from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6601 * @param event packet 6602 * @return status 6603 * @note: btstack_type 1 6604 */ 6605 static inline uint8_t pbap_subevent_phonebook_size_get_status(const uint8_t * event){ 6606 return event[5]; 6607 } 6608 /** 6609 * @brief Get field phoneboook_size from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6610 * @param event packet 6611 * @return phoneboook_size 6612 * @note: btstack_type 2 6613 */ 6614 static inline uint16_t pbap_subevent_phonebook_size_get_phoneboook_size(const uint8_t * event){ 6615 return little_endian_read_16(event, 6); 6616 } 6617 6618 /** 6619 * @brief Get field goep_cid from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6620 * @param event packet 6621 * @return goep_cid 6622 * @note: btstack_type 2 6623 */ 6624 static inline uint16_t pbap_subevent_authentication_request_get_goep_cid(const uint8_t * event){ 6625 return little_endian_read_16(event, 3); 6626 } 6627 /** 6628 * @brief Get field user_id_required from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6629 * @param event packet 6630 * @return user_id_required 6631 * @note: btstack_type 1 6632 */ 6633 static inline uint8_t pbap_subevent_authentication_request_get_user_id_required(const uint8_t * event){ 6634 return event[5]; 6635 } 6636 /** 6637 * @brief Get field full_access from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6638 * @param event packet 6639 * @return full_access 6640 * @note: btstack_type 1 6641 */ 6642 static inline uint8_t pbap_subevent_authentication_request_get_full_access(const uint8_t * event){ 6643 return event[6]; 6644 } 6645 6646 /** 6647 * @brief Get field goep_cid from event PBAP_SUBEVENT_CARD_RESULT 6648 * @param event packet 6649 * @return goep_cid 6650 * @note: btstack_type 2 6651 */ 6652 static inline uint16_t pbap_subevent_card_result_get_goep_cid(const uint8_t * event){ 6653 return little_endian_read_16(event, 3); 6654 } 6655 /** 6656 * @brief Get field name_len from event PBAP_SUBEVENT_CARD_RESULT 6657 * @param event packet 6658 * @return name_len 6659 * @note: btstack_type J 6660 */ 6661 static inline int pbap_subevent_card_result_get_name_len(const uint8_t * event){ 6662 return event[5]; 6663 } 6664 /** 6665 * @brief Get field name from event PBAP_SUBEVENT_CARD_RESULT 6666 * @param event packet 6667 * @return name 6668 * @note: btstack_type V 6669 */ 6670 static inline const uint8_t * pbap_subevent_card_result_get_name(const uint8_t * event){ 6671 return &event[6]; 6672 } 6673 /** 6674 * @brief Get field handle_len from event PBAP_SUBEVENT_CARD_RESULT 6675 * @param event packet 6676 * @return handle_len 6677 * @note: btstack_type J 6678 */ 6679 static inline int pbap_subevent_card_result_get_handle_len(const uint8_t * event){ 6680 return event[6 + event[5]]; 6681 } 6682 /** 6683 * @brief Get field handle from event PBAP_SUBEVENT_CARD_RESULT 6684 * @param event packet 6685 * @return handle 6686 * @note: btstack_type V 6687 */ 6688 static inline const uint8_t * pbap_subevent_card_result_get_handle(const uint8_t * event){ 6689 return &event[6 + event[5] + 1]; 6690 } 6691 6692 /** 6693 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 6694 * @param event packet 6695 * @return hid_cid 6696 * @note: btstack_type 2 6697 */ 6698 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 6699 return little_endian_read_16(event, 3); 6700 } 6701 /** 6702 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 6703 * @param event packet 6704 * @return status 6705 * @note: btstack_type 1 6706 */ 6707 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 6708 return event[5]; 6709 } 6710 /** 6711 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 6712 * @param event packet 6713 * @param Pointer to storage for bd_addr 6714 * @note: btstack_type B 6715 */ 6716 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6717 reverse_bd_addr(&event[6], bd_addr); 6718 } 6719 /** 6720 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 6721 * @param event packet 6722 * @return con_handle 6723 * @note: btstack_type H 6724 */ 6725 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6726 return little_endian_read_16(event, 12); 6727 } 6728 /** 6729 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 6730 * @param event packet 6731 * @return incoming 6732 * @note: btstack_type 1 6733 */ 6734 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 6735 return event[14]; 6736 } 6737 6738 /** 6739 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 6740 * @param event packet 6741 * @return hid_cid 6742 * @note: btstack_type 2 6743 */ 6744 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 6745 return little_endian_read_16(event, 3); 6746 } 6747 6748 /** 6749 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 6750 * @param event packet 6751 * @return hid_cid 6752 * @note: btstack_type 2 6753 */ 6754 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 6755 return little_endian_read_16(event, 3); 6756 } 6757 6758 /** 6759 * @brief Get field con_handle from event HID_SUBEVENT_SUSPEND 6760 * @param event packet 6761 * @return con_handle 6762 * @note: btstack_type 2 6763 */ 6764 static inline uint16_t hid_subevent_suspend_get_con_handle(const uint8_t * event){ 6765 return little_endian_read_16(event, 3); 6766 } 6767 6768 /** 6769 * @brief Get field con_handle from event HID_SUBEVENT_EXIT_SUSPEND 6770 * @param event packet 6771 * @return con_handle 6772 * @note: btstack_type 2 6773 */ 6774 static inline uint16_t hid_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 6775 return little_endian_read_16(event, 3); 6776 } 6777 6778 /** 6779 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 6780 * @param event packet 6781 * @return con_handle 6782 * @note: btstack_type 2 6783 */ 6784 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 6785 return little_endian_read_16(event, 3); 6786 } 6787 6788 /** 6789 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 6790 * @param event packet 6791 * @return con_handle 6792 * @note: btstack_type 2 6793 */ 6794 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 6795 return little_endian_read_16(event, 3); 6796 } 6797 /** 6798 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 6799 * @param event packet 6800 * @return protocol_mode 6801 * @note: btstack_type 1 6802 */ 6803 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 6804 return event[5]; 6805 } 6806 6807 /** 6808 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6809 * @param event packet 6810 * @return con_handle 6811 * @note: btstack_type 2 6812 */ 6813 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 6814 return little_endian_read_16(event, 3); 6815 } 6816 /** 6817 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6818 * @param event packet 6819 * @return enable 6820 * @note: btstack_type 1 6821 */ 6822 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 6823 return event[5]; 6824 } 6825 6826 /** 6827 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6828 * @param event packet 6829 * @return con_handle 6830 * @note: btstack_type 2 6831 */ 6832 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 6833 return little_endian_read_16(event, 3); 6834 } 6835 /** 6836 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6837 * @param event packet 6838 * @return enable 6839 * @note: btstack_type 1 6840 */ 6841 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 6842 return event[5]; 6843 } 6844 6845 /** 6846 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6847 * @param event packet 6848 * @return con_handle 6849 * @note: btstack_type 2 6850 */ 6851 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 6852 return little_endian_read_16(event, 3); 6853 } 6854 /** 6855 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6856 * @param event packet 6857 * @return enable 6858 * @note: btstack_type 1 6859 */ 6860 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 6861 return event[5]; 6862 } 6863 6864 /** 6865 * @brief Get field con_handle from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 6866 * @param event packet 6867 * @return con_handle 6868 * @note: btstack_type 2 6869 */ 6870 static inline uint16_t hids_subevent_output_report_enable_get_con_handle(const uint8_t * event){ 6871 return little_endian_read_16(event, 3); 6872 } 6873 /** 6874 * @brief Get field enable from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 6875 * @param event packet 6876 * @return enable 6877 * @note: btstack_type 1 6878 */ 6879 static inline uint8_t hids_subevent_output_report_enable_get_enable(const uint8_t * event){ 6880 return event[5]; 6881 } 6882 6883 /** 6884 * @brief Get field con_handle from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 6885 * @param event packet 6886 * @return con_handle 6887 * @note: btstack_type 2 6888 */ 6889 static inline uint16_t hids_subevent_feature_report_enable_get_con_handle(const uint8_t * event){ 6890 return little_endian_read_16(event, 3); 6891 } 6892 /** 6893 * @brief Get field enable from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 6894 * @param event packet 6895 * @return enable 6896 * @note: btstack_type 1 6897 */ 6898 static inline uint8_t hids_subevent_feature_report_enable_get_enable(const uint8_t * event){ 6899 return event[5]; 6900 } 6901 6902 /** 6903 * @brief Get field con_handle from event HIDS_SUBEVENT_SUSPEND 6904 * @param event packet 6905 * @return con_handle 6906 * @note: btstack_type 2 6907 */ 6908 static inline uint16_t hids_subevent_suspend_get_con_handle(const uint8_t * event){ 6909 return little_endian_read_16(event, 3); 6910 } 6911 6912 /** 6913 * @brief Get field con_handle from event HIDS_SUBEVENT_EXIT_SUSPEND 6914 * @param event packet 6915 * @return con_handle 6916 * @note: btstack_type 2 6917 */ 6918 static inline uint16_t hids_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 6919 return little_endian_read_16(event, 3); 6920 } 6921 6922 /** 6923 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 6924 * @param event packet 6925 * @return con_handle 6926 * @note: btstack_type 2 6927 */ 6928 static inline uint16_t gattservice_subevent_cycling_power_start_calibration_get_con_handle(const uint8_t * event){ 6929 return little_endian_read_16(event, 3); 6930 } 6931 /** 6932 * @brief Get field measurement_type from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 6933 * @param event packet 6934 * @return measurement_type 6935 * @note: btstack_type 1 6936 */ 6937 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_measurement_type(const uint8_t * event){ 6938 return event[5]; 6939 } 6940 /** 6941 * @brief Get field is_enhanced from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 6942 * @param event packet 6943 * @return is_enhanced 6944 * @note: btstack_type 1 6945 */ 6946 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_is_enhanced(const uint8_t * event){ 6947 return event[6]; 6948 } 6949 6950 /** 6951 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START 6952 * @param event packet 6953 * @return con_handle 6954 * @note: btstack_type 2 6955 */ 6956 static inline uint16_t gattservice_subevent_cycling_power_broadcast_start_get_con_handle(const uint8_t * event){ 6957 return little_endian_read_16(event, 3); 6958 } 6959 6960 /** 6961 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP 6962 * @param event packet 6963 * @return con_handle 6964 * @note: btstack_type 2 6965 */ 6966 static inline uint16_t gattservice_subevent_cycling_power_broadcast_stop_get_con_handle(const uint8_t * event){ 6967 return little_endian_read_16(event, 3); 6968 } 6969 6970 6971 6972 /* API_END */ 6973 6974 #if defined __cplusplus 6975 } 6976 #endif 6977 6978 #endif // __BTSTACK_EVENT_H 6979