1 /* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the copyright holders nor the names of 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 4. Any redistribution, use, or modification is done solely for 17 * personal benefit and not for any commercial purpose or for 18 * monetary gain. 19 * 20 * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * Please inquire about commercial licensing options at 34 * [email protected] 35 * 36 */ 37 38 39 /* 40 * btstack_event.h 41 * 42 * @brief BTstack event getter/setter 43 * @note Don't edit - generated by tool/btstack_event_generator.py 44 * 45 */ 46 47 #ifndef BTSTACK_EVENT_H 48 #define BTSTACK_EVENT_H 49 50 #if defined __cplusplus 51 extern "C" { 52 #endif 53 54 #include "btstack_util.h" 55 #include <stdint.h> 56 57 #ifdef ENABLE_BLE 58 #include "ble/gatt_client.h" 59 #endif 60 61 /* API_START */ 62 63 /** 64 * @brief Get event type 65 * @param event 66 * @return type of event 67 */ 68 static inline uint8_t hci_event_packet_get_type(const uint8_t * event){ 69 return event[0]; 70 } 71 72 /*** 73 * @brief Get subevent code for a2dp event 74 * @param event packet 75 * @return subevent_code 76 */ 77 static inline uint8_t hci_event_a2dp_meta_get_subevent_code(const uint8_t * event){ 78 return event[2]; 79 } 80 /*** 81 * @brief Get subevent code for ancs event 82 * @param event packet 83 * @return subevent_code 84 */ 85 static inline uint8_t hci_event_ancs_meta_get_subevent_code(const uint8_t * event){ 86 return event[2]; 87 } 88 /*** 89 * @brief Get subevent code for avdtp event 90 * @param event packet 91 * @return subevent_code 92 */ 93 static inline uint8_t hci_event_avdtp_meta_get_subevent_code(const uint8_t * event){ 94 return event[2]; 95 } 96 /*** 97 * @brief Get subevent code for avrcp event 98 * @param event packet 99 * @return subevent_code 100 */ 101 static inline uint8_t hci_event_avrcp_meta_get_subevent_code(const uint8_t * event){ 102 return event[2]; 103 } 104 /*** 105 * @brief Get subevent code for gattservice event 106 * @param event packet 107 * @return subevent_code 108 */ 109 static inline uint8_t hci_event_gattservice_meta_get_subevent_code(const uint8_t * event){ 110 return event[2]; 111 } 112 /*** 113 * @brief Get subevent code for goep event 114 * @param event packet 115 * @return subevent_code 116 */ 117 static inline uint8_t hci_event_goep_meta_get_subevent_code(const uint8_t * event){ 118 return event[2]; 119 } 120 /*** 121 * @brief Get subevent code for hfp event 122 * @param event packet 123 * @return subevent_code 124 */ 125 static inline uint8_t hci_event_hfp_meta_get_subevent_code(const uint8_t * event){ 126 return event[2]; 127 } 128 /*** 129 * @brief Get subevent code for hid event 130 * @param event packet 131 * @return subevent_code 132 */ 133 static inline uint8_t hci_event_hid_meta_get_subevent_code(const uint8_t * event){ 134 return event[2]; 135 } 136 /*** 137 * @brief Get subevent code for hids event 138 * @param event packet 139 * @return subevent_code 140 */ 141 static inline uint8_t hci_event_hids_meta_get_subevent_code(const uint8_t * event){ 142 return event[2]; 143 } 144 /*** 145 * @brief Get subevent code for hsp event 146 * @param event packet 147 * @return subevent_code 148 */ 149 static inline uint8_t hci_event_hsp_meta_get_subevent_code(const uint8_t * event){ 150 return event[2]; 151 } 152 /*** 153 * @brief Get subevent code for le event 154 * @param event packet 155 * @return subevent_code 156 */ 157 static inline uint8_t hci_event_le_meta_get_subevent_code(const uint8_t * event){ 158 return event[2]; 159 } 160 /*** 161 * @brief Get subevent code for map event 162 * @param event packet 163 * @return subevent_code 164 */ 165 static inline uint8_t hci_event_map_meta_get_subevent_code(const uint8_t * event){ 166 return event[2]; 167 } 168 /*** 169 * @brief Get subevent code for mesh event 170 * @param event packet 171 * @return subevent_code 172 */ 173 static inline uint8_t hci_event_mesh_meta_get_subevent_code(const uint8_t * event){ 174 return event[2]; 175 } 176 /*** 177 * @brief Get subevent code for pbap event 178 * @param event packet 179 * @return subevent_code 180 */ 181 static inline uint8_t hci_event_pbap_meta_get_subevent_code(const uint8_t * event){ 182 return event[2]; 183 } 184 /** 185 * @brief Get field status from event HCI_EVENT_INQUIRY_COMPLETE 186 * @param event packet 187 * @return status 188 * @note: btstack_type 1 189 */ 190 static inline uint8_t hci_event_inquiry_complete_get_status(const uint8_t * event){ 191 return event[2]; 192 } 193 194 /** 195 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT 196 * @param event packet 197 * @return num_responses 198 * @note: btstack_type 1 199 */ 200 static inline uint8_t hci_event_inquiry_result_get_num_responses(const uint8_t * event){ 201 return event[2]; 202 } 203 /** 204 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT 205 * @param event packet 206 * @param Pointer to storage for bd_addr 207 * @note: btstack_type B 208 */ 209 static inline void hci_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 210 reverse_bytes(&event[3], bd_addr, 6); 211 } 212 /** 213 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT 214 * @param event packet 215 * @return page_scan_repetition_mode 216 * @note: btstack_type 1 217 */ 218 static inline uint8_t hci_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 219 return event[9]; 220 } 221 /** 222 * @brief Get field reserved1 from event HCI_EVENT_INQUIRY_RESULT 223 * @param event packet 224 * @return reserved1 225 * @note: btstack_type 1 226 */ 227 static inline uint8_t hci_event_inquiry_result_get_reserved1(const uint8_t * event){ 228 return event[10]; 229 } 230 /** 231 * @brief Get field reserved2 from event HCI_EVENT_INQUIRY_RESULT 232 * @param event packet 233 * @return reserved2 234 * @note: btstack_type 1 235 */ 236 static inline uint8_t hci_event_inquiry_result_get_reserved2(const uint8_t * event){ 237 return event[11]; 238 } 239 /** 240 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT 241 * @param event packet 242 * @return class_of_device 243 * @note: btstack_type 3 244 */ 245 static inline uint32_t hci_event_inquiry_result_get_class_of_device(const uint8_t * event){ 246 return little_endian_read_24(event, 12); 247 } 248 /** 249 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT 250 * @param event packet 251 * @return clock_offset 252 * @note: btstack_type 2 253 */ 254 static inline uint16_t hci_event_inquiry_result_get_clock_offset(const uint8_t * event){ 255 return little_endian_read_16(event, 15); 256 } 257 258 /** 259 * @brief Get field status from event HCI_EVENT_CONNECTION_COMPLETE 260 * @param event packet 261 * @return status 262 * @note: btstack_type 1 263 */ 264 static inline uint8_t hci_event_connection_complete_get_status(const uint8_t * event){ 265 return event[2]; 266 } 267 /** 268 * @brief Get field connection_handle from event HCI_EVENT_CONNECTION_COMPLETE 269 * @param event packet 270 * @return connection_handle 271 * @note: btstack_type 2 272 */ 273 static inline uint16_t hci_event_connection_complete_get_connection_handle(const uint8_t * event){ 274 return little_endian_read_16(event, 3); 275 } 276 /** 277 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_COMPLETE 278 * @param event packet 279 * @param Pointer to storage for bd_addr 280 * @note: btstack_type B 281 */ 282 static inline void hci_event_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 283 reverse_bytes(&event[5], bd_addr, 6); 284 } 285 /** 286 * @brief Get field link_type from event HCI_EVENT_CONNECTION_COMPLETE 287 * @param event packet 288 * @return link_type 289 * @note: btstack_type 1 290 */ 291 static inline uint8_t hci_event_connection_complete_get_link_type(const uint8_t * event){ 292 return event[11]; 293 } 294 /** 295 * @brief Get field encryption_enabled from event HCI_EVENT_CONNECTION_COMPLETE 296 * @param event packet 297 * @return encryption_enabled 298 * @note: btstack_type 1 299 */ 300 static inline uint8_t hci_event_connection_complete_get_encryption_enabled(const uint8_t * event){ 301 return event[12]; 302 } 303 304 /** 305 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_REQUEST 306 * @param event packet 307 * @param Pointer to storage for bd_addr 308 * @note: btstack_type B 309 */ 310 static inline void hci_event_connection_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 311 reverse_bytes(&event[2], bd_addr, 6); 312 } 313 /** 314 * @brief Get field class_of_device from event HCI_EVENT_CONNECTION_REQUEST 315 * @param event packet 316 * @return class_of_device 317 * @note: btstack_type 3 318 */ 319 static inline uint32_t hci_event_connection_request_get_class_of_device(const uint8_t * event){ 320 return little_endian_read_24(event, 8); 321 } 322 /** 323 * @brief Get field link_type from event HCI_EVENT_CONNECTION_REQUEST 324 * @param event packet 325 * @return link_type 326 * @note: btstack_type 1 327 */ 328 static inline uint8_t hci_event_connection_request_get_link_type(const uint8_t * event){ 329 return event[11]; 330 } 331 332 /** 333 * @brief Get field status from event HCI_EVENT_DISCONNECTION_COMPLETE 334 * @param event packet 335 * @return status 336 * @note: btstack_type 1 337 */ 338 static inline uint8_t hci_event_disconnection_complete_get_status(const uint8_t * event){ 339 return event[2]; 340 } 341 /** 342 * @brief Get field connection_handle from event HCI_EVENT_DISCONNECTION_COMPLETE 343 * @param event packet 344 * @return connection_handle 345 * @note: btstack_type 2 346 */ 347 static inline uint16_t hci_event_disconnection_complete_get_connection_handle(const uint8_t * event){ 348 return little_endian_read_16(event, 3); 349 } 350 /** 351 * @brief Get field reason from event HCI_EVENT_DISCONNECTION_COMPLETE 352 * @param event packet 353 * @return reason 354 * @note: btstack_type 1 355 */ 356 static inline uint8_t hci_event_disconnection_complete_get_reason(const uint8_t * event){ 357 return event[5]; 358 } 359 360 /** 361 * @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE 362 * @param event packet 363 * @return status 364 * @note: btstack_type 1 365 */ 366 static inline uint8_t hci_event_authentication_complete_get_status(const uint8_t * event){ 367 return event[2]; 368 } 369 /** 370 * @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE 371 * @param event packet 372 * @return connection_handle 373 * @note: btstack_type 2 374 */ 375 static inline uint16_t hci_event_authentication_complete_get_connection_handle(const uint8_t * event){ 376 return little_endian_read_16(event, 3); 377 } 378 379 /** 380 * @brief Get field status from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 381 * @param event packet 382 * @return status 383 * @note: btstack_type 1 384 */ 385 static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){ 386 return event[2]; 387 } 388 /** 389 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 390 * @param event packet 391 * @param Pointer to storage for bd_addr 392 * @note: btstack_type B 393 */ 394 static inline void hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 395 reverse_bytes(&event[3], bd_addr, 6); 396 } 397 /** 398 * @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 399 * @param event packet 400 * @return remote_name 401 * @note: btstack_type N 402 */ 403 static inline const char * hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){ 404 return (const char *) &event[9]; 405 } 406 407 /** 408 * @brief Get field status from event HCI_EVENT_ENCRYPTION_CHANGE 409 * @param event packet 410 * @return status 411 * @note: btstack_type 1 412 */ 413 static inline uint8_t hci_event_encryption_change_get_status(const uint8_t * event){ 414 return event[2]; 415 } 416 /** 417 * @brief Get field connection_handle from event HCI_EVENT_ENCRYPTION_CHANGE 418 * @param event packet 419 * @return connection_handle 420 * @note: btstack_type 2 421 */ 422 static inline uint16_t hci_event_encryption_change_get_connection_handle(const uint8_t * event){ 423 return little_endian_read_16(event, 3); 424 } 425 /** 426 * @brief Get field encryption_enabled from event HCI_EVENT_ENCRYPTION_CHANGE 427 * @param event packet 428 * @return encryption_enabled 429 * @note: btstack_type 1 430 */ 431 static inline uint8_t hci_event_encryption_change_get_encryption_enabled(const uint8_t * event){ 432 return event[5]; 433 } 434 435 /** 436 * @brief Get field status from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 437 * @param event packet 438 * @return status 439 * @note: btstack_type 1 440 */ 441 static inline uint8_t hci_event_change_connection_link_key_complete_get_status(const uint8_t * event){ 442 return event[2]; 443 } 444 /** 445 * @brief Get field connection_handle from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 446 * @param event packet 447 * @return connection_handle 448 * @note: btstack_type 2 449 */ 450 static inline uint16_t hci_event_change_connection_link_key_complete_get_connection_handle(const uint8_t * event){ 451 return little_endian_read_16(event, 3); 452 } 453 454 /** 455 * @brief Get field status from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 456 * @param event packet 457 * @return status 458 * @note: btstack_type 1 459 */ 460 static inline uint8_t hci_event_master_link_key_complete_get_status(const uint8_t * event){ 461 return event[2]; 462 } 463 /** 464 * @brief Get field connection_handle from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 465 * @param event packet 466 * @return connection_handle 467 * @note: btstack_type 2 468 */ 469 static inline uint16_t hci_event_master_link_key_complete_get_connection_handle(const uint8_t * event){ 470 return little_endian_read_16(event, 3); 471 } 472 /** 473 * @brief Get field key_flag from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 474 * @param event packet 475 * @return key_flag 476 * @note: btstack_type 1 477 */ 478 static inline uint8_t hci_event_master_link_key_complete_get_key_flag(const uint8_t * event){ 479 return event[5]; 480 } 481 482 /** 483 * @brief Get field status from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 484 * @param event packet 485 * @return status 486 * @note: btstack_type 1 487 */ 488 static inline uint8_t hci_event_read_remote_version_information_complete_get_status(const uint8_t * event){ 489 return event[2]; 490 } 491 /** 492 * @brief Get field connection_handle from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 493 * @param event packet 494 * @return connection_handle 495 * @note: btstack_type 2 496 */ 497 static inline uint16_t hci_event_read_remote_version_information_complete_get_connection_handle(const uint8_t * event){ 498 return little_endian_read_16(event, 3); 499 } 500 /** 501 * @brief Get field version from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 502 * @param event packet 503 * @return version 504 * @note: btstack_type 1 505 */ 506 static inline uint8_t hci_event_read_remote_version_information_complete_get_version(const uint8_t * event){ 507 return event[5]; 508 } 509 /** 510 * @brief Get field manufacturer_name from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 511 * @param event packet 512 * @return manufacturer_name 513 * @note: btstack_type 2 514 */ 515 static inline uint16_t hci_event_read_remote_version_information_complete_get_manufacturer_name(const uint8_t * event){ 516 return little_endian_read_16(event, 6); 517 } 518 /** 519 * @brief Get field subversion from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 520 * @param event packet 521 * @return subversion 522 * @note: btstack_type 2 523 */ 524 static inline uint16_t hci_event_read_remote_version_information_complete_get_subversion(const uint8_t * event){ 525 return little_endian_read_16(event, 8); 526 } 527 528 /** 529 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_COMPLETE 530 * @param event packet 531 * @return num_hci_command_packets 532 * @note: btstack_type 1 533 */ 534 static inline uint8_t hci_event_command_complete_get_num_hci_command_packets(const uint8_t * event){ 535 return event[2]; 536 } 537 /** 538 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_COMPLETE 539 * @param event packet 540 * @return command_opcode 541 * @note: btstack_type 2 542 */ 543 static inline uint16_t hci_event_command_complete_get_command_opcode(const uint8_t * event){ 544 return little_endian_read_16(event, 3); 545 } 546 /** 547 * @brief Get field return_parameters from event HCI_EVENT_COMMAND_COMPLETE 548 * @param event packet 549 * @return return_parameters 550 * @note: btstack_type R 551 */ 552 static inline const uint8_t * hci_event_command_complete_get_return_parameters(const uint8_t * event){ 553 return &event[5]; 554 } 555 556 /** 557 * @brief Get field status from event HCI_EVENT_COMMAND_STATUS 558 * @param event packet 559 * @return status 560 * @note: btstack_type 1 561 */ 562 static inline uint8_t hci_event_command_status_get_status(const uint8_t * event){ 563 return event[2]; 564 } 565 /** 566 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_STATUS 567 * @param event packet 568 * @return num_hci_command_packets 569 * @note: btstack_type 1 570 */ 571 static inline uint8_t hci_event_command_status_get_num_hci_command_packets(const uint8_t * event){ 572 return event[3]; 573 } 574 /** 575 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_STATUS 576 * @param event packet 577 * @return command_opcode 578 * @note: btstack_type 2 579 */ 580 static inline uint16_t hci_event_command_status_get_command_opcode(const uint8_t * event){ 581 return little_endian_read_16(event, 4); 582 } 583 584 /** 585 * @brief Get field hardware_code from event HCI_EVENT_HARDWARE_ERROR 586 * @param event packet 587 * @return hardware_code 588 * @note: btstack_type 1 589 */ 590 static inline uint8_t hci_event_hardware_error_get_hardware_code(const uint8_t * event){ 591 return event[2]; 592 } 593 594 /** 595 * @brief Get field status from event HCI_EVENT_ROLE_CHANGE 596 * @param event packet 597 * @return status 598 * @note: btstack_type 1 599 */ 600 static inline uint8_t hci_event_role_change_get_status(const uint8_t * event){ 601 return event[2]; 602 } 603 /** 604 * @brief Get field bd_addr from event HCI_EVENT_ROLE_CHANGE 605 * @param event packet 606 * @param Pointer to storage for bd_addr 607 * @note: btstack_type B 608 */ 609 static inline void hci_event_role_change_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 610 reverse_bytes(&event[3], bd_addr, 6); 611 } 612 /** 613 * @brief Get field role from event HCI_EVENT_ROLE_CHANGE 614 * @param event packet 615 * @return role 616 * @note: btstack_type 1 617 */ 618 static inline uint8_t hci_event_role_change_get_role(const uint8_t * event){ 619 return event[9]; 620 } 621 622 /** 623 * @brief Get field status from event HCI_EVENT_MODE_CHANGE 624 * @param event packet 625 * @return status 626 * @note: btstack_type 1 627 */ 628 static inline uint8_t hci_event_mode_change_get_status(const uint8_t * event){ 629 return event[2]; 630 } 631 /** 632 * @brief Get field handle from event HCI_EVENT_MODE_CHANGE 633 * @param event packet 634 * @return handle 635 * @note: btstack_type H 636 */ 637 static inline hci_con_handle_t hci_event_mode_change_get_handle(const uint8_t * event){ 638 return little_endian_read_16(event, 3); 639 } 640 /** 641 * @brief Get field mode from event HCI_EVENT_MODE_CHANGE 642 * @param event packet 643 * @return mode 644 * @note: btstack_type 1 645 */ 646 static inline uint8_t hci_event_mode_change_get_mode(const uint8_t * event){ 647 return event[5]; 648 } 649 /** 650 * @brief Get field interval from event HCI_EVENT_MODE_CHANGE 651 * @param event packet 652 * @return interval 653 * @note: btstack_type 2 654 */ 655 static inline uint16_t hci_event_mode_change_get_interval(const uint8_t * event){ 656 return little_endian_read_16(event, 6); 657 } 658 659 /** 660 * @brief Get field bd_addr from event HCI_EVENT_PIN_CODE_REQUEST 661 * @param event packet 662 * @param Pointer to storage for bd_addr 663 * @note: btstack_type B 664 */ 665 static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 666 reverse_bytes(&event[2], bd_addr, 6); 667 } 668 669 /** 670 * @brief Get field bd_addr from event HCI_EVENT_LINK_KEY_REQUEST 671 * @param event packet 672 * @param Pointer to storage for bd_addr 673 * @note: btstack_type B 674 */ 675 static inline void hci_event_link_key_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 676 reverse_bytes(&event[2], bd_addr, 6); 677 } 678 679 /** 680 * @brief Get field link_type from event HCI_EVENT_DATA_BUFFER_OVERFLOW 681 * @param event packet 682 * @return link_type 683 * @note: btstack_type 1 684 */ 685 static inline uint8_t hci_event_data_buffer_overflow_get_link_type(const uint8_t * event){ 686 return event[2]; 687 } 688 689 /** 690 * @brief Get field handle from event HCI_EVENT_MAX_SLOTS_CHANGED 691 * @param event packet 692 * @return handle 693 * @note: btstack_type H 694 */ 695 static inline hci_con_handle_t hci_event_max_slots_changed_get_handle(const uint8_t * event){ 696 return little_endian_read_16(event, 2); 697 } 698 /** 699 * @brief Get field lmp_max_slots from event HCI_EVENT_MAX_SLOTS_CHANGED 700 * @param event packet 701 * @return lmp_max_slots 702 * @note: btstack_type 1 703 */ 704 static inline uint8_t hci_event_max_slots_changed_get_lmp_max_slots(const uint8_t * event){ 705 return event[4]; 706 } 707 708 /** 709 * @brief Get field status from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 710 * @param event packet 711 * @return status 712 * @note: btstack_type 1 713 */ 714 static inline uint8_t hci_event_read_clock_offset_complete_get_status(const uint8_t * event){ 715 return event[2]; 716 } 717 /** 718 * @brief Get field handle from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 719 * @param event packet 720 * @return handle 721 * @note: btstack_type H 722 */ 723 static inline hci_con_handle_t hci_event_read_clock_offset_complete_get_handle(const uint8_t * event){ 724 return little_endian_read_16(event, 3); 725 } 726 /** 727 * @brief Get field clock_offset from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 728 * @param event packet 729 * @return clock_offset 730 * @note: btstack_type 2 731 */ 732 static inline uint16_t hci_event_read_clock_offset_complete_get_clock_offset(const uint8_t * event){ 733 return little_endian_read_16(event, 5); 734 } 735 736 /** 737 * @brief Get field status from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 738 * @param event packet 739 * @return status 740 * @note: btstack_type 1 741 */ 742 static inline uint8_t hci_event_connection_packet_type_changed_get_status(const uint8_t * event){ 743 return event[2]; 744 } 745 /** 746 * @brief Get field handle from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 747 * @param event packet 748 * @return handle 749 * @note: btstack_type H 750 */ 751 static inline hci_con_handle_t hci_event_connection_packet_type_changed_get_handle(const uint8_t * event){ 752 return little_endian_read_16(event, 3); 753 } 754 /** 755 * @brief Get field packet_types from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 756 * @param event packet 757 * @return packet_types 758 * @note: btstack_type 2 759 */ 760 static inline uint16_t hci_event_connection_packet_type_changed_get_packet_types(const uint8_t * event){ 761 return little_endian_read_16(event, 5); 762 } 763 764 /** 765 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 766 * @param event packet 767 * @return num_responses 768 * @note: btstack_type 1 769 */ 770 static inline uint8_t hci_event_inquiry_result_with_rssi_get_num_responses(const uint8_t * event){ 771 return event[2]; 772 } 773 /** 774 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 775 * @param event packet 776 * @param Pointer to storage for bd_addr 777 * @note: btstack_type B 778 */ 779 static inline void hci_event_inquiry_result_with_rssi_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 780 reverse_bytes(&event[3], bd_addr, 6); 781 } 782 /** 783 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 784 * @param event packet 785 * @return page_scan_repetition_mode 786 * @note: btstack_type 1 787 */ 788 static inline uint8_t hci_event_inquiry_result_with_rssi_get_page_scan_repetition_mode(const uint8_t * event){ 789 return event[9]; 790 } 791 /** 792 * @brief Get field reserved from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 793 * @param event packet 794 * @return reserved 795 * @note: btstack_type 1 796 */ 797 static inline uint8_t hci_event_inquiry_result_with_rssi_get_reserved(const uint8_t * event){ 798 return event[10]; 799 } 800 /** 801 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 802 * @param event packet 803 * @return class_of_device 804 * @note: btstack_type 3 805 */ 806 static inline uint32_t hci_event_inquiry_result_with_rssi_get_class_of_device(const uint8_t * event){ 807 return little_endian_read_24(event, 11); 808 } 809 /** 810 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 811 * @param event packet 812 * @return clock_offset 813 * @note: btstack_type 2 814 */ 815 static inline uint16_t hci_event_inquiry_result_with_rssi_get_clock_offset(const uint8_t * event){ 816 return little_endian_read_16(event, 14); 817 } 818 /** 819 * @brief Get field rssi from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 820 * @param event packet 821 * @return rssi 822 * @note: btstack_type 1 823 */ 824 static inline uint8_t hci_event_inquiry_result_with_rssi_get_rssi(const uint8_t * event){ 825 return event[16]; 826 } 827 828 /** 829 * @brief Get field status from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 830 * @param event packet 831 * @return status 832 * @note: btstack_type 1 833 */ 834 static inline uint8_t hci_event_synchronous_connection_complete_get_status(const uint8_t * event){ 835 return event[2]; 836 } 837 /** 838 * @brief Get field handle from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 839 * @param event packet 840 * @return handle 841 * @note: btstack_type H 842 */ 843 static inline hci_con_handle_t hci_event_synchronous_connection_complete_get_handle(const uint8_t * event){ 844 return little_endian_read_16(event, 3); 845 } 846 /** 847 * @brief Get field bd_addr from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 848 * @param event packet 849 * @param Pointer to storage for bd_addr 850 * @note: btstack_type B 851 */ 852 static inline void hci_event_synchronous_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 853 reverse_bytes(&event[5], bd_addr, 6); 854 } 855 /** 856 * @brief Get field link_type from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 857 * @param event packet 858 * @return link_type 859 * @note: btstack_type 1 860 */ 861 static inline uint8_t hci_event_synchronous_connection_complete_get_link_type(const uint8_t * event){ 862 return event[11]; 863 } 864 /** 865 * @brief Get field transmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 866 * @param event packet 867 * @return transmission_interval 868 * @note: btstack_type 1 869 */ 870 static inline uint8_t hci_event_synchronous_connection_complete_get_transmission_interval(const uint8_t * event){ 871 return event[12]; 872 } 873 /** 874 * @brief Get field retransmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 875 * @param event packet 876 * @return retransmission_interval 877 * @note: btstack_type 1 878 */ 879 static inline uint8_t hci_event_synchronous_connection_complete_get_retransmission_interval(const uint8_t * event){ 880 return event[13]; 881 } 882 /** 883 * @brief Get field rx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 884 * @param event packet 885 * @return rx_packet_length 886 * @note: btstack_type 2 887 */ 888 static inline uint16_t hci_event_synchronous_connection_complete_get_rx_packet_length(const uint8_t * event){ 889 return little_endian_read_16(event, 14); 890 } 891 /** 892 * @brief Get field tx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 893 * @param event packet 894 * @return tx_packet_length 895 * @note: btstack_type 2 896 */ 897 static inline uint16_t hci_event_synchronous_connection_complete_get_tx_packet_length(const uint8_t * event){ 898 return little_endian_read_16(event, 16); 899 } 900 /** 901 * @brief Get field air_mode from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 902 * @param event packet 903 * @return air_mode 904 * @note: btstack_type 1 905 */ 906 static inline uint8_t hci_event_synchronous_connection_complete_get_air_mode(const uint8_t * event){ 907 return event[18]; 908 } 909 910 /** 911 * @brief Get field num_responses from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 912 * @param event packet 913 * @return num_responses 914 * @note: btstack_type 1 915 */ 916 static inline uint8_t hci_event_extended_inquiry_response_get_num_responses(const uint8_t * event){ 917 return event[2]; 918 } 919 /** 920 * @brief Get field bd_addr from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 921 * @param event packet 922 * @param Pointer to storage for bd_addr 923 * @note: btstack_type B 924 */ 925 static inline void hci_event_extended_inquiry_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 926 reverse_bytes(&event[3], bd_addr, 6); 927 } 928 /** 929 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 930 * @param event packet 931 * @return page_scan_repetition_mode 932 * @note: btstack_type 1 933 */ 934 static inline uint8_t hci_event_extended_inquiry_response_get_page_scan_repetition_mode(const uint8_t * event){ 935 return event[9]; 936 } 937 /** 938 * @brief Get field reserved from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 939 * @param event packet 940 * @return reserved 941 * @note: btstack_type 1 942 */ 943 static inline uint8_t hci_event_extended_inquiry_response_get_reserved(const uint8_t * event){ 944 return event[10]; 945 } 946 /** 947 * @brief Get field class_of_device from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 948 * @param event packet 949 * @return class_of_device 950 * @note: btstack_type 3 951 */ 952 static inline uint32_t hci_event_extended_inquiry_response_get_class_of_device(const uint8_t * event){ 953 return little_endian_read_24(event, 11); 954 } 955 /** 956 * @brief Get field clock_offset from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 957 * @param event packet 958 * @return clock_offset 959 * @note: btstack_type 2 960 */ 961 static inline uint16_t hci_event_extended_inquiry_response_get_clock_offset(const uint8_t * event){ 962 return little_endian_read_16(event, 14); 963 } 964 /** 965 * @brief Get field rssi from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 966 * @param event packet 967 * @return rssi 968 * @note: btstack_type 1 969 */ 970 static inline uint8_t hci_event_extended_inquiry_response_get_rssi(const uint8_t * event){ 971 return event[16]; 972 } 973 974 /** 975 * @brief Get field status from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 976 * @param event packet 977 * @return status 978 * @note: btstack_type 1 979 */ 980 static inline uint8_t hci_event_encryption_key_refresh_complete_get_status(const uint8_t * event){ 981 return event[2]; 982 } 983 /** 984 * @brief Get field handle from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 985 * @param event packet 986 * @return handle 987 * @note: btstack_type H 988 */ 989 static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_handle(const uint8_t * event){ 990 return little_endian_read_16(event, 3); 991 } 992 993 /** 994 * @brief Get field bd_addr from event HCI_EVENT_IO_CAPABILITY_REQUEST 995 * @param event packet 996 * @param Pointer to storage for bd_addr 997 * @note: btstack_type B 998 */ 999 static inline void hci_event_io_capability_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1000 reverse_bytes(&event[2], bd_addr, 6); 1001 } 1002 1003 /** 1004 * @brief Get field bd_addr from event HCI_EVENT_IO_CAPABILITY_RESPONSE 1005 * @param event packet 1006 * @param Pointer to storage for bd_addr 1007 * @note: btstack_type B 1008 */ 1009 static inline void hci_event_io_capability_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1010 reverse_bytes(&event[2], bd_addr, 6); 1011 } 1012 /** 1013 * @brief Get field io_capability from event HCI_EVENT_IO_CAPABILITY_RESPONSE 1014 * @param event packet 1015 * @return io_capability 1016 * @note: btstack_type 1 1017 */ 1018 static inline uint8_t hci_event_io_capability_response_get_io_capability(const uint8_t * event){ 1019 return event[8]; 1020 } 1021 /** 1022 * @brief Get field oob_data_present from event HCI_EVENT_IO_CAPABILITY_RESPONSE 1023 * @param event packet 1024 * @return oob_data_present 1025 * @note: btstack_type 1 1026 */ 1027 static inline uint8_t hci_event_io_capability_response_get_oob_data_present(const uint8_t * event){ 1028 return event[9]; 1029 } 1030 /** 1031 * @brief Get field authentication_requirements from event HCI_EVENT_IO_CAPABILITY_RESPONSE 1032 * @param event packet 1033 * @return authentication_requirements 1034 * @note: btstack_type 1 1035 */ 1036 static inline uint8_t hci_event_io_capability_response_get_authentication_requirements(const uint8_t * event){ 1037 return event[10]; 1038 } 1039 1040 /** 1041 * @brief Get field bd_addr from event HCI_EVENT_USER_CONFIRMATION_REQUEST 1042 * @param event packet 1043 * @param Pointer to storage for bd_addr 1044 * @note: btstack_type B 1045 */ 1046 static inline void hci_event_user_confirmation_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1047 reverse_bytes(&event[2], bd_addr, 6); 1048 } 1049 /** 1050 * @brief Get field numeric_value from event HCI_EVENT_USER_CONFIRMATION_REQUEST 1051 * @param event packet 1052 * @return numeric_value 1053 * @note: btstack_type 4 1054 */ 1055 static inline uint32_t hci_event_user_confirmation_request_get_numeric_value(const uint8_t * event){ 1056 return little_endian_read_32(event, 8); 1057 } 1058 1059 /** 1060 * @brief Get field bd_addr from event HCI_EVENT_USER_PASSKEY_REQUEST 1061 * @param event packet 1062 * @param Pointer to storage for bd_addr 1063 * @note: btstack_type B 1064 */ 1065 static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1066 reverse_bytes(&event[2], bd_addr, 6); 1067 } 1068 1069 /** 1070 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_OOB_DATA_REQUEST 1071 * @param event packet 1072 * @param Pointer to storage for bd_addr 1073 * @note: btstack_type B 1074 */ 1075 static inline void hci_event_remote_oob_data_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1076 reverse_bytes(&event[2], bd_addr, 6); 1077 } 1078 1079 /** 1080 * @brief Get field status from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 1081 * @param event packet 1082 * @return status 1083 * @note: btstack_type 1 1084 */ 1085 static inline uint8_t hci_event_simple_pairing_complete_get_status(const uint8_t * event){ 1086 return event[2]; 1087 } 1088 /** 1089 * @brief Get field bd_addr from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 1090 * @param event packet 1091 * @param Pointer to storage for bd_addr 1092 * @note: btstack_type B 1093 */ 1094 static inline void hci_event_simple_pairing_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1095 reverse_bytes(&event[3], bd_addr, 6); 1096 } 1097 1098 /** 1099 * @brief Get field bd_addr from event HCI_EVENT_USER_PASSKEY_NOTIFICATION 1100 * @param event packet 1101 * @param Pointer to storage for bd_addr 1102 * @note: btstack_type B 1103 */ 1104 static inline void hci_event_user_passkey_notification_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1105 reverse_bytes(&event[2], bd_addr, 6); 1106 } 1107 /** 1108 * @brief Get field numeric_value from event HCI_EVENT_USER_PASSKEY_NOTIFICATION 1109 * @param event packet 1110 * @return numeric_value 1111 * @note: btstack_type 4 1112 */ 1113 static inline uint32_t hci_event_user_passkey_notification_get_numeric_value(const uint8_t * event){ 1114 return little_endian_read_32(event, 8); 1115 } 1116 1117 /** 1118 * @brief Get field bd_addr from event HCI_EVENT_KEYPRESS_NOTIFICATION 1119 * @param event packet 1120 * @param Pointer to storage for bd_addr 1121 * @note: btstack_type B 1122 */ 1123 static inline void hci_event_keypress_notification_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1124 reverse_bytes(&event[2], bd_addr, 6); 1125 } 1126 /** 1127 * @brief Get field notification_type from event HCI_EVENT_KEYPRESS_NOTIFICATION 1128 * @param event packet 1129 * @return notification_type 1130 * @note: btstack_type 1 1131 */ 1132 static inline uint8_t hci_event_keypress_notification_get_notification_type(const uint8_t * event){ 1133 return event[8]; 1134 } 1135 1136 /** 1137 * @brief Get field state from event BTSTACK_EVENT_STATE 1138 * @param event packet 1139 * @return state 1140 * @note: btstack_type 1 1141 */ 1142 static inline uint8_t btstack_event_state_get_state(const uint8_t * event){ 1143 return event[2]; 1144 } 1145 1146 /** 1147 * @brief Get field number_connections from event BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 1148 * @param event packet 1149 * @return number_connections 1150 * @note: btstack_type 1 1151 */ 1152 static inline uint8_t btstack_event_nr_connections_changed_get_number_connections(const uint8_t * event){ 1153 return event[2]; 1154 } 1155 1156 1157 /** 1158 * @brief Get field discoverable from event BTSTACK_EVENT_DISCOVERABLE_ENABLED 1159 * @param event packet 1160 * @return discoverable 1161 * @note: btstack_type 1 1162 */ 1163 static inline uint8_t btstack_event_discoverable_enabled_get_discoverable(const uint8_t * event){ 1164 return event[2]; 1165 } 1166 1167 /** 1168 * @brief Get field active from event HCI_EVENT_TRANSPORT_SLEEP_MODE 1169 * @param event packet 1170 * @return active 1171 * @note: btstack_type 1 1172 */ 1173 static inline uint8_t hci_event_transport_sleep_mode_get_active(const uint8_t * event){ 1174 return event[2]; 1175 } 1176 1177 /** 1178 * @brief Get field handle from event HCI_EVENT_SCO_CAN_SEND_NOW 1179 * @param event packet 1180 * @param Pointer to storage for handle 1181 * @note: btstack_type B 1182 */ 1183 static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){ 1184 reverse_bytes(&event[2], handle, 6); 1185 } 1186 1187 /** 1188 * @brief Get field status from event L2CAP_EVENT_CHANNEL_OPENED 1189 * @param event packet 1190 * @return status 1191 * @note: btstack_type 1 1192 */ 1193 static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * event){ 1194 return event[2]; 1195 } 1196 /** 1197 * @brief Get field address from event L2CAP_EVENT_CHANNEL_OPENED 1198 * @param event packet 1199 * @param Pointer to storage for address 1200 * @note: btstack_type B 1201 */ 1202 static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1203 reverse_bytes(&event[3], address, 6); 1204 } 1205 /** 1206 * @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED 1207 * @param event packet 1208 * @return handle 1209 * @note: btstack_type H 1210 */ 1211 static inline hci_con_handle_t l2cap_event_channel_opened_get_handle(const uint8_t * event){ 1212 return little_endian_read_16(event, 9); 1213 } 1214 /** 1215 * @brief Get field psm from event L2CAP_EVENT_CHANNEL_OPENED 1216 * @param event packet 1217 * @return psm 1218 * @note: btstack_type 2 1219 */ 1220 static inline uint16_t l2cap_event_channel_opened_get_psm(const uint8_t * event){ 1221 return little_endian_read_16(event, 11); 1222 } 1223 /** 1224 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_OPENED 1225 * @param event packet 1226 * @return local_cid 1227 * @note: btstack_type 2 1228 */ 1229 static inline uint16_t l2cap_event_channel_opened_get_local_cid(const uint8_t * event){ 1230 return little_endian_read_16(event, 13); 1231 } 1232 /** 1233 * @brief Get field remote_cid from event L2CAP_EVENT_CHANNEL_OPENED 1234 * @param event packet 1235 * @return remote_cid 1236 * @note: btstack_type 2 1237 */ 1238 static inline uint16_t l2cap_event_channel_opened_get_remote_cid(const uint8_t * event){ 1239 return little_endian_read_16(event, 15); 1240 } 1241 /** 1242 * @brief Get field local_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1243 * @param event packet 1244 * @return local_mtu 1245 * @note: btstack_type 2 1246 */ 1247 static inline uint16_t l2cap_event_channel_opened_get_local_mtu(const uint8_t * event){ 1248 return little_endian_read_16(event, 17); 1249 } 1250 /** 1251 * @brief Get field remote_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1252 * @param event packet 1253 * @return remote_mtu 1254 * @note: btstack_type 2 1255 */ 1256 static inline uint16_t l2cap_event_channel_opened_get_remote_mtu(const uint8_t * event){ 1257 return little_endian_read_16(event, 19); 1258 } 1259 /** 1260 * @brief Get field flush_timeout from event L2CAP_EVENT_CHANNEL_OPENED 1261 * @param event packet 1262 * @return flush_timeout 1263 * @note: btstack_type 2 1264 */ 1265 static inline uint16_t l2cap_event_channel_opened_get_flush_timeout(const uint8_t * event){ 1266 return little_endian_read_16(event, 21); 1267 } 1268 /** 1269 * @brief Get field incoming from event L2CAP_EVENT_CHANNEL_OPENED 1270 * @param event packet 1271 * @return incoming 1272 * @note: btstack_type 1 1273 */ 1274 static inline uint8_t l2cap_event_channel_opened_get_incoming(const uint8_t * event){ 1275 return event[23]; 1276 } 1277 /** 1278 * @brief Get field mode from event L2CAP_EVENT_CHANNEL_OPENED 1279 * @param event packet 1280 * @return mode 1281 * @note: btstack_type 1 1282 */ 1283 static inline uint8_t l2cap_event_channel_opened_get_mode(const uint8_t * event){ 1284 return event[24]; 1285 } 1286 /** 1287 * @brief Get field fcs from event L2CAP_EVENT_CHANNEL_OPENED 1288 * @param event packet 1289 * @return fcs 1290 * @note: btstack_type 1 1291 */ 1292 static inline uint8_t l2cap_event_channel_opened_get_fcs(const uint8_t * event){ 1293 return event[25]; 1294 } 1295 1296 /** 1297 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED 1298 * @param event packet 1299 * @return local_cid 1300 * @note: btstack_type 2 1301 */ 1302 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){ 1303 return little_endian_read_16(event, 2); 1304 } 1305 1306 /** 1307 * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION 1308 * @param event packet 1309 * @param Pointer to storage for address 1310 * @note: btstack_type B 1311 */ 1312 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1313 reverse_bytes(&event[2], address, 6); 1314 } 1315 /** 1316 * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION 1317 * @param event packet 1318 * @return handle 1319 * @note: btstack_type H 1320 */ 1321 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){ 1322 return little_endian_read_16(event, 8); 1323 } 1324 /** 1325 * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION 1326 * @param event packet 1327 * @return psm 1328 * @note: btstack_type 2 1329 */ 1330 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){ 1331 return little_endian_read_16(event, 10); 1332 } 1333 /** 1334 * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1335 * @param event packet 1336 * @return local_cid 1337 * @note: btstack_type 2 1338 */ 1339 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){ 1340 return little_endian_read_16(event, 12); 1341 } 1342 /** 1343 * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1344 * @param event packet 1345 * @return remote_cid 1346 * @note: btstack_type 2 1347 */ 1348 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){ 1349 return little_endian_read_16(event, 14); 1350 } 1351 1352 /** 1353 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1354 * @param event packet 1355 * @return handle 1356 * @note: btstack_type H 1357 */ 1358 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){ 1359 return little_endian_read_16(event, 2); 1360 } 1361 /** 1362 * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1363 * @param event packet 1364 * @return interval_min 1365 * @note: btstack_type 2 1366 */ 1367 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){ 1368 return little_endian_read_16(event, 4); 1369 } 1370 /** 1371 * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1372 * @param event packet 1373 * @return interval_max 1374 * @note: btstack_type 2 1375 */ 1376 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){ 1377 return little_endian_read_16(event, 6); 1378 } 1379 /** 1380 * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1381 * @param event packet 1382 * @return latencey 1383 * @note: btstack_type 2 1384 */ 1385 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){ 1386 return little_endian_read_16(event, 8); 1387 } 1388 /** 1389 * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1390 * @param event packet 1391 * @return timeout_multiplier 1392 * @note: btstack_type 2 1393 */ 1394 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){ 1395 return little_endian_read_16(event, 10); 1396 } 1397 1398 /** 1399 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1400 * @param event packet 1401 * @return handle 1402 * @note: btstack_type H 1403 */ 1404 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){ 1405 return little_endian_read_16(event, 2); 1406 } 1407 /** 1408 * @brief Get field result from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1409 * @param event packet 1410 * @return result 1411 * @note: btstack_type 2 1412 */ 1413 static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){ 1414 return little_endian_read_16(event, 4); 1415 } 1416 1417 /** 1418 * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW 1419 * @param event packet 1420 * @return local_cid 1421 * @note: btstack_type 2 1422 */ 1423 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){ 1424 return little_endian_read_16(event, 2); 1425 } 1426 1427 /** 1428 * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1429 * @param event packet 1430 * @return address_type 1431 * @note: btstack_type 1 1432 */ 1433 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){ 1434 return event[2]; 1435 } 1436 /** 1437 * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1438 * @param event packet 1439 * @param Pointer to storage for address 1440 * @note: btstack_type B 1441 */ 1442 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1443 reverse_bytes(&event[3], address, 6); 1444 } 1445 /** 1446 * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1447 * @param event packet 1448 * @return handle 1449 * @note: btstack_type H 1450 */ 1451 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){ 1452 return little_endian_read_16(event, 9); 1453 } 1454 /** 1455 * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1456 * @param event packet 1457 * @return psm 1458 * @note: btstack_type 2 1459 */ 1460 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){ 1461 return little_endian_read_16(event, 11); 1462 } 1463 /** 1464 * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1465 * @param event packet 1466 * @return local_cid 1467 * @note: btstack_type 2 1468 */ 1469 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){ 1470 return little_endian_read_16(event, 13); 1471 } 1472 /** 1473 * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1474 * @param event packet 1475 * @return remote_cid 1476 * @note: btstack_type 2 1477 */ 1478 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){ 1479 return little_endian_read_16(event, 15); 1480 } 1481 /** 1482 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1483 * @param event packet 1484 * @return remote_mtu 1485 * @note: btstack_type 2 1486 */ 1487 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){ 1488 return little_endian_read_16(event, 17); 1489 } 1490 1491 /** 1492 * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED 1493 * @param event packet 1494 * @return status 1495 * @note: btstack_type 1 1496 */ 1497 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){ 1498 return event[2]; 1499 } 1500 /** 1501 * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED 1502 * @param event packet 1503 * @return address_type 1504 * @note: btstack_type 1 1505 */ 1506 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){ 1507 return event[3]; 1508 } 1509 /** 1510 * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED 1511 * @param event packet 1512 * @param Pointer to storage for address 1513 * @note: btstack_type B 1514 */ 1515 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1516 reverse_bytes(&event[4], address, 6); 1517 } 1518 /** 1519 * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED 1520 * @param event packet 1521 * @return handle 1522 * @note: btstack_type H 1523 */ 1524 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){ 1525 return little_endian_read_16(event, 10); 1526 } 1527 /** 1528 * @brief Get field incoming from event L2CAP_EVENT_LE_CHANNEL_OPENED 1529 * @param event packet 1530 * @return incoming 1531 * @note: btstack_type 1 1532 */ 1533 static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){ 1534 return event[12]; 1535 } 1536 /** 1537 * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED 1538 * @param event packet 1539 * @return psm 1540 * @note: btstack_type 2 1541 */ 1542 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){ 1543 return little_endian_read_16(event, 13); 1544 } 1545 /** 1546 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1547 * @param event packet 1548 * @return local_cid 1549 * @note: btstack_type 2 1550 */ 1551 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){ 1552 return little_endian_read_16(event, 15); 1553 } 1554 /** 1555 * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1556 * @param event packet 1557 * @return remote_cid 1558 * @note: btstack_type 2 1559 */ 1560 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){ 1561 return little_endian_read_16(event, 17); 1562 } 1563 /** 1564 * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1565 * @param event packet 1566 * @return local_mtu 1567 * @note: btstack_type 2 1568 */ 1569 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){ 1570 return little_endian_read_16(event, 19); 1571 } 1572 /** 1573 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1574 * @param event packet 1575 * @return remote_mtu 1576 * @note: btstack_type 2 1577 */ 1578 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){ 1579 return little_endian_read_16(event, 21); 1580 } 1581 1582 /** 1583 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED 1584 * @param event packet 1585 * @return local_cid 1586 * @note: btstack_type 2 1587 */ 1588 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){ 1589 return little_endian_read_16(event, 2); 1590 } 1591 1592 /** 1593 * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW 1594 * @param event packet 1595 * @return local_cid 1596 * @note: btstack_type 2 1597 */ 1598 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){ 1599 return little_endian_read_16(event, 2); 1600 } 1601 1602 /** 1603 * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT 1604 * @param event packet 1605 * @return local_cid 1606 * @note: btstack_type 2 1607 */ 1608 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){ 1609 return little_endian_read_16(event, 2); 1610 } 1611 1612 /** 1613 * @brief Get field local_cid from event L2CAP_EVENT_ERTM_BUFFER_RELEASED 1614 * @param event packet 1615 * @return local_cid 1616 * @note: btstack_type 2 1617 */ 1618 static inline uint16_t l2cap_event_ertm_buffer_released_get_local_cid(const uint8_t * event){ 1619 return little_endian_read_16(event, 2); 1620 } 1621 1622 1623 /** 1624 * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED 1625 * @param event packet 1626 * @return status 1627 * @note: btstack_type 1 1628 */ 1629 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){ 1630 return event[2]; 1631 } 1632 /** 1633 * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED 1634 * @param event packet 1635 * @param Pointer to storage for bd_addr 1636 * @note: btstack_type B 1637 */ 1638 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1639 reverse_bytes(&event[3], bd_addr, 6); 1640 } 1641 /** 1642 * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED 1643 * @param event packet 1644 * @return con_handle 1645 * @note: btstack_type 2 1646 */ 1647 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){ 1648 return little_endian_read_16(event, 9); 1649 } 1650 /** 1651 * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED 1652 * @param event packet 1653 * @return server_channel 1654 * @note: btstack_type 1 1655 */ 1656 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){ 1657 return event[11]; 1658 } 1659 /** 1660 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED 1661 * @param event packet 1662 * @return rfcomm_cid 1663 * @note: btstack_type 2 1664 */ 1665 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){ 1666 return little_endian_read_16(event, 12); 1667 } 1668 /** 1669 * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED 1670 * @param event packet 1671 * @return max_frame_size 1672 * @note: btstack_type 2 1673 */ 1674 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){ 1675 return little_endian_read_16(event, 14); 1676 } 1677 /** 1678 * @brief Get field incoming from event RFCOMM_EVENT_CHANNEL_OPENED 1679 * @param event packet 1680 * @return incoming 1681 * @note: btstack_type 1 1682 */ 1683 static inline uint8_t rfcomm_event_channel_opened_get_incoming(const uint8_t * event){ 1684 return event[16]; 1685 } 1686 1687 /** 1688 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED 1689 * @param event packet 1690 * @return rfcomm_cid 1691 * @note: btstack_type 2 1692 */ 1693 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){ 1694 return little_endian_read_16(event, 2); 1695 } 1696 1697 /** 1698 * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION 1699 * @param event packet 1700 * @param Pointer to storage for bd_addr 1701 * @note: btstack_type B 1702 */ 1703 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1704 reverse_bytes(&event[2], bd_addr, 6); 1705 } 1706 /** 1707 * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION 1708 * @param event packet 1709 * @return server_channel 1710 * @note: btstack_type 1 1711 */ 1712 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){ 1713 return event[8]; 1714 } 1715 /** 1716 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION 1717 * @param event packet 1718 * @return rfcomm_cid 1719 * @note: btstack_type 2 1720 */ 1721 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){ 1722 return little_endian_read_16(event, 9); 1723 } 1724 1725 /** 1726 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1727 * @param event packet 1728 * @return rfcomm_cid 1729 * @note: btstack_type 2 1730 */ 1731 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){ 1732 return little_endian_read_16(event, 2); 1733 } 1734 /** 1735 * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1736 * @param event packet 1737 * @return line_status 1738 * @note: btstack_type 1 1739 */ 1740 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){ 1741 return event[4]; 1742 } 1743 1744 /** 1745 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1746 * @param event packet 1747 * @return rfcomm_cid 1748 * @note: btstack_type 2 1749 */ 1750 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){ 1751 return little_endian_read_16(event, 2); 1752 } 1753 /** 1754 * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1755 * @param event packet 1756 * @return modem_status 1757 * @note: btstack_type 1 1758 */ 1759 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){ 1760 return event[4]; 1761 } 1762 1763 /** 1764 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW 1765 * @param event packet 1766 * @return rfcomm_cid 1767 * @note: btstack_type 2 1768 */ 1769 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){ 1770 return little_endian_read_16(event, 2); 1771 } 1772 1773 /** 1774 * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE 1775 * @param event packet 1776 * @return status 1777 * @note: btstack_type 1 1778 */ 1779 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){ 1780 return event[2]; 1781 } 1782 1783 /** 1784 * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1785 * @param event packet 1786 * @return rfcomm_channel 1787 * @note: btstack_type 1 1788 */ 1789 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){ 1790 return event[2]; 1791 } 1792 /** 1793 * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1794 * @param event packet 1795 * @return name 1796 * @note: btstack_type T 1797 */ 1798 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){ 1799 return (const char *) &event[3]; 1800 } 1801 1802 /** 1803 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1804 * @param event packet 1805 * @return record_id 1806 * @note: btstack_type 2 1807 */ 1808 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){ 1809 return little_endian_read_16(event, 2); 1810 } 1811 /** 1812 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1813 * @param event packet 1814 * @return attribute_id 1815 * @note: btstack_type 2 1816 */ 1817 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){ 1818 return little_endian_read_16(event, 4); 1819 } 1820 /** 1821 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1822 * @param event packet 1823 * @return attribute_length 1824 * @note: btstack_type 2 1825 */ 1826 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){ 1827 return little_endian_read_16(event, 6); 1828 } 1829 /** 1830 * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1831 * @param event packet 1832 * @return data_offset 1833 * @note: btstack_type 2 1834 */ 1835 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){ 1836 return little_endian_read_16(event, 8); 1837 } 1838 /** 1839 * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1840 * @param event packet 1841 * @return data 1842 * @note: btstack_type 1 1843 */ 1844 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){ 1845 return event[10]; 1846 } 1847 1848 /** 1849 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1850 * @param event packet 1851 * @return record_id 1852 * @note: btstack_type 2 1853 */ 1854 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){ 1855 return little_endian_read_16(event, 2); 1856 } 1857 /** 1858 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1859 * @param event packet 1860 * @return attribute_id 1861 * @note: btstack_type 2 1862 */ 1863 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){ 1864 return little_endian_read_16(event, 4); 1865 } 1866 /** 1867 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1868 * @param event packet 1869 * @return attribute_length 1870 * @note: btstack_type L 1871 */ 1872 static inline uint16_t sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){ 1873 return little_endian_read_16(event, 6); 1874 } 1875 /** 1876 * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1877 * @param event packet 1878 * @return attribute_value 1879 * @note: btstack_type V 1880 */ 1881 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){ 1882 return &event[8]; 1883 } 1884 1885 /** 1886 * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1887 * @param event packet 1888 * @return total_count 1889 * @note: btstack_type 2 1890 */ 1891 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){ 1892 return little_endian_read_16(event, 2); 1893 } 1894 /** 1895 * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1896 * @param event packet 1897 * @return record_index 1898 * @note: btstack_type 2 1899 */ 1900 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){ 1901 return little_endian_read_16(event, 4); 1902 } 1903 /** 1904 * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1905 * @param event packet 1906 * @return record_handle 1907 * @note: btstack_type 4 1908 */ 1909 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){ 1910 return little_endian_read_32(event, 6); 1911 } 1912 1913 #ifdef ENABLE_BLE 1914 /** 1915 * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE 1916 * @param event packet 1917 * @return handle 1918 * @note: btstack_type H 1919 */ 1920 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){ 1921 return little_endian_read_16(event, 2); 1922 } 1923 /** 1924 * @brief Get field att_status from event GATT_EVENT_QUERY_COMPLETE 1925 * @param event packet 1926 * @return att_status 1927 * @note: btstack_type 1 1928 */ 1929 static inline uint8_t gatt_event_query_complete_get_att_status(const uint8_t * event){ 1930 return event[4]; 1931 } 1932 #endif 1933 1934 #ifdef ENABLE_BLE 1935 /** 1936 * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT 1937 * @param event packet 1938 * @return handle 1939 * @note: btstack_type H 1940 */ 1941 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){ 1942 return little_endian_read_16(event, 2); 1943 } 1944 /** 1945 * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT 1946 * @param event packet 1947 * @param Pointer to storage for service 1948 * @note: btstack_type X 1949 */ 1950 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 1951 gatt_client_deserialize_service(event, 4, service); 1952 } 1953 #endif 1954 1955 #ifdef ENABLE_BLE 1956 /** 1957 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1958 * @param event packet 1959 * @return handle 1960 * @note: btstack_type H 1961 */ 1962 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){ 1963 return little_endian_read_16(event, 2); 1964 } 1965 /** 1966 * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1967 * @param event packet 1968 * @param Pointer to storage for characteristic 1969 * @note: btstack_type Y 1970 */ 1971 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){ 1972 gatt_client_deserialize_characteristic(event, 4, characteristic); 1973 } 1974 #endif 1975 1976 #ifdef ENABLE_BLE 1977 /** 1978 * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1979 * @param event packet 1980 * @return handle 1981 * @note: btstack_type H 1982 */ 1983 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){ 1984 return little_endian_read_16(event, 2); 1985 } 1986 /** 1987 * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1988 * @param event packet 1989 * @return include_handle 1990 * @note: btstack_type 2 1991 */ 1992 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){ 1993 return little_endian_read_16(event, 4); 1994 } 1995 /** 1996 * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1997 * @param event packet 1998 * @param Pointer to storage for service 1999 * @note: btstack_type X 2000 */ 2001 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 2002 gatt_client_deserialize_service(event, 6, service); 2003 } 2004 #endif 2005 2006 #ifdef ENABLE_BLE 2007 /** 2008 * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 2009 * @param event packet 2010 * @return handle 2011 * @note: btstack_type H 2012 */ 2013 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){ 2014 return little_endian_read_16(event, 2); 2015 } 2016 /** 2017 * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 2018 * @param event packet 2019 * @param Pointer to storage for characteristic_descriptor 2020 * @note: btstack_type Z 2021 */ 2022 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){ 2023 gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor); 2024 } 2025 #endif 2026 2027 #ifdef ENABLE_BLE 2028 /** 2029 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 2030 * @param event packet 2031 * @return handle 2032 * @note: btstack_type H 2033 */ 2034 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){ 2035 return little_endian_read_16(event, 2); 2036 } 2037 /** 2038 * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 2039 * @param event packet 2040 * @return value_handle 2041 * @note: btstack_type 2 2042 */ 2043 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 2044 return little_endian_read_16(event, 4); 2045 } 2046 /** 2047 * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 2048 * @param event packet 2049 * @return value_length 2050 * @note: btstack_type L 2051 */ 2052 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){ 2053 return little_endian_read_16(event, 6); 2054 } 2055 /** 2056 * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 2057 * @param event packet 2058 * @return value 2059 * @note: btstack_type V 2060 */ 2061 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){ 2062 return &event[8]; 2063 } 2064 #endif 2065 2066 #ifdef ENABLE_BLE 2067 /** 2068 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2069 * @param event packet 2070 * @return handle 2071 * @note: btstack_type H 2072 */ 2073 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){ 2074 return little_endian_read_16(event, 2); 2075 } 2076 /** 2077 * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2078 * @param event packet 2079 * @return value_handle 2080 * @note: btstack_type 2 2081 */ 2082 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 2083 return little_endian_read_16(event, 4); 2084 } 2085 /** 2086 * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2087 * @param event packet 2088 * @return value_offset 2089 * @note: btstack_type 2 2090 */ 2091 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){ 2092 return little_endian_read_16(event, 6); 2093 } 2094 /** 2095 * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2096 * @param event packet 2097 * @return value_length 2098 * @note: btstack_type L 2099 */ 2100 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){ 2101 return little_endian_read_16(event, 8); 2102 } 2103 /** 2104 * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2105 * @param event packet 2106 * @return value 2107 * @note: btstack_type V 2108 */ 2109 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){ 2110 return &event[10]; 2111 } 2112 #endif 2113 2114 #ifdef ENABLE_BLE 2115 /** 2116 * @brief Get field handle from event GATT_EVENT_NOTIFICATION 2117 * @param event packet 2118 * @return handle 2119 * @note: btstack_type H 2120 */ 2121 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){ 2122 return little_endian_read_16(event, 2); 2123 } 2124 /** 2125 * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION 2126 * @param event packet 2127 * @return value_handle 2128 * @note: btstack_type 2 2129 */ 2130 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){ 2131 return little_endian_read_16(event, 4); 2132 } 2133 /** 2134 * @brief Get field value_length from event GATT_EVENT_NOTIFICATION 2135 * @param event packet 2136 * @return value_length 2137 * @note: btstack_type L 2138 */ 2139 static inline uint16_t gatt_event_notification_get_value_length(const uint8_t * event){ 2140 return little_endian_read_16(event, 6); 2141 } 2142 /** 2143 * @brief Get field value from event GATT_EVENT_NOTIFICATION 2144 * @param event packet 2145 * @return value 2146 * @note: btstack_type V 2147 */ 2148 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){ 2149 return &event[8]; 2150 } 2151 #endif 2152 2153 #ifdef ENABLE_BLE 2154 /** 2155 * @brief Get field handle from event GATT_EVENT_INDICATION 2156 * @param event packet 2157 * @return handle 2158 * @note: btstack_type H 2159 */ 2160 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){ 2161 return little_endian_read_16(event, 2); 2162 } 2163 /** 2164 * @brief Get field value_handle from event GATT_EVENT_INDICATION 2165 * @param event packet 2166 * @return value_handle 2167 * @note: btstack_type 2 2168 */ 2169 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){ 2170 return little_endian_read_16(event, 4); 2171 } 2172 /** 2173 * @brief Get field value_length from event GATT_EVENT_INDICATION 2174 * @param event packet 2175 * @return value_length 2176 * @note: btstack_type L 2177 */ 2178 static inline uint16_t gatt_event_indication_get_value_length(const uint8_t * event){ 2179 return little_endian_read_16(event, 6); 2180 } 2181 /** 2182 * @brief Get field value from event GATT_EVENT_INDICATION 2183 * @param event packet 2184 * @return value 2185 * @note: btstack_type V 2186 */ 2187 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){ 2188 return &event[8]; 2189 } 2190 #endif 2191 2192 #ifdef ENABLE_BLE 2193 /** 2194 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2195 * @param event packet 2196 * @return handle 2197 * @note: btstack_type H 2198 */ 2199 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2200 return little_endian_read_16(event, 2); 2201 } 2202 /** 2203 * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2204 * @param event packet 2205 * @return descriptor_handle 2206 * @note: btstack_type 2 2207 */ 2208 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){ 2209 return little_endian_read_16(event, 4); 2210 } 2211 /** 2212 * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2213 * @param event packet 2214 * @return descriptor_length 2215 * @note: btstack_type L 2216 */ 2217 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2218 return little_endian_read_16(event, 6); 2219 } 2220 /** 2221 * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2222 * @param event packet 2223 * @return descriptor 2224 * @note: btstack_type V 2225 */ 2226 static inline const uint8_t * gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2227 return &event[8]; 2228 } 2229 #endif 2230 2231 #ifdef ENABLE_BLE 2232 /** 2233 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2234 * @param event packet 2235 * @return handle 2236 * @note: btstack_type H 2237 */ 2238 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2239 return little_endian_read_16(event, 2); 2240 } 2241 /** 2242 * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2243 * @param event packet 2244 * @return descriptor_offset 2245 * @note: btstack_type 2 2246 */ 2247 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){ 2248 return little_endian_read_16(event, 4); 2249 } 2250 /** 2251 * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2252 * @param event packet 2253 * @return descriptor_length 2254 * @note: btstack_type L 2255 */ 2256 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2257 return little_endian_read_16(event, 6); 2258 } 2259 /** 2260 * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2261 * @param event packet 2262 * @return descriptor 2263 * @note: btstack_type V 2264 */ 2265 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2266 return &event[8]; 2267 } 2268 #endif 2269 2270 #ifdef ENABLE_BLE 2271 /** 2272 * @brief Get field handle from event GATT_EVENT_MTU 2273 * @param event packet 2274 * @return handle 2275 * @note: btstack_type H 2276 */ 2277 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){ 2278 return little_endian_read_16(event, 2); 2279 } 2280 /** 2281 * @brief Get field MTU from event GATT_EVENT_MTU 2282 * @param event packet 2283 * @return MTU 2284 * @note: btstack_type 2 2285 */ 2286 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){ 2287 return little_endian_read_16(event, 4); 2288 } 2289 #endif 2290 2291 #ifdef ENABLE_BLE 2292 /** 2293 * @brief Get field handle from event GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE 2294 * @param event packet 2295 * @return handle 2296 * @note: btstack_type H 2297 */ 2298 static inline hci_con_handle_t gatt_event_can_write_without_response_get_handle(const uint8_t * event){ 2299 return little_endian_read_16(event, 2); 2300 } 2301 #endif 2302 2303 /** 2304 * @brief Get field address_type from event ATT_EVENT_CONNECTED 2305 * @param event packet 2306 * @return address_type 2307 * @note: btstack_type 1 2308 */ 2309 static inline uint8_t att_event_connected_get_address_type(const uint8_t * event){ 2310 return event[2]; 2311 } 2312 /** 2313 * @brief Get field address from event ATT_EVENT_CONNECTED 2314 * @param event packet 2315 * @param Pointer to storage for address 2316 * @note: btstack_type B 2317 */ 2318 static inline void att_event_connected_get_address(const uint8_t * event, bd_addr_t address){ 2319 reverse_bytes(&event[3], address, 6); 2320 } 2321 /** 2322 * @brief Get field handle from event ATT_EVENT_CONNECTED 2323 * @param event packet 2324 * @return handle 2325 * @note: btstack_type H 2326 */ 2327 static inline hci_con_handle_t att_event_connected_get_handle(const uint8_t * event){ 2328 return little_endian_read_16(event, 9); 2329 } 2330 2331 /** 2332 * @brief Get field handle from event ATT_EVENT_DISCONNECTED 2333 * @param event packet 2334 * @return handle 2335 * @note: btstack_type H 2336 */ 2337 static inline hci_con_handle_t att_event_disconnected_get_handle(const uint8_t * event){ 2338 return little_endian_read_16(event, 2); 2339 } 2340 2341 /** 2342 * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2343 * @param event packet 2344 * @return handle 2345 * @note: btstack_type H 2346 */ 2347 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){ 2348 return little_endian_read_16(event, 2); 2349 } 2350 /** 2351 * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2352 * @param event packet 2353 * @return MTU 2354 * @note: btstack_type 2 2355 */ 2356 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){ 2357 return little_endian_read_16(event, 4); 2358 } 2359 2360 /** 2361 * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2362 * @param event packet 2363 * @return status 2364 * @note: btstack_type 1 2365 */ 2366 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){ 2367 return event[2]; 2368 } 2369 /** 2370 * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2371 * @param event packet 2372 * @return conn_handle 2373 * @note: btstack_type H 2374 */ 2375 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){ 2376 return little_endian_read_16(event, 3); 2377 } 2378 /** 2379 * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2380 * @param event packet 2381 * @return attribute_handle 2382 * @note: btstack_type 2 2383 */ 2384 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){ 2385 return little_endian_read_16(event, 5); 2386 } 2387 2388 2389 /** 2390 * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED 2391 * @param event packet 2392 * @return status 2393 * @note: btstack_type 1 2394 */ 2395 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){ 2396 return event[2]; 2397 } 2398 /** 2399 * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED 2400 * @param event packet 2401 * @return service_uuid 2402 * @note: btstack_type 2 2403 */ 2404 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){ 2405 return little_endian_read_16(event, 3); 2406 } 2407 2408 /** 2409 * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED 2410 * @param event packet 2411 * @return status 2412 * @note: btstack_type 1 2413 */ 2414 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){ 2415 return event[2]; 2416 } 2417 /** 2418 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED 2419 * @param event packet 2420 * @return bnep_cid 2421 * @note: btstack_type 2 2422 */ 2423 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){ 2424 return little_endian_read_16(event, 3); 2425 } 2426 /** 2427 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED 2428 * @param event packet 2429 * @return source_uuid 2430 * @note: btstack_type 2 2431 */ 2432 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){ 2433 return little_endian_read_16(event, 5); 2434 } 2435 /** 2436 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED 2437 * @param event packet 2438 * @return destination_uuid 2439 * @note: btstack_type 2 2440 */ 2441 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){ 2442 return little_endian_read_16(event, 7); 2443 } 2444 /** 2445 * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED 2446 * @param event packet 2447 * @return mtu 2448 * @note: btstack_type 2 2449 */ 2450 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){ 2451 return little_endian_read_16(event, 9); 2452 } 2453 /** 2454 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED 2455 * @param event packet 2456 * @param Pointer to storage for remote_address 2457 * @note: btstack_type B 2458 */ 2459 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2460 reverse_bytes(&event[11], remote_address, 6); 2461 } 2462 /** 2463 * @brief Get field con_handle from event BNEP_EVENT_CHANNEL_OPENED 2464 * @param event packet 2465 * @return con_handle 2466 * @note: btstack_type H 2467 */ 2468 static inline hci_con_handle_t bnep_event_channel_opened_get_con_handle(const uint8_t * event){ 2469 return little_endian_read_16(event, 17); 2470 } 2471 2472 /** 2473 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED 2474 * @param event packet 2475 * @return bnep_cid 2476 * @note: btstack_type 2 2477 */ 2478 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){ 2479 return little_endian_read_16(event, 2); 2480 } 2481 /** 2482 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2483 * @param event packet 2484 * @return source_uuid 2485 * @note: btstack_type 2 2486 */ 2487 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){ 2488 return little_endian_read_16(event, 4); 2489 } 2490 /** 2491 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2492 * @param event packet 2493 * @return destination_uuid 2494 * @note: btstack_type 2 2495 */ 2496 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){ 2497 return little_endian_read_16(event, 6); 2498 } 2499 /** 2500 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED 2501 * @param event packet 2502 * @param Pointer to storage for remote_address 2503 * @note: btstack_type B 2504 */ 2505 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2506 reverse_bytes(&event[8], remote_address, 6); 2507 } 2508 2509 /** 2510 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT 2511 * @param event packet 2512 * @return bnep_cid 2513 * @note: btstack_type 2 2514 */ 2515 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){ 2516 return little_endian_read_16(event, 2); 2517 } 2518 /** 2519 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2520 * @param event packet 2521 * @return source_uuid 2522 * @note: btstack_type 2 2523 */ 2524 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){ 2525 return little_endian_read_16(event, 4); 2526 } 2527 /** 2528 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2529 * @param event packet 2530 * @return destination_uuid 2531 * @note: btstack_type 2 2532 */ 2533 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){ 2534 return little_endian_read_16(event, 6); 2535 } 2536 /** 2537 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT 2538 * @param event packet 2539 * @param Pointer to storage for remote_address 2540 * @note: btstack_type B 2541 */ 2542 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2543 reverse_bytes(&event[8], remote_address, 6); 2544 } 2545 /** 2546 * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT 2547 * @param event packet 2548 * @return channel_state 2549 * @note: btstack_type 1 2550 */ 2551 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){ 2552 return event[14]; 2553 } 2554 2555 /** 2556 * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW 2557 * @param event packet 2558 * @return bnep_cid 2559 * @note: btstack_type 2 2560 */ 2561 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){ 2562 return little_endian_read_16(event, 2); 2563 } 2564 /** 2565 * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW 2566 * @param event packet 2567 * @return source_uuid 2568 * @note: btstack_type 2 2569 */ 2570 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){ 2571 return little_endian_read_16(event, 4); 2572 } 2573 /** 2574 * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW 2575 * @param event packet 2576 * @return destination_uuid 2577 * @note: btstack_type 2 2578 */ 2579 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){ 2580 return little_endian_read_16(event, 6); 2581 } 2582 /** 2583 * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW 2584 * @param event packet 2585 * @param Pointer to storage for remote_address 2586 * @note: btstack_type B 2587 */ 2588 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2589 reverse_bytes(&event[8], remote_address, 6); 2590 } 2591 2592 #ifdef ENABLE_BLE 2593 /** 2594 * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST 2595 * @param event packet 2596 * @return handle 2597 * @note: btstack_type H 2598 */ 2599 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){ 2600 return little_endian_read_16(event, 2); 2601 } 2602 /** 2603 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST 2604 * @param event packet 2605 * @return addr_type 2606 * @note: btstack_type 1 2607 */ 2608 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){ 2609 return event[4]; 2610 } 2611 /** 2612 * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST 2613 * @param event packet 2614 * @param Pointer to storage for address 2615 * @note: btstack_type B 2616 */ 2617 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){ 2618 reverse_bytes(&event[5], address, 6); 2619 } 2620 #endif 2621 2622 #ifdef ENABLE_BLE 2623 /** 2624 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2625 * @param event packet 2626 * @return handle 2627 * @note: btstack_type H 2628 */ 2629 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){ 2630 return little_endian_read_16(event, 2); 2631 } 2632 /** 2633 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2634 * @param event packet 2635 * @return addr_type 2636 * @note: btstack_type 1 2637 */ 2638 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){ 2639 return event[4]; 2640 } 2641 /** 2642 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2643 * @param event packet 2644 * @param Pointer to storage for address 2645 * @note: btstack_type B 2646 */ 2647 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){ 2648 reverse_bytes(&event[5], address, 6); 2649 } 2650 /** 2651 * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2652 * @param event packet 2653 * @return passkey 2654 * @note: btstack_type 4 2655 */ 2656 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){ 2657 return little_endian_read_32(event, 11); 2658 } 2659 #endif 2660 2661 #ifdef ENABLE_BLE 2662 /** 2663 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2664 * @param event packet 2665 * @return handle 2666 * @note: btstack_type H 2667 */ 2668 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){ 2669 return little_endian_read_16(event, 2); 2670 } 2671 /** 2672 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2673 * @param event packet 2674 * @return addr_type 2675 * @note: btstack_type 1 2676 */ 2677 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){ 2678 return event[4]; 2679 } 2680 /** 2681 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2682 * @param event packet 2683 * @param Pointer to storage for address 2684 * @note: btstack_type B 2685 */ 2686 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2687 reverse_bytes(&event[5], address, 6); 2688 } 2689 #endif 2690 2691 #ifdef ENABLE_BLE 2692 /** 2693 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER 2694 * @param event packet 2695 * @return handle 2696 * @note: btstack_type H 2697 */ 2698 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){ 2699 return little_endian_read_16(event, 2); 2700 } 2701 /** 2702 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER 2703 * @param event packet 2704 * @return addr_type 2705 * @note: btstack_type 1 2706 */ 2707 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){ 2708 return event[4]; 2709 } 2710 /** 2711 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER 2712 * @param event packet 2713 * @param Pointer to storage for address 2714 * @note: btstack_type B 2715 */ 2716 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){ 2717 reverse_bytes(&event[5], address, 6); 2718 } 2719 #endif 2720 2721 #ifdef ENABLE_BLE 2722 /** 2723 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2724 * @param event packet 2725 * @return handle 2726 * @note: btstack_type H 2727 */ 2728 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){ 2729 return little_endian_read_16(event, 2); 2730 } 2731 /** 2732 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2733 * @param event packet 2734 * @return addr_type 2735 * @note: btstack_type 1 2736 */ 2737 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){ 2738 return event[4]; 2739 } 2740 /** 2741 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2742 * @param event packet 2743 * @param Pointer to storage for address 2744 * @note: btstack_type B 2745 */ 2746 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){ 2747 reverse_bytes(&event[5], address, 6); 2748 } 2749 /** 2750 * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2751 * @param event packet 2752 * @return passkey 2753 * @note: btstack_type 4 2754 */ 2755 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){ 2756 return little_endian_read_32(event, 11); 2757 } 2758 #endif 2759 2760 #ifdef ENABLE_BLE 2761 /** 2762 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2763 * @param event packet 2764 * @return handle 2765 * @note: btstack_type H 2766 */ 2767 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){ 2768 return little_endian_read_16(event, 2); 2769 } 2770 /** 2771 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2772 * @param event packet 2773 * @return addr_type 2774 * @note: btstack_type 1 2775 */ 2776 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){ 2777 return event[4]; 2778 } 2779 /** 2780 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2781 * @param event packet 2782 * @param Pointer to storage for address 2783 * @note: btstack_type B 2784 */ 2785 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){ 2786 reverse_bytes(&event[5], address, 6); 2787 } 2788 #endif 2789 2790 #ifdef ENABLE_BLE 2791 /** 2792 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2793 * @param event packet 2794 * @return handle 2795 * @note: btstack_type H 2796 */ 2797 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){ 2798 return little_endian_read_16(event, 2); 2799 } 2800 /** 2801 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2802 * @param event packet 2803 * @return addr_type 2804 * @note: btstack_type 1 2805 */ 2806 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){ 2807 return event[4]; 2808 } 2809 /** 2810 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2811 * @param event packet 2812 * @param Pointer to storage for address 2813 * @note: btstack_type B 2814 */ 2815 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){ 2816 reverse_bytes(&event[5], address, 6); 2817 } 2818 #endif 2819 2820 #ifdef ENABLE_BLE 2821 /** 2822 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2823 * @param event packet 2824 * @return handle 2825 * @note: btstack_type H 2826 */ 2827 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){ 2828 return little_endian_read_16(event, 2); 2829 } 2830 /** 2831 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2832 * @param event packet 2833 * @return addr_type 2834 * @note: btstack_type 1 2835 */ 2836 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){ 2837 return event[4]; 2838 } 2839 /** 2840 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2841 * @param event packet 2842 * @param Pointer to storage for address 2843 * @note: btstack_type B 2844 */ 2845 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){ 2846 reverse_bytes(&event[5], address, 6); 2847 } 2848 /** 2849 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2850 * @param event packet 2851 * @return identity_addr_type 2852 * @note: btstack_type 1 2853 */ 2854 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){ 2855 return event[11]; 2856 } 2857 /** 2858 * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2859 * @param event packet 2860 * @param Pointer to storage for identity_address 2861 * @note: btstack_type B 2862 */ 2863 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2864 reverse_bytes(&event[12], identity_address, 6); 2865 } 2866 /** 2867 * @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2868 * @param event packet 2869 * @return index 2870 * @note: btstack_type 2 2871 */ 2872 static inline uint16_t sm_event_identity_resolving_succeeded_get_index(const uint8_t * event){ 2873 return little_endian_read_16(event, 18); 2874 } 2875 #endif 2876 2877 #ifdef ENABLE_BLE 2878 /** 2879 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST 2880 * @param event packet 2881 * @return handle 2882 * @note: btstack_type H 2883 */ 2884 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){ 2885 return little_endian_read_16(event, 2); 2886 } 2887 /** 2888 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST 2889 * @param event packet 2890 * @return addr_type 2891 * @note: btstack_type 1 2892 */ 2893 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){ 2894 return event[4]; 2895 } 2896 /** 2897 * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST 2898 * @param event packet 2899 * @param Pointer to storage for address 2900 * @note: btstack_type B 2901 */ 2902 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){ 2903 reverse_bytes(&event[5], address, 6); 2904 } 2905 #endif 2906 2907 #ifdef ENABLE_BLE 2908 /** 2909 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT 2910 * @param event packet 2911 * @return handle 2912 * @note: btstack_type H 2913 */ 2914 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){ 2915 return little_endian_read_16(event, 2); 2916 } 2917 /** 2918 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT 2919 * @param event packet 2920 * @return addr_type 2921 * @note: btstack_type 1 2922 */ 2923 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){ 2924 return event[4]; 2925 } 2926 /** 2927 * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT 2928 * @param event packet 2929 * @param Pointer to storage for address 2930 * @note: btstack_type B 2931 */ 2932 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){ 2933 reverse_bytes(&event[5], address, 6); 2934 } 2935 /** 2936 * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT 2937 * @param event packet 2938 * @return authorization_result 2939 * @note: btstack_type 1 2940 */ 2941 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){ 2942 return event[11]; 2943 } 2944 #endif 2945 2946 #ifdef ENABLE_BLE 2947 /** 2948 * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION 2949 * @param event packet 2950 * @return handle 2951 * @note: btstack_type H 2952 */ 2953 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){ 2954 return little_endian_read_16(event, 2); 2955 } 2956 /** 2957 * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION 2958 * @param event packet 2959 * @return action 2960 * @note: btstack_type 1 2961 */ 2962 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){ 2963 return event[4]; 2964 } 2965 #endif 2966 2967 #ifdef ENABLE_BLE 2968 /** 2969 * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED 2970 * @param event packet 2971 * @return handle 2972 * @note: btstack_type H 2973 */ 2974 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){ 2975 return little_endian_read_16(event, 2); 2976 } 2977 /** 2978 * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED 2979 * @param event packet 2980 * @return addr_type 2981 * @note: btstack_type 1 2982 */ 2983 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){ 2984 return event[4]; 2985 } 2986 /** 2987 * @brief Get field address from event SM_EVENT_IDENTITY_CREATED 2988 * @param event packet 2989 * @param Pointer to storage for address 2990 * @note: btstack_type B 2991 */ 2992 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){ 2993 reverse_bytes(&event[5], address, 6); 2994 } 2995 /** 2996 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED 2997 * @param event packet 2998 * @return identity_addr_type 2999 * @note: btstack_type 1 3000 */ 3001 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){ 3002 return event[11]; 3003 } 3004 /** 3005 * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED 3006 * @param event packet 3007 * @param Pointer to storage for identity_address 3008 * @note: btstack_type B 3009 */ 3010 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 3011 reverse_bytes(&event[12], identity_address, 6); 3012 } 3013 /** 3014 * @brief Get field index from event SM_EVENT_IDENTITY_CREATED 3015 * @param event packet 3016 * @return index 3017 * @note: btstack_type 2 3018 */ 3019 static inline uint16_t sm_event_identity_created_get_index(const uint8_t * event){ 3020 return little_endian_read_16(event, 18); 3021 } 3022 #endif 3023 3024 #ifdef ENABLE_BLE 3025 /** 3026 * @brief Get field handle from event SM_EVENT_PAIRING_STARTED 3027 * @param event packet 3028 * @return handle 3029 * @note: btstack_type H 3030 */ 3031 static inline hci_con_handle_t sm_event_pairing_started_get_handle(const uint8_t * event){ 3032 return little_endian_read_16(event, 2); 3033 } 3034 /** 3035 * @brief Get field addr_type from event SM_EVENT_PAIRING_STARTED 3036 * @param event packet 3037 * @return addr_type 3038 * @note: btstack_type 1 3039 */ 3040 static inline uint8_t sm_event_pairing_started_get_addr_type(const uint8_t * event){ 3041 return event[4]; 3042 } 3043 /** 3044 * @brief Get field address from event SM_EVENT_PAIRING_STARTED 3045 * @param event packet 3046 * @param Pointer to storage for address 3047 * @note: btstack_type B 3048 */ 3049 static inline void sm_event_pairing_started_get_address(const uint8_t * event, bd_addr_t address){ 3050 reverse_bytes(&event[5], address, 6); 3051 } 3052 #endif 3053 3054 #ifdef ENABLE_BLE 3055 /** 3056 * @brief Get field handle from event SM_EVENT_PAIRING_COMPLETE 3057 * @param event packet 3058 * @return handle 3059 * @note: btstack_type H 3060 */ 3061 static inline hci_con_handle_t sm_event_pairing_complete_get_handle(const uint8_t * event){ 3062 return little_endian_read_16(event, 2); 3063 } 3064 /** 3065 * @brief Get field addr_type from event SM_EVENT_PAIRING_COMPLETE 3066 * @param event packet 3067 * @return addr_type 3068 * @note: btstack_type 1 3069 */ 3070 static inline uint8_t sm_event_pairing_complete_get_addr_type(const uint8_t * event){ 3071 return event[4]; 3072 } 3073 /** 3074 * @brief Get field address from event SM_EVENT_PAIRING_COMPLETE 3075 * @param event packet 3076 * @param Pointer to storage for address 3077 * @note: btstack_type B 3078 */ 3079 static inline void sm_event_pairing_complete_get_address(const uint8_t * event, bd_addr_t address){ 3080 reverse_bytes(&event[5], address, 6); 3081 } 3082 /** 3083 * @brief Get field status from event SM_EVENT_PAIRING_COMPLETE 3084 * @param event packet 3085 * @return status 3086 * @note: btstack_type 1 3087 */ 3088 static inline uint8_t sm_event_pairing_complete_get_status(const uint8_t * event){ 3089 return event[11]; 3090 } 3091 /** 3092 * @brief Get field reason from event SM_EVENT_PAIRING_COMPLETE 3093 * @param event packet 3094 * @return reason 3095 * @note: btstack_type 1 3096 */ 3097 static inline uint8_t sm_event_pairing_complete_get_reason(const uint8_t * event){ 3098 return event[12]; 3099 } 3100 #endif 3101 3102 #ifdef ENABLE_BLE 3103 /** 3104 * @brief Get field handle from event SM_EVENT_REENCRYPTION_STARTED 3105 * @param event packet 3106 * @return handle 3107 * @note: btstack_type H 3108 */ 3109 static inline hci_con_handle_t sm_event_reencryption_started_get_handle(const uint8_t * event){ 3110 return little_endian_read_16(event, 2); 3111 } 3112 /** 3113 * @brief Get field addr_type from event SM_EVENT_REENCRYPTION_STARTED 3114 * @param event packet 3115 * @return addr_type 3116 * @note: btstack_type 1 3117 */ 3118 static inline uint8_t sm_event_reencryption_started_get_addr_type(const uint8_t * event){ 3119 return event[4]; 3120 } 3121 /** 3122 * @brief Get field address from event SM_EVENT_REENCRYPTION_STARTED 3123 * @param event packet 3124 * @param Pointer to storage for address 3125 * @note: btstack_type B 3126 */ 3127 static inline void sm_event_reencryption_started_get_address(const uint8_t * event, bd_addr_t address){ 3128 reverse_bytes(&event[5], address, 6); 3129 } 3130 #endif 3131 3132 #ifdef ENABLE_BLE 3133 /** 3134 * @brief Get field handle from event SM_EVENT_REENCRYPTION_COMPLETE 3135 * @param event packet 3136 * @return handle 3137 * @note: btstack_type H 3138 */ 3139 static inline hci_con_handle_t sm_event_reencryption_complete_get_handle(const uint8_t * event){ 3140 return little_endian_read_16(event, 2); 3141 } 3142 /** 3143 * @brief Get field addr_type from event SM_EVENT_REENCRYPTION_COMPLETE 3144 * @param event packet 3145 * @return addr_type 3146 * @note: btstack_type 1 3147 */ 3148 static inline uint8_t sm_event_reencryption_complete_get_addr_type(const uint8_t * event){ 3149 return event[4]; 3150 } 3151 /** 3152 * @brief Get field address from event SM_EVENT_REENCRYPTION_COMPLETE 3153 * @param event packet 3154 * @param Pointer to storage for address 3155 * @note: btstack_type B 3156 */ 3157 static inline void sm_event_reencryption_complete_get_address(const uint8_t * event, bd_addr_t address){ 3158 reverse_bytes(&event[5], address, 6); 3159 } 3160 /** 3161 * @brief Get field status from event SM_EVENT_REENCRYPTION_COMPLETE 3162 * @param event packet 3163 * @return status 3164 * @note: btstack_type 1 3165 */ 3166 static inline uint8_t sm_event_reencryption_complete_get_status(const uint8_t * event){ 3167 return event[11]; 3168 } 3169 #endif 3170 3171 /** 3172 * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL 3173 * @param event packet 3174 * @return handle 3175 * @note: btstack_type H 3176 */ 3177 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){ 3178 return little_endian_read_16(event, 2); 3179 } 3180 /** 3181 * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL 3182 * @param event packet 3183 * @return security_level 3184 * @note: btstack_type 1 3185 */ 3186 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){ 3187 return event[4]; 3188 } 3189 3190 /** 3191 * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 3192 * @param event packet 3193 * @return status 3194 * @note: btstack_type 1 3195 */ 3196 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){ 3197 return event[2]; 3198 } 3199 /** 3200 * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 3201 * @param event packet 3202 * @param Pointer to storage for address 3203 * @note: btstack_type B 3204 */ 3205 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){ 3206 reverse_bytes(&event[3], address, 6); 3207 } 3208 3209 /** 3210 * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT 3211 * @param event packet 3212 * @return advertising_event_type 3213 * @note: btstack_type 1 3214 */ 3215 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){ 3216 return event[2]; 3217 } 3218 /** 3219 * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT 3220 * @param event packet 3221 * @return address_type 3222 * @note: btstack_type 1 3223 */ 3224 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){ 3225 return event[3]; 3226 } 3227 /** 3228 * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT 3229 * @param event packet 3230 * @param Pointer to storage for address 3231 * @note: btstack_type B 3232 */ 3233 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){ 3234 reverse_bytes(&event[4], address, 6); 3235 } 3236 /** 3237 * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT 3238 * @param event packet 3239 * @return rssi 3240 * @note: btstack_type 1 3241 */ 3242 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){ 3243 return event[10]; 3244 } 3245 /** 3246 * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT 3247 * @param event packet 3248 * @return data_length 3249 * @note: btstack_type J 3250 */ 3251 static inline uint8_t gap_event_advertising_report_get_data_length(const uint8_t * event){ 3252 return event[11]; 3253 } 3254 /** 3255 * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT 3256 * @param event packet 3257 * @return data 3258 * @note: btstack_type V 3259 */ 3260 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){ 3261 return &event[12]; 3262 } 3263 3264 /** 3265 * @brief Get field bd_addr from event GAP_EVENT_INQUIRY_RESULT 3266 * @param event packet 3267 * @param Pointer to storage for bd_addr 3268 * @note: btstack_type B 3269 */ 3270 static inline void gap_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3271 reverse_bytes(&event[2], bd_addr, 6); 3272 } 3273 /** 3274 * @brief Get field page_scan_repetition_mode from event GAP_EVENT_INQUIRY_RESULT 3275 * @param event packet 3276 * @return page_scan_repetition_mode 3277 * @note: btstack_type 1 3278 */ 3279 static inline uint8_t gap_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 3280 return event[8]; 3281 } 3282 /** 3283 * @brief Get field class_of_device from event GAP_EVENT_INQUIRY_RESULT 3284 * @param event packet 3285 * @return class_of_device 3286 * @note: btstack_type 3 3287 */ 3288 static inline uint32_t gap_event_inquiry_result_get_class_of_device(const uint8_t * event){ 3289 return little_endian_read_24(event, 9); 3290 } 3291 /** 3292 * @brief Get field clock_offset from event GAP_EVENT_INQUIRY_RESULT 3293 * @param event packet 3294 * @return clock_offset 3295 * @note: btstack_type 2 3296 */ 3297 static inline uint16_t gap_event_inquiry_result_get_clock_offset(const uint8_t * event){ 3298 return little_endian_read_16(event, 12); 3299 } 3300 /** 3301 * @brief Get field rssi_available from event GAP_EVENT_INQUIRY_RESULT 3302 * @param event packet 3303 * @return rssi_available 3304 * @note: btstack_type 1 3305 */ 3306 static inline uint8_t gap_event_inquiry_result_get_rssi_available(const uint8_t * event){ 3307 return event[14]; 3308 } 3309 /** 3310 * @brief Get field rssi from event GAP_EVENT_INQUIRY_RESULT 3311 * @param event packet 3312 * @return rssi 3313 * @note: btstack_type 1 3314 */ 3315 static inline uint8_t gap_event_inquiry_result_get_rssi(const uint8_t * event){ 3316 return event[15]; 3317 } 3318 /** 3319 * @brief Get field name_available from event GAP_EVENT_INQUIRY_RESULT 3320 * @param event packet 3321 * @return name_available 3322 * @note: btstack_type 1 3323 */ 3324 static inline uint8_t gap_event_inquiry_result_get_name_available(const uint8_t * event){ 3325 return event[16]; 3326 } 3327 /** 3328 * @brief Get field name_len from event GAP_EVENT_INQUIRY_RESULT 3329 * @param event packet 3330 * @return name_len 3331 * @note: btstack_type J 3332 */ 3333 static inline uint8_t gap_event_inquiry_result_get_name_len(const uint8_t * event){ 3334 return event[17]; 3335 } 3336 /** 3337 * @brief Get field name from event GAP_EVENT_INQUIRY_RESULT 3338 * @param event packet 3339 * @return name 3340 * @note: btstack_type V 3341 */ 3342 static inline const uint8_t * gap_event_inquiry_result_get_name(const uint8_t * event){ 3343 return &event[18]; 3344 } 3345 3346 /** 3347 * @brief Get field status from event GAP_EVENT_INQUIRY_COMPLETE 3348 * @param event packet 3349 * @return status 3350 * @note: btstack_type 1 3351 */ 3352 static inline uint8_t gap_event_inquiry_complete_get_status(const uint8_t * event){ 3353 return event[2]; 3354 } 3355 3356 /** 3357 * @brief Get field con_handle from event GAP_EVENT_RSSI_MEASUREMENT 3358 * @param event packet 3359 * @return con_handle 3360 * @note: btstack_type H 3361 */ 3362 static inline hci_con_handle_t gap_event_rssi_measurement_get_con_handle(const uint8_t * event){ 3363 return little_endian_read_16(event, 2); 3364 } 3365 /** 3366 * @brief Get field rssi from event GAP_EVENT_RSSI_MEASUREMENT 3367 * @param event packet 3368 * @return rssi 3369 * @note: btstack_type 1 3370 */ 3371 static inline uint8_t gap_event_rssi_measurement_get_rssi(const uint8_t * event){ 3372 return event[4]; 3373 } 3374 3375 /** 3376 * @brief Get field oob_data_present from event GAP_EVENT_LOCAL_OOB_DATA 3377 * @param event packet 3378 * @return oob_data_present 3379 * @note: btstack_type 1 3380 */ 3381 static inline uint8_t gap_event_local_oob_data_get_oob_data_present(const uint8_t * event){ 3382 return event[2]; 3383 } 3384 /** 3385 * @brief Get field c_192 from event GAP_EVENT_LOCAL_OOB_DATA 3386 * @param event packet 3387 * @param Pointer to storage for c_192 3388 * @note: btstack_type K 3389 */ 3390 static inline void gap_event_local_oob_data_get_c_192(const uint8_t * event, uint8_t * c_192){ 3391 reverse_bytes(&event[3], c_192, 16); 3392 } 3393 /** 3394 * @brief Get field r_192 from event GAP_EVENT_LOCAL_OOB_DATA 3395 * @param event packet 3396 * @param Pointer to storage for r_192 3397 * @note: btstack_type K 3398 */ 3399 static inline void gap_event_local_oob_data_get_r_192(const uint8_t * event, uint8_t * r_192){ 3400 reverse_bytes(&event[19], r_192, 16); 3401 } 3402 /** 3403 * @brief Get field c_256 from event GAP_EVENT_LOCAL_OOB_DATA 3404 * @param event packet 3405 * @param Pointer to storage for c_256 3406 * @note: btstack_type K 3407 */ 3408 static inline void gap_event_local_oob_data_get_c_256(const uint8_t * event, uint8_t * c_256){ 3409 reverse_bytes(&event[35], c_256, 16); 3410 } 3411 /** 3412 * @brief Get field r_256 from event GAP_EVENT_LOCAL_OOB_DATA 3413 * @param event packet 3414 * @param Pointer to storage for r_256 3415 * @note: btstack_type K 3416 */ 3417 static inline void gap_event_local_oob_data_get_r_256(const uint8_t * event, uint8_t * r_256){ 3418 reverse_bytes(&event[51], r_256, 16); 3419 } 3420 3421 /** 3422 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3423 * @param event packet 3424 * @return status 3425 * @note: btstack_type 1 3426 */ 3427 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){ 3428 return event[3]; 3429 } 3430 /** 3431 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3432 * @param event packet 3433 * @return connection_handle 3434 * @note: btstack_type H 3435 */ 3436 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){ 3437 return little_endian_read_16(event, 4); 3438 } 3439 /** 3440 * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3441 * @param event packet 3442 * @return role 3443 * @note: btstack_type 1 3444 */ 3445 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){ 3446 return event[6]; 3447 } 3448 /** 3449 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3450 * @param event packet 3451 * @return peer_address_type 3452 * @note: btstack_type 1 3453 */ 3454 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){ 3455 return event[7]; 3456 } 3457 /** 3458 * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3459 * @param event packet 3460 * @param Pointer to storage for peer_address 3461 * @note: btstack_type B 3462 */ 3463 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){ 3464 reverse_bytes(&event[8], peer_address, 6); 3465 } 3466 /** 3467 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3468 * @param event packet 3469 * @return conn_interval 3470 * @note: btstack_type 2 3471 */ 3472 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){ 3473 return little_endian_read_16(event, 14); 3474 } 3475 /** 3476 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3477 * @param event packet 3478 * @return conn_latency 3479 * @note: btstack_type 2 3480 */ 3481 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){ 3482 return little_endian_read_16(event, 16); 3483 } 3484 /** 3485 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3486 * @param event packet 3487 * @return supervision_timeout 3488 * @note: btstack_type 2 3489 */ 3490 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){ 3491 return little_endian_read_16(event, 18); 3492 } 3493 /** 3494 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3495 * @param event packet 3496 * @return master_clock_accuracy 3497 * @note: btstack_type 1 3498 */ 3499 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3500 return event[20]; 3501 } 3502 3503 /** 3504 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3505 * @param event packet 3506 * @return status 3507 * @note: btstack_type 1 3508 */ 3509 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){ 3510 return event[3]; 3511 } 3512 /** 3513 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3514 * @param event packet 3515 * @return connection_handle 3516 * @note: btstack_type H 3517 */ 3518 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){ 3519 return little_endian_read_16(event, 4); 3520 } 3521 /** 3522 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3523 * @param event packet 3524 * @return conn_interval 3525 * @note: btstack_type 2 3526 */ 3527 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){ 3528 return little_endian_read_16(event, 6); 3529 } 3530 /** 3531 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3532 * @param event packet 3533 * @return conn_latency 3534 * @note: btstack_type 2 3535 */ 3536 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){ 3537 return little_endian_read_16(event, 8); 3538 } 3539 /** 3540 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3541 * @param event packet 3542 * @return supervision_timeout 3543 * @note: btstack_type 2 3544 */ 3545 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){ 3546 return little_endian_read_16(event, 10); 3547 } 3548 3549 /** 3550 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3551 * @param event packet 3552 * @return connection_handle 3553 * @note: btstack_type H 3554 */ 3555 static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){ 3556 return little_endian_read_16(event, 3); 3557 } 3558 /** 3559 * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3560 * @param event packet 3561 * @return random_number 3562 * @note: btstack_type D 3563 */ 3564 static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){ 3565 return (const uint8_t *) &event[5]; 3566 } 3567 /** 3568 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3569 * @param event packet 3570 * @return encryption_diversifier 3571 * @note: btstack_type 2 3572 */ 3573 static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){ 3574 return little_endian_read_16(event, 13); 3575 } 3576 3577 /** 3578 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3579 * @param event packet 3580 * @return connection_handle 3581 * @note: btstack_type H 3582 */ 3583 static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){ 3584 return little_endian_read_16(event, 3); 3585 } 3586 /** 3587 * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3588 * @param event packet 3589 * @return random_number 3590 * @note: btstack_type D 3591 */ 3592 static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){ 3593 return (const uint8_t *) &event[5]; 3594 } 3595 /** 3596 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3597 * @param event packet 3598 * @return encryption_diversifier 3599 * @note: btstack_type 2 3600 */ 3601 static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){ 3602 return little_endian_read_16(event, 13); 3603 } 3604 3605 /** 3606 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3607 * @param event packet 3608 * @return connection_handle 3609 * @note: btstack_type H 3610 */ 3611 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){ 3612 return little_endian_read_16(event, 3); 3613 } 3614 /** 3615 * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3616 * @param event packet 3617 * @return interval_min 3618 * @note: btstack_type 2 3619 */ 3620 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){ 3621 return little_endian_read_16(event, 5); 3622 } 3623 /** 3624 * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3625 * @param event packet 3626 * @return interval_max 3627 * @note: btstack_type 2 3628 */ 3629 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){ 3630 return little_endian_read_16(event, 7); 3631 } 3632 /** 3633 * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3634 * @param event packet 3635 * @return latency 3636 * @note: btstack_type 2 3637 */ 3638 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){ 3639 return little_endian_read_16(event, 9); 3640 } 3641 /** 3642 * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3643 * @param event packet 3644 * @return timeout 3645 * @note: btstack_type 2 3646 */ 3647 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){ 3648 return little_endian_read_16(event, 11); 3649 } 3650 3651 /** 3652 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3653 * @param event packet 3654 * @return connection_handle 3655 * @note: btstack_type H 3656 */ 3657 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){ 3658 return little_endian_read_16(event, 3); 3659 } 3660 /** 3661 * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3662 * @param event packet 3663 * @return max_tx_octets 3664 * @note: btstack_type 2 3665 */ 3666 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){ 3667 return little_endian_read_16(event, 5); 3668 } 3669 /** 3670 * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3671 * @param event packet 3672 * @return max_tx_time 3673 * @note: btstack_type 2 3674 */ 3675 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){ 3676 return little_endian_read_16(event, 7); 3677 } 3678 /** 3679 * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3680 * @param event packet 3681 * @return max_rx_octets 3682 * @note: btstack_type 2 3683 */ 3684 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){ 3685 return little_endian_read_16(event, 9); 3686 } 3687 /** 3688 * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3689 * @param event packet 3690 * @return max_rx_time 3691 * @note: btstack_type 2 3692 */ 3693 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){ 3694 return little_endian_read_16(event, 11); 3695 } 3696 3697 /** 3698 * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3699 * @param event packet 3700 * @return status 3701 * @note: btstack_type 1 3702 */ 3703 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){ 3704 return event[3]; 3705 } 3706 /** 3707 * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3708 * @param event packet 3709 * @param Pointer to storage for dhkey_x 3710 * @note: btstack_type Q 3711 */ 3712 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){ 3713 reverse_bytes(&event[4], dhkey_x, 32); 3714 } 3715 /** 3716 * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3717 * @param event packet 3718 * @param Pointer to storage for dhkey_y 3719 * @note: btstack_type Q 3720 */ 3721 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){ 3722 reverse_bytes(&event[36], dhkey_y, 32); 3723 } 3724 3725 /** 3726 * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3727 * @param event packet 3728 * @return status 3729 * @note: btstack_type 1 3730 */ 3731 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){ 3732 return event[3]; 3733 } 3734 /** 3735 * @brief Get field dhkey from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3736 * @param event packet 3737 * @param Pointer to storage for dhkey 3738 * @note: btstack_type Q 3739 */ 3740 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey(const uint8_t * event, uint8_t * dhkey){ 3741 reverse_bytes(&event[4], dhkey, 32); 3742 } 3743 3744 /** 3745 * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3746 * @param event packet 3747 * @return status 3748 * @note: btstack_type 1 3749 */ 3750 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){ 3751 return event[3]; 3752 } 3753 /** 3754 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3755 * @param event packet 3756 * @return connection_handle 3757 * @note: btstack_type H 3758 */ 3759 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){ 3760 return little_endian_read_16(event, 4); 3761 } 3762 /** 3763 * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3764 * @param event packet 3765 * @return role 3766 * @note: btstack_type 1 3767 */ 3768 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){ 3769 return event[6]; 3770 } 3771 /** 3772 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3773 * @param event packet 3774 * @return peer_address_type 3775 * @note: btstack_type 1 3776 */ 3777 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){ 3778 return event[7]; 3779 } 3780 /** 3781 * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3782 * @param event packet 3783 * @param Pointer to storage for perr_addresss 3784 * @note: btstack_type B 3785 */ 3786 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){ 3787 reverse_bytes(&event[8], perr_addresss, 6); 3788 } 3789 /** 3790 * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3791 * @param event packet 3792 * @param Pointer to storage for local_resolvable_private_addres 3793 * @note: btstack_type B 3794 */ 3795 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){ 3796 reverse_bytes(&event[14], local_resolvable_private_addres, 6); 3797 } 3798 /** 3799 * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3800 * @param event packet 3801 * @param Pointer to storage for peer_resolvable_private_addres 3802 * @note: btstack_type B 3803 */ 3804 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){ 3805 reverse_bytes(&event[20], peer_resolvable_private_addres, 6); 3806 } 3807 /** 3808 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3809 * @param event packet 3810 * @return conn_interval 3811 * @note: btstack_type 2 3812 */ 3813 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){ 3814 return little_endian_read_16(event, 26); 3815 } 3816 /** 3817 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3818 * @param event packet 3819 * @return conn_latency 3820 * @note: btstack_type 2 3821 */ 3822 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){ 3823 return little_endian_read_16(event, 28); 3824 } 3825 /** 3826 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3827 * @param event packet 3828 * @return supervision_timeout 3829 * @note: btstack_type 2 3830 */ 3831 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){ 3832 return little_endian_read_16(event, 30); 3833 } 3834 /** 3835 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3836 * @param event packet 3837 * @return master_clock_accuracy 3838 * @note: btstack_type 1 3839 */ 3840 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3841 return event[32]; 3842 } 3843 3844 /** 3845 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 3846 * @param event packet 3847 * @return status 3848 * @note: btstack_type 1 3849 */ 3850 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){ 3851 return event[3]; 3852 } 3853 3854 /** 3855 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 3856 * @param event packet 3857 * @return status 3858 * @note: btstack_type 1 3859 */ 3860 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){ 3861 return event[3]; 3862 } 3863 3864 /** 3865 * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3866 * @param event packet 3867 * @return status 3868 * @note: btstack_type 1 3869 */ 3870 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){ 3871 return event[3]; 3872 } 3873 /** 3874 * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3875 * @param event packet 3876 * @return handle 3877 * @note: btstack_type H 3878 */ 3879 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){ 3880 return little_endian_read_16(event, 4); 3881 } 3882 3883 /** 3884 * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 3885 * @param event packet 3886 * @return status 3887 * @note: btstack_type 1 3888 */ 3889 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){ 3890 return event[3]; 3891 } 3892 3893 3894 /** 3895 * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 3896 * @param event packet 3897 * @return gain 3898 * @note: btstack_type 1 3899 */ 3900 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){ 3901 return event[3]; 3902 } 3903 3904 /** 3905 * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 3906 * @param event packet 3907 * @return gain 3908 * @note: btstack_type 1 3909 */ 3910 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){ 3911 return event[3]; 3912 } 3913 3914 /** 3915 * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND 3916 * @param event packet 3917 * @return value_length 3918 * @note: btstack_type J 3919 */ 3920 static inline uint8_t hsp_subevent_hs_command_get_value_length(const uint8_t * event){ 3921 return event[3]; 3922 } 3923 /** 3924 * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND 3925 * @param event packet 3926 * @return value 3927 * @note: btstack_type V 3928 */ 3929 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){ 3930 return &event[4]; 3931 } 3932 3933 /** 3934 * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION 3935 * @param event packet 3936 * @return value_length 3937 * @note: btstack_type J 3938 */ 3939 static inline uint8_t hsp_subevent_ag_indication_get_value_length(const uint8_t * event){ 3940 return event[3]; 3941 } 3942 /** 3943 * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION 3944 * @param event packet 3945 * @return value 3946 * @note: btstack_type V 3947 */ 3948 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){ 3949 return &event[4]; 3950 } 3951 3952 /** 3953 * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3954 * @param event packet 3955 * @return status 3956 * @note: btstack_type 1 3957 */ 3958 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){ 3959 return event[3]; 3960 } 3961 /** 3962 * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3963 * @param event packet 3964 * @return con_handle 3965 * @note: btstack_type H 3966 */ 3967 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){ 3968 return little_endian_read_16(event, 4); 3969 } 3970 /** 3971 * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3972 * @param event packet 3973 * @param Pointer to storage for bd_addr 3974 * @note: btstack_type B 3975 */ 3976 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3977 reverse_bytes(&event[6], bd_addr, 6); 3978 } 3979 3980 3981 /** 3982 * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3983 * @param event packet 3984 * @return status 3985 * @note: btstack_type 1 3986 */ 3987 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ 3988 return event[3]; 3989 } 3990 /** 3991 * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3992 * @param event packet 3993 * @return handle 3994 * @note: btstack_type H 3995 */ 3996 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){ 3997 return little_endian_read_16(event, 4); 3998 } 3999 /** 4000 * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4001 * @param event packet 4002 * @param Pointer to storage for bd_addr 4003 * @note: btstack_type B 4004 */ 4005 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4006 reverse_bytes(&event[6], bd_addr, 6); 4007 } 4008 /** 4009 * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4010 * @param event packet 4011 * @return negotiated_codec 4012 * @note: btstack_type 1 4013 */ 4014 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){ 4015 return event[12]; 4016 } 4017 4018 4019 /** 4020 * @brief Get field status from event HFP_SUBEVENT_COMPLETE 4021 * @param event packet 4022 * @return status 4023 * @note: btstack_type 1 4024 */ 4025 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){ 4026 return event[3]; 4027 } 4028 4029 /** 4030 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4031 * @param event packet 4032 * @return indicator_index 4033 * @note: btstack_type 1 4034 */ 4035 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){ 4036 return event[3]; 4037 } 4038 /** 4039 * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4040 * @param event packet 4041 * @return indicator_status 4042 * @note: btstack_type 1 4043 */ 4044 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){ 4045 return event[4]; 4046 } 4047 /** 4048 * @brief Get field indicator_min_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4049 * @param event packet 4050 * @return indicator_min_range 4051 * @note: btstack_type 1 4052 */ 4053 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_min_range(const uint8_t * event){ 4054 return event[5]; 4055 } 4056 /** 4057 * @brief Get field indicator_max_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4058 * @param event packet 4059 * @return indicator_max_range 4060 * @note: btstack_type 1 4061 */ 4062 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_max_range(const uint8_t * event){ 4063 return event[6]; 4064 } 4065 /** 4066 * @brief Get field indicator_mandatory from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4067 * @param event packet 4068 * @return indicator_mandatory 4069 * @note: btstack_type 1 4070 */ 4071 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_mandatory(const uint8_t * event){ 4072 return event[7]; 4073 } 4074 /** 4075 * @brief Get field indicator_enabled from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4076 * @param event packet 4077 * @return indicator_enabled 4078 * @note: btstack_type 1 4079 */ 4080 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_enabled(const uint8_t * event){ 4081 return event[8]; 4082 } 4083 /** 4084 * @brief Get field indicator_status_changed from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4085 * @param event packet 4086 * @return indicator_status_changed 4087 * @note: btstack_type 1 4088 */ 4089 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status_changed(const uint8_t * event){ 4090 return event[9]; 4091 } 4092 /** 4093 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4094 * @param event packet 4095 * @return indicator_name 4096 * @note: btstack_type T 4097 */ 4098 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){ 4099 return (const char *) &event[10]; 4100 } 4101 4102 /** 4103 * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4104 * @param event packet 4105 * @return network_operator_mode 4106 * @note: btstack_type 1 4107 */ 4108 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){ 4109 return event[3]; 4110 } 4111 /** 4112 * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4113 * @param event packet 4114 * @return network_operator_format 4115 * @note: btstack_type 1 4116 */ 4117 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){ 4118 return event[4]; 4119 } 4120 /** 4121 * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4122 * @param event packet 4123 * @return network_operator_name 4124 * @note: btstack_type T 4125 */ 4126 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){ 4127 return (const char *) &event[5]; 4128 } 4129 4130 /** 4131 * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 4132 * @param event packet 4133 * @return error 4134 * @note: btstack_type 1 4135 */ 4136 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){ 4137 return event[3]; 4138 } 4139 4140 4141 4142 4143 /** 4144 * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 4145 * @param event packet 4146 * @return number 4147 * @note: btstack_type T 4148 */ 4149 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){ 4150 return (const char *) &event[3]; 4151 } 4152 4153 4154 /** 4155 * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 4156 * @param event packet 4157 * @return number 4158 * @note: btstack_type T 4159 */ 4160 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){ 4161 return (const char *) &event[3]; 4162 } 4163 4164 /** 4165 * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 4166 * @param event packet 4167 * @return dtmf 4168 * @note: btstack_type T 4169 */ 4170 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){ 4171 return (const char *) &event[3]; 4172 } 4173 4174 4175 4176 4177 /** 4178 * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME 4179 * @param event packet 4180 * @return gain 4181 * @note: btstack_type 1 4182 */ 4183 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){ 4184 return event[3]; 4185 } 4186 4187 /** 4188 * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME 4189 * @param event packet 4190 * @return gain 4191 * @note: btstack_type 1 4192 */ 4193 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){ 4194 return event[3]; 4195 } 4196 4197 /** 4198 * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4199 * @param event packet 4200 * @return type 4201 * @note: btstack_type 1 4202 */ 4203 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){ 4204 return event[3]; 4205 } 4206 /** 4207 * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4208 * @param event packet 4209 * @return number 4210 * @note: btstack_type T 4211 */ 4212 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){ 4213 return (const char *) &event[4]; 4214 } 4215 4216 /** 4217 * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4218 * @param event packet 4219 * @return type 4220 * @note: btstack_type 1 4221 */ 4222 static inline uint8_t hfp_subevent_calling_line_identification_notification_get_type(const uint8_t * event){ 4223 return event[3]; 4224 } 4225 /** 4226 * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4227 * @param event packet 4228 * @return number 4229 * @note: btstack_type T 4230 */ 4231 static inline const char * hfp_subevent_calling_line_identification_notification_get_number(const uint8_t * event){ 4232 return (const char *) &event[4]; 4233 } 4234 4235 /** 4236 * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4237 * @param event packet 4238 * @return clcc_idx 4239 * @note: btstack_type 1 4240 */ 4241 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){ 4242 return event[3]; 4243 } 4244 /** 4245 * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4246 * @param event packet 4247 * @return clcc_dir 4248 * @note: btstack_type 1 4249 */ 4250 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){ 4251 return event[4]; 4252 } 4253 /** 4254 * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4255 * @param event packet 4256 * @return clcc_status 4257 * @note: btstack_type 1 4258 */ 4259 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){ 4260 return event[5]; 4261 } 4262 /** 4263 * @brief Get field clcc_mode from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4264 * @param event packet 4265 * @return clcc_mode 4266 * @note: btstack_type 1 4267 */ 4268 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mode(const uint8_t * event){ 4269 return event[6]; 4270 } 4271 /** 4272 * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4273 * @param event packet 4274 * @return clcc_mpty 4275 * @note: btstack_type 1 4276 */ 4277 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 4278 return event[7]; 4279 } 4280 /** 4281 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4282 * @param event packet 4283 * @return bnip_type 4284 * @note: btstack_type 1 4285 */ 4286 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 4287 return event[8]; 4288 } 4289 /** 4290 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4291 * @param event packet 4292 * @return bnip_number 4293 * @note: btstack_type T 4294 */ 4295 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 4296 return (const char *) &event[9]; 4297 } 4298 4299 /** 4300 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4301 * @param event packet 4302 * @return status 4303 * @note: btstack_type 1 4304 */ 4305 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 4306 return event[3]; 4307 } 4308 /** 4309 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4310 * @param event packet 4311 * @return bnip_type 4312 * @note: btstack_type 1 4313 */ 4314 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 4315 return event[4]; 4316 } 4317 /** 4318 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4319 * @param event packet 4320 * @return bnip_number 4321 * @note: btstack_type T 4322 */ 4323 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 4324 return (const char *) &event[5]; 4325 } 4326 4327 /** 4328 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 4329 * @param event packet 4330 * @return value 4331 * @note: btstack_type T 4332 */ 4333 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 4334 return (const char *) &event[3]; 4335 } 4336 4337 /** 4338 * @brief Get field command from event HFP_SUBEVENT_AT_MESSAGE_SENT 4339 * @param event packet 4340 * @return command 4341 * @note: btstack_type T 4342 */ 4343 static inline const char * hfp_subevent_at_message_sent_get_command(const uint8_t * event){ 4344 return (const char *) &event[3]; 4345 } 4346 4347 /** 4348 * @brief Get field command from event HFP_SUBEVENT_AT_MESSAGE_RECEIVED 4349 * @param event packet 4350 * @return command 4351 * @note: btstack_type T 4352 */ 4353 static inline const char * hfp_subevent_at_message_received_get_command(const uint8_t * event){ 4354 return (const char *) &event[3]; 4355 } 4356 4357 #ifdef ENABLE_BLE 4358 /** 4359 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 4360 * @param event packet 4361 * @return handle 4362 * @note: btstack_type H 4363 */ 4364 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 4365 return little_endian_read_16(event, 3); 4366 } 4367 #endif 4368 4369 #ifdef ENABLE_BLE 4370 /** 4371 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4372 * @param event packet 4373 * @return handle 4374 * @note: btstack_type H 4375 */ 4376 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 4377 return little_endian_read_16(event, 3); 4378 } 4379 /** 4380 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4381 * @param event packet 4382 * @return attribute_id 4383 * @note: btstack_type 2 4384 */ 4385 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 4386 return little_endian_read_16(event, 5); 4387 } 4388 /** 4389 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4390 * @param event packet 4391 * @return text 4392 * @note: btstack_type T 4393 */ 4394 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 4395 return (const char *) &event[7]; 4396 } 4397 #endif 4398 4399 #ifdef ENABLE_BLE 4400 /** 4401 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 4402 * @param event packet 4403 * @return handle 4404 * @note: btstack_type H 4405 */ 4406 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 4407 return little_endian_read_16(event, 3); 4408 } 4409 #endif 4410 4411 /** 4412 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4413 * @param event packet 4414 * @return avdtp_cid 4415 * @note: btstack_type 2 4416 */ 4417 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 4418 return little_endian_read_16(event, 3); 4419 } 4420 /** 4421 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4422 * @param event packet 4423 * @return local_seid 4424 * @note: btstack_type 1 4425 */ 4426 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 4427 return event[5]; 4428 } 4429 /** 4430 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4431 * @param event packet 4432 * @return is_initiator 4433 * @note: btstack_type 1 4434 */ 4435 static inline uint8_t avdtp_subevent_signaling_accept_get_is_initiator(const uint8_t * event){ 4436 return event[6]; 4437 } 4438 /** 4439 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4440 * @param event packet 4441 * @return signal_identifier 4442 * @note: btstack_type 1 4443 */ 4444 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 4445 return event[7]; 4446 } 4447 4448 /** 4449 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4450 * @param event packet 4451 * @return avdtp_cid 4452 * @note: btstack_type 2 4453 */ 4454 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 4455 return little_endian_read_16(event, 3); 4456 } 4457 /** 4458 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4459 * @param event packet 4460 * @return local_seid 4461 * @note: btstack_type 1 4462 */ 4463 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 4464 return event[5]; 4465 } 4466 /** 4467 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_REJECT 4468 * @param event packet 4469 * @return is_initiator 4470 * @note: btstack_type 1 4471 */ 4472 static inline uint8_t avdtp_subevent_signaling_reject_get_is_initiator(const uint8_t * event){ 4473 return event[6]; 4474 } 4475 /** 4476 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 4477 * @param event packet 4478 * @return signal_identifier 4479 * @note: btstack_type 1 4480 */ 4481 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 4482 return event[7]; 4483 } 4484 4485 /** 4486 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4487 * @param event packet 4488 * @return avdtp_cid 4489 * @note: btstack_type 2 4490 */ 4491 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 4492 return little_endian_read_16(event, 3); 4493 } 4494 /** 4495 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4496 * @param event packet 4497 * @return local_seid 4498 * @note: btstack_type 1 4499 */ 4500 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 4501 return event[5]; 4502 } 4503 /** 4504 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4505 * @param event packet 4506 * @return is_initiator 4507 * @note: btstack_type 1 4508 */ 4509 static inline uint8_t avdtp_subevent_signaling_general_reject_get_is_initiator(const uint8_t * event){ 4510 return event[6]; 4511 } 4512 /** 4513 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4514 * @param event packet 4515 * @return signal_identifier 4516 * @note: btstack_type 1 4517 */ 4518 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 4519 return event[7]; 4520 } 4521 4522 /** 4523 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4524 * @param event packet 4525 * @return avdtp_cid 4526 * @note: btstack_type 2 4527 */ 4528 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 4529 return little_endian_read_16(event, 3); 4530 } 4531 /** 4532 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4533 * @param event packet 4534 * @param Pointer to storage for bd_addr 4535 * @note: btstack_type B 4536 */ 4537 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4538 reverse_bytes(&event[5], bd_addr, 6); 4539 } 4540 /** 4541 * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4542 * @param event packet 4543 * @return con_handle 4544 * @note: btstack_type 2 4545 */ 4546 static inline uint16_t avdtp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){ 4547 return little_endian_read_16(event, 11); 4548 } 4549 /** 4550 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4551 * @param event packet 4552 * @return status 4553 * @note: btstack_type 1 4554 */ 4555 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 4556 return event[13]; 4557 } 4558 4559 /** 4560 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 4561 * @param event packet 4562 * @return avdtp_cid 4563 * @note: btstack_type 2 4564 */ 4565 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 4566 return little_endian_read_16(event, 3); 4567 } 4568 4569 /** 4570 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4571 * @param event packet 4572 * @return avdtp_cid 4573 * @note: btstack_type 2 4574 */ 4575 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 4576 return little_endian_read_16(event, 3); 4577 } 4578 /** 4579 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4580 * @param event packet 4581 * @return remote_seid 4582 * @note: btstack_type 1 4583 */ 4584 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 4585 return event[5]; 4586 } 4587 /** 4588 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4589 * @param event packet 4590 * @return in_use 4591 * @note: btstack_type 1 4592 */ 4593 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 4594 return event[6]; 4595 } 4596 /** 4597 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4598 * @param event packet 4599 * @return media_type 4600 * @note: btstack_type 1 4601 */ 4602 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 4603 return event[7]; 4604 } 4605 /** 4606 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4607 * @param event packet 4608 * @return sep_type 4609 * @note: btstack_type 1 4610 */ 4611 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 4612 return event[8]; 4613 } 4614 4615 /** 4616 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4617 * @param event packet 4618 * @return avdtp_cid 4619 * @note: btstack_type 2 4620 */ 4621 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 4622 return little_endian_read_16(event, 3); 4623 } 4624 /** 4625 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4626 * @param event packet 4627 * @return remote_seid 4628 * @note: btstack_type 1 4629 */ 4630 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 4631 return event[5]; 4632 } 4633 /** 4634 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4635 * @param event packet 4636 * @return media_type 4637 * @note: btstack_type 1 4638 */ 4639 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 4640 return event[6]; 4641 } 4642 /** 4643 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4644 * @param event packet 4645 * @return sampling_frequency_bitmap 4646 * @note: btstack_type 1 4647 */ 4648 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4649 return event[7]; 4650 } 4651 /** 4652 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4653 * @param event packet 4654 * @return channel_mode_bitmap 4655 * @note: btstack_type 1 4656 */ 4657 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 4658 return event[8]; 4659 } 4660 /** 4661 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4662 * @param event packet 4663 * @return block_length_bitmap 4664 * @note: btstack_type 1 4665 */ 4666 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 4667 return event[9]; 4668 } 4669 /** 4670 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4671 * @param event packet 4672 * @return subbands_bitmap 4673 * @note: btstack_type 1 4674 */ 4675 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 4676 return event[10]; 4677 } 4678 /** 4679 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4680 * @param event packet 4681 * @return allocation_method_bitmap 4682 * @note: btstack_type 1 4683 */ 4684 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 4685 return event[11]; 4686 } 4687 /** 4688 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4689 * @param event packet 4690 * @return min_bitpool_value 4691 * @note: btstack_type 1 4692 */ 4693 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 4694 return event[12]; 4695 } 4696 /** 4697 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4698 * @param event packet 4699 * @return max_bitpool_value 4700 * @note: btstack_type 1 4701 */ 4702 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 4703 return event[13]; 4704 } 4705 4706 /** 4707 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4708 * @param event packet 4709 * @return avdtp_cid 4710 * @note: btstack_type 2 4711 */ 4712 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_avdtp_cid(const uint8_t * event){ 4713 return little_endian_read_16(event, 3); 4714 } 4715 /** 4716 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4717 * @param event packet 4718 * @return remote_seid 4719 * @note: btstack_type 1 4720 */ 4721 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_remote_seid(const uint8_t * event){ 4722 return event[5]; 4723 } 4724 /** 4725 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4726 * @param event packet 4727 * @return media_type 4728 * @note: btstack_type 1 4729 */ 4730 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_type(const uint8_t * event){ 4731 return event[6]; 4732 } 4733 /** 4734 * @brief Get field layer_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4735 * @param event packet 4736 * @return layer_bitmap 4737 * @note: btstack_type 1 4738 */ 4739 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_layer_bitmap(const uint8_t * event){ 4740 return event[7]; 4741 } 4742 /** 4743 * @brief Get field crc from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4744 * @param event packet 4745 * @return crc 4746 * @note: btstack_type 1 4747 */ 4748 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_crc(const uint8_t * event){ 4749 return event[8]; 4750 } 4751 /** 4752 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4753 * @param event packet 4754 * @return channel_mode_bitmap 4755 * @note: btstack_type 1 4756 */ 4757 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_channel_mode_bitmap(const uint8_t * event){ 4758 return event[9]; 4759 } 4760 /** 4761 * @brief Get field media_payload_format from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4762 * @param event packet 4763 * @return media_payload_format 4764 * @note: btstack_type 1 4765 */ 4766 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_payload_format(const uint8_t * event){ 4767 return event[10]; 4768 } 4769 /** 4770 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4771 * @param event packet 4772 * @return sampling_frequency_bitmap 4773 * @note: btstack_type 1 4774 */ 4775 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4776 return event[11]; 4777 } 4778 /** 4779 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4780 * @param event packet 4781 * @return vbr 4782 * @note: btstack_type 1 4783 */ 4784 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_vbr(const uint8_t * event){ 4785 return event[12]; 4786 } 4787 /** 4788 * @brief Get field bit_rate_index_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 4789 * @param event packet 4790 * @return bit_rate_index_bitmap 4791 * @note: btstack_type 2 4792 */ 4793 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 4794 return little_endian_read_16(event, 13); 4795 } 4796 4797 /** 4798 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4799 * @param event packet 4800 * @return avdtp_cid 4801 * @note: btstack_type 2 4802 */ 4803 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_avdtp_cid(const uint8_t * event){ 4804 return little_endian_read_16(event, 3); 4805 } 4806 /** 4807 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4808 * @param event packet 4809 * @return remote_seid 4810 * @note: btstack_type 1 4811 */ 4812 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_remote_seid(const uint8_t * event){ 4813 return event[5]; 4814 } 4815 /** 4816 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4817 * @param event packet 4818 * @return media_type 4819 * @note: btstack_type 1 4820 */ 4821 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_media_type(const uint8_t * event){ 4822 return event[6]; 4823 } 4824 /** 4825 * @brief Get field object_type_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4826 * @param event packet 4827 * @return object_type_bitmap 4828 * @note: btstack_type 1 4829 */ 4830 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_object_type_bitmap(const uint8_t * event){ 4831 return event[7]; 4832 } 4833 /** 4834 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4835 * @param event packet 4836 * @return sampling_frequency_bitmap 4837 * @note: btstack_type 2 4838 */ 4839 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4840 return little_endian_read_16(event, 8); 4841 } 4842 /** 4843 * @brief Get field channels_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4844 * @param event packet 4845 * @return channels_bitmap 4846 * @note: btstack_type 1 4847 */ 4848 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_channels_bitmap(const uint8_t * event){ 4849 return event[10]; 4850 } 4851 /** 4852 * @brief Get field bit_rate from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4853 * @param event packet 4854 * @return bit_rate 4855 * @note: btstack_type 3 4856 */ 4857 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_bit_rate(const uint8_t * event){ 4858 return little_endian_read_24(event, 11); 4859 } 4860 /** 4861 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 4862 * @param event packet 4863 * @return vbr 4864 * @note: btstack_type 1 4865 */ 4866 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_vbr(const uint8_t * event){ 4867 return event[14]; 4868 } 4869 4870 /** 4871 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4872 * @param event packet 4873 * @return avdtp_cid 4874 * @note: btstack_type 2 4875 */ 4876 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_capability_get_avdtp_cid(const uint8_t * event){ 4877 return little_endian_read_16(event, 3); 4878 } 4879 /** 4880 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4881 * @param event packet 4882 * @return remote_seid 4883 * @note: btstack_type 1 4884 */ 4885 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_remote_seid(const uint8_t * event){ 4886 return event[5]; 4887 } 4888 /** 4889 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4890 * @param event packet 4891 * @return media_type 4892 * @note: btstack_type 1 4893 */ 4894 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_media_type(const uint8_t * event){ 4895 return event[6]; 4896 } 4897 /** 4898 * @brief Get field version from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4899 * @param event packet 4900 * @return version 4901 * @note: btstack_type 1 4902 */ 4903 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_version(const uint8_t * event){ 4904 return event[7]; 4905 } 4906 /** 4907 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4908 * @param event packet 4909 * @return channel_mode_bitmap 4910 * @note: btstack_type 1 4911 */ 4912 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_channel_mode_bitmap(const uint8_t * event){ 4913 return event[8]; 4914 } 4915 /** 4916 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4917 * @param event packet 4918 * @return sampling_frequency_bitmap 4919 * @note: btstack_type 1 4920 */ 4921 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4922 return event[9]; 4923 } 4924 /** 4925 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4926 * @param event packet 4927 * @return vbr 4928 * @note: btstack_type 1 4929 */ 4930 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_vbr(const uint8_t * event){ 4931 return event[10]; 4932 } 4933 /** 4934 * @brief Get field bit_rate_index_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4935 * @param event packet 4936 * @return bit_rate_index_bitmap 4937 * @note: btstack_type 3 4938 */ 4939 static inline uint32_t avdtp_subevent_signaling_media_codec_atrac_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 4940 return little_endian_read_24(event, 11); 4941 } 4942 /** 4943 * @brief Get field maximum_sul from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 4944 * @param event packet 4945 * @return maximum_sul 4946 * @note: btstack_type 2 4947 */ 4948 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_capability_get_maximum_sul(const uint8_t * event){ 4949 return little_endian_read_16(event, 14); 4950 } 4951 4952 /** 4953 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4954 * @param event packet 4955 * @return avdtp_cid 4956 * @note: btstack_type 2 4957 */ 4958 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 4959 return little_endian_read_16(event, 3); 4960 } 4961 /** 4962 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4963 * @param event packet 4964 * @return remote_seid 4965 * @note: btstack_type 1 4966 */ 4967 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 4968 return event[5]; 4969 } 4970 /** 4971 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4972 * @param event packet 4973 * @return media_type 4974 * @note: btstack_type 1 4975 */ 4976 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 4977 return event[6]; 4978 } 4979 /** 4980 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4981 * @param event packet 4982 * @return media_codec_type 4983 * @note: btstack_type 2 4984 */ 4985 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 4986 return little_endian_read_16(event, 7); 4987 } 4988 /** 4989 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4990 * @param event packet 4991 * @return media_codec_information_len 4992 * @note: btstack_type L 4993 */ 4994 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 4995 return little_endian_read_16(event, 9); 4996 } 4997 /** 4998 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4999 * @param event packet 5000 * @return media_codec_information 5001 * @note: btstack_type V 5002 */ 5003 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 5004 return &event[11]; 5005 } 5006 5007 /** 5008 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 5009 * @param event packet 5010 * @return avdtp_cid 5011 * @note: btstack_type 2 5012 */ 5013 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 5014 return little_endian_read_16(event, 3); 5015 } 5016 /** 5017 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 5018 * @param event packet 5019 * @return remote_seid 5020 * @note: btstack_type 1 5021 */ 5022 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 5023 return event[5]; 5024 } 5025 5026 /** 5027 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 5028 * @param event packet 5029 * @return avdtp_cid 5030 * @note: btstack_type 2 5031 */ 5032 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 5033 return little_endian_read_16(event, 3); 5034 } 5035 /** 5036 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 5037 * @param event packet 5038 * @return remote_seid 5039 * @note: btstack_type 1 5040 */ 5041 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 5042 return event[5]; 5043 } 5044 5045 /** 5046 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5047 * @param event packet 5048 * @return avdtp_cid 5049 * @note: btstack_type 2 5050 */ 5051 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 5052 return little_endian_read_16(event, 3); 5053 } 5054 /** 5055 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5056 * @param event packet 5057 * @return remote_seid 5058 * @note: btstack_type 1 5059 */ 5060 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 5061 return event[5]; 5062 } 5063 /** 5064 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5065 * @param event packet 5066 * @return recovery_type 5067 * @note: btstack_type 1 5068 */ 5069 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 5070 return event[6]; 5071 } 5072 /** 5073 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5074 * @param event packet 5075 * @return maximum_recovery_window_size 5076 * @note: btstack_type 1 5077 */ 5078 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 5079 return event[7]; 5080 } 5081 /** 5082 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5083 * @param event packet 5084 * @return maximum_number_media_packets 5085 * @note: btstack_type 1 5086 */ 5087 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 5088 return event[8]; 5089 } 5090 5091 /** 5092 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5093 * @param event packet 5094 * @return avdtp_cid 5095 * @note: btstack_type 2 5096 */ 5097 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 5098 return little_endian_read_16(event, 3); 5099 } 5100 /** 5101 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5102 * @param event packet 5103 * @return remote_seid 5104 * @note: btstack_type 1 5105 */ 5106 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 5107 return event[5]; 5108 } 5109 /** 5110 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5111 * @param event packet 5112 * @return cp_type 5113 * @note: btstack_type 2 5114 */ 5115 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 5116 return little_endian_read_16(event, 6); 5117 } 5118 /** 5119 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5120 * @param event packet 5121 * @return cp_type_value_len 5122 * @note: btstack_type L 5123 */ 5124 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 5125 return little_endian_read_16(event, 8); 5126 } 5127 /** 5128 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5129 * @param event packet 5130 * @return cp_type_value 5131 * @note: btstack_type V 5132 */ 5133 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 5134 return &event[10]; 5135 } 5136 5137 /** 5138 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5139 * @param event packet 5140 * @return avdtp_cid 5141 * @note: btstack_type 2 5142 */ 5143 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 5144 return little_endian_read_16(event, 3); 5145 } 5146 /** 5147 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5148 * @param event packet 5149 * @return remote_seid 5150 * @note: btstack_type 1 5151 */ 5152 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 5153 return event[5]; 5154 } 5155 /** 5156 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5157 * @param event packet 5158 * @return fragmentation 5159 * @note: btstack_type 1 5160 */ 5161 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 5162 return event[6]; 5163 } 5164 /** 5165 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5166 * @param event packet 5167 * @return transport_identifiers_num 5168 * @note: btstack_type 1 5169 */ 5170 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 5171 return event[7]; 5172 } 5173 /** 5174 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5175 * @param event packet 5176 * @return transport_session_identifier_1 5177 * @note: btstack_type 1 5178 */ 5179 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 5180 return event[8]; 5181 } 5182 /** 5183 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5184 * @param event packet 5185 * @return transport_session_identifier_2 5186 * @note: btstack_type 1 5187 */ 5188 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 5189 return event[9]; 5190 } 5191 /** 5192 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5193 * @param event packet 5194 * @return transport_session_identifier_3 5195 * @note: btstack_type 1 5196 */ 5197 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 5198 return event[10]; 5199 } 5200 /** 5201 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5202 * @param event packet 5203 * @return tcid_1 5204 * @note: btstack_type 1 5205 */ 5206 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 5207 return event[11]; 5208 } 5209 /** 5210 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5211 * @param event packet 5212 * @return tcid_2 5213 * @note: btstack_type 1 5214 */ 5215 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 5216 return event[12]; 5217 } 5218 /** 5219 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 5220 * @param event packet 5221 * @return tcid_3 5222 * @note: btstack_type 1 5223 */ 5224 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 5225 return event[13]; 5226 } 5227 5228 /** 5229 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 5230 * @param event packet 5231 * @return avdtp_cid 5232 * @note: btstack_type 2 5233 */ 5234 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 5235 return little_endian_read_16(event, 3); 5236 } 5237 /** 5238 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 5239 * @param event packet 5240 * @return remote_seid 5241 * @note: btstack_type 1 5242 */ 5243 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 5244 return event[5]; 5245 } 5246 5247 /** 5248 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 5249 * @param event packet 5250 * @return avdtp_cid 5251 * @note: btstack_type 2 5252 */ 5253 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 5254 return little_endian_read_16(event, 3); 5255 } 5256 /** 5257 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 5258 * @param event packet 5259 * @return remote_seid 5260 * @note: btstack_type 1 5261 */ 5262 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 5263 return event[5]; 5264 } 5265 /** 5266 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 5267 * @param event packet 5268 * @return back_ch 5269 * @note: btstack_type 1 5270 */ 5271 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 5272 return event[6]; 5273 } 5274 /** 5275 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 5276 * @param event packet 5277 * @return media 5278 * @note: btstack_type 1 5279 */ 5280 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 5281 return event[7]; 5282 } 5283 /** 5284 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 5285 * @param event packet 5286 * @return recovery 5287 * @note: btstack_type 1 5288 */ 5289 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 5290 return event[8]; 5291 } 5292 5293 /** 5294 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5295 * @param event packet 5296 * @return avdtp_cid 5297 * @note: btstack_type 2 5298 */ 5299 static inline uint16_t avdtp_subevent_signaling_capabilities_done_get_avdtp_cid(const uint8_t * event){ 5300 return little_endian_read_16(event, 3); 5301 } 5302 /** 5303 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5304 * @param event packet 5305 * @return remote_seid 5306 * @note: btstack_type 1 5307 */ 5308 static inline uint8_t avdtp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 5309 return event[5]; 5310 } 5311 5312 /** 5313 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5314 * @param event packet 5315 * @return avdtp_cid 5316 * @note: btstack_type 2 5317 */ 5318 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 5319 return little_endian_read_16(event, 3); 5320 } 5321 /** 5322 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5323 * @param event packet 5324 * @return local_seid 5325 * @note: btstack_type 1 5326 */ 5327 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 5328 return event[5]; 5329 } 5330 /** 5331 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5332 * @param event packet 5333 * @return remote_seid 5334 * @note: btstack_type 1 5335 */ 5336 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 5337 return event[6]; 5338 } 5339 /** 5340 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5341 * @param event packet 5342 * @return reconfigure 5343 * @note: btstack_type 1 5344 */ 5345 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 5346 return event[7]; 5347 } 5348 /** 5349 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5350 * @param event packet 5351 * @return media_type 5352 * @note: btstack_type 1 5353 */ 5354 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 5355 return event[8]; 5356 } 5357 /** 5358 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5359 * @param event packet 5360 * @return sampling_frequency 5361 * @note: btstack_type 2 5362 */ 5363 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5364 return little_endian_read_16(event, 9); 5365 } 5366 /** 5367 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5368 * @param event packet 5369 * @return channel_mode 5370 * @note: btstack_type 1 5371 */ 5372 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5373 return event[11]; 5374 } 5375 /** 5376 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5377 * @param event packet 5378 * @return num_channels 5379 * @note: btstack_type 1 5380 */ 5381 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5382 return event[12]; 5383 } 5384 /** 5385 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5386 * @param event packet 5387 * @return block_length 5388 * @note: btstack_type 1 5389 */ 5390 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5391 return event[13]; 5392 } 5393 /** 5394 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5395 * @param event packet 5396 * @return subbands 5397 * @note: btstack_type 1 5398 */ 5399 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5400 return event[14]; 5401 } 5402 /** 5403 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5404 * @param event packet 5405 * @return allocation_method 5406 * @note: btstack_type 1 5407 */ 5408 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5409 return event[15]; 5410 } 5411 /** 5412 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5413 * @param event packet 5414 * @return min_bitpool_value 5415 * @note: btstack_type 1 5416 */ 5417 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5418 return event[16]; 5419 } 5420 /** 5421 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5422 * @param event packet 5423 * @return max_bitpool_value 5424 * @note: btstack_type 1 5425 */ 5426 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5427 return event[17]; 5428 } 5429 5430 /** 5431 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5432 * @param event packet 5433 * @return avdtp_cid 5434 * @note: btstack_type 2 5435 */ 5436 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_avdtp_cid(const uint8_t * event){ 5437 return little_endian_read_16(event, 3); 5438 } 5439 /** 5440 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5441 * @param event packet 5442 * @return local_seid 5443 * @note: btstack_type 1 5444 */ 5445 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_local_seid(const uint8_t * event){ 5446 return event[5]; 5447 } 5448 /** 5449 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5450 * @param event packet 5451 * @return remote_seid 5452 * @note: btstack_type 1 5453 */ 5454 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_remote_seid(const uint8_t * event){ 5455 return event[6]; 5456 } 5457 /** 5458 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5459 * @param event packet 5460 * @return reconfigure 5461 * @note: btstack_type 1 5462 */ 5463 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_reconfigure(const uint8_t * event){ 5464 return event[7]; 5465 } 5466 /** 5467 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5468 * @param event packet 5469 * @return media_type 5470 * @note: btstack_type 1 5471 */ 5472 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_type(const uint8_t * event){ 5473 return event[8]; 5474 } 5475 /** 5476 * @brief Get field layer from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5477 * @param event packet 5478 * @return layer 5479 * @note: btstack_type 1 5480 */ 5481 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_layer(const uint8_t * event){ 5482 return event[9]; 5483 } 5484 /** 5485 * @brief Get field crc from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5486 * @param event packet 5487 * @return crc 5488 * @note: btstack_type 1 5489 */ 5490 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_crc(const uint8_t * event){ 5491 return event[10]; 5492 } 5493 /** 5494 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5495 * @param event packet 5496 * @return channel_mode 5497 * @note: btstack_type 1 5498 */ 5499 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){ 5500 return event[11]; 5501 } 5502 /** 5503 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5504 * @param event packet 5505 * @return num_channels 5506 * @note: btstack_type 1 5507 */ 5508 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_num_channels(const uint8_t * event){ 5509 return event[12]; 5510 } 5511 /** 5512 * @brief Get field media_payload_format from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5513 * @param event packet 5514 * @return media_payload_format 5515 * @note: btstack_type 1 5516 */ 5517 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_payload_format(const uint8_t * event){ 5518 return event[13]; 5519 } 5520 /** 5521 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5522 * @param event packet 5523 * @return sampling_frequency 5524 * @note: btstack_type 2 5525 */ 5526 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_sampling_frequency(const uint8_t * event){ 5527 return little_endian_read_16(event, 14); 5528 } 5529 /** 5530 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5531 * @param event packet 5532 * @return vbr 5533 * @note: btstack_type 1 5534 */ 5535 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_vbr(const uint8_t * event){ 5536 return event[16]; 5537 } 5538 /** 5539 * @brief Get field bit_rate_index from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 5540 * @param event packet 5541 * @return bit_rate_index 5542 * @note: btstack_type 1 5543 */ 5544 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_bit_rate_index(const uint8_t * event){ 5545 return event[17]; 5546 } 5547 5548 /** 5549 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5550 * @param event packet 5551 * @return avdtp_cid 5552 * @note: btstack_type 2 5553 */ 5554 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_avdtp_cid(const uint8_t * event){ 5555 return little_endian_read_16(event, 3); 5556 } 5557 /** 5558 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5559 * @param event packet 5560 * @return local_seid 5561 * @note: btstack_type 1 5562 */ 5563 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_local_seid(const uint8_t * event){ 5564 return event[5]; 5565 } 5566 /** 5567 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5568 * @param event packet 5569 * @return remote_seid 5570 * @note: btstack_type 1 5571 */ 5572 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_remote_seid(const uint8_t * event){ 5573 return event[6]; 5574 } 5575 /** 5576 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5577 * @param event packet 5578 * @return reconfigure 5579 * @note: btstack_type 1 5580 */ 5581 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_reconfigure(const uint8_t * event){ 5582 return event[7]; 5583 } 5584 /** 5585 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5586 * @param event packet 5587 * @return media_type 5588 * @note: btstack_type 1 5589 */ 5590 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_media_type(const uint8_t * event){ 5591 return event[8]; 5592 } 5593 /** 5594 * @brief Get field object_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5595 * @param event packet 5596 * @return object_type 5597 * @note: btstack_type 1 5598 */ 5599 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_object_type(const uint8_t * event){ 5600 return event[9]; 5601 } 5602 /** 5603 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5604 * @param event packet 5605 * @return sampling_frequency 5606 * @note: btstack_type 3 5607 */ 5608 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_sampling_frequency(const uint8_t * event){ 5609 return little_endian_read_24(event, 10); 5610 } 5611 /** 5612 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5613 * @param event packet 5614 * @return num_channels 5615 * @note: btstack_type 1 5616 */ 5617 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_num_channels(const uint8_t * event){ 5618 return event[13]; 5619 } 5620 /** 5621 * @brief Get field bit_rate from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5622 * @param event packet 5623 * @return bit_rate 5624 * @note: btstack_type 3 5625 */ 5626 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_bit_rate(const uint8_t * event){ 5627 return little_endian_read_24(event, 14); 5628 } 5629 /** 5630 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 5631 * @param event packet 5632 * @return vbr 5633 * @note: btstack_type 1 5634 */ 5635 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_vbr(const uint8_t * event){ 5636 return event[17]; 5637 } 5638 5639 /** 5640 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5641 * @param event packet 5642 * @return avdtp_cid 5643 * @note: btstack_type 2 5644 */ 5645 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_avdtp_cid(const uint8_t * event){ 5646 return little_endian_read_16(event, 3); 5647 } 5648 /** 5649 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5650 * @param event packet 5651 * @return local_seid 5652 * @note: btstack_type 1 5653 */ 5654 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_local_seid(const uint8_t * event){ 5655 return event[5]; 5656 } 5657 /** 5658 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5659 * @param event packet 5660 * @return remote_seid 5661 * @note: btstack_type 1 5662 */ 5663 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_remote_seid(const uint8_t * event){ 5664 return event[6]; 5665 } 5666 /** 5667 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5668 * @param event packet 5669 * @return reconfigure 5670 * @note: btstack_type 1 5671 */ 5672 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_reconfigure(const uint8_t * event){ 5673 return event[7]; 5674 } 5675 /** 5676 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5677 * @param event packet 5678 * @return media_type 5679 * @note: btstack_type 1 5680 */ 5681 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_media_type(const uint8_t * event){ 5682 return event[8]; 5683 } 5684 /** 5685 * @brief Get field version from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5686 * @param event packet 5687 * @return version 5688 * @note: btstack_type 1 5689 */ 5690 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_version(const uint8_t * event){ 5691 return event[9]; 5692 } 5693 /** 5694 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5695 * @param event packet 5696 * @return channel_mode 5697 * @note: btstack_type 1 5698 */ 5699 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){ 5700 return event[10]; 5701 } 5702 /** 5703 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5704 * @param event packet 5705 * @return num_channels 5706 * @note: btstack_type 1 5707 */ 5708 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_num_channels(const uint8_t * event){ 5709 return event[11]; 5710 } 5711 /** 5712 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5713 * @param event packet 5714 * @return sampling_frequency 5715 * @note: btstack_type 2 5716 */ 5717 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_sampling_frequency(const uint8_t * event){ 5718 return little_endian_read_16(event, 12); 5719 } 5720 /** 5721 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5722 * @param event packet 5723 * @return vbr 5724 * @note: btstack_type 1 5725 */ 5726 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_vbr(const uint8_t * event){ 5727 return event[14]; 5728 } 5729 /** 5730 * @brief Get field bit_rate_index from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5731 * @param event packet 5732 * @return bit_rate_index 5733 * @note: btstack_type 1 5734 */ 5735 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_bit_rate_index(const uint8_t * event){ 5736 return event[15]; 5737 } 5738 /** 5739 * @brief Get field maximum_sul from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 5740 * @param event packet 5741 * @return maximum_sul 5742 * @note: btstack_type 2 5743 */ 5744 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_maximum_sul(const uint8_t * event){ 5745 return little_endian_read_16(event, 16); 5746 } 5747 5748 /** 5749 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5750 * @param event packet 5751 * @return avdtp_cid 5752 * @note: btstack_type 2 5753 */ 5754 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 5755 return little_endian_read_16(event, 3); 5756 } 5757 /** 5758 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5759 * @param event packet 5760 * @return local_seid 5761 * @note: btstack_type 1 5762 */ 5763 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 5764 return event[5]; 5765 } 5766 /** 5767 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5768 * @param event packet 5769 * @return remote_seid 5770 * @note: btstack_type 1 5771 */ 5772 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 5773 return event[6]; 5774 } 5775 /** 5776 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5777 * @param event packet 5778 * @return reconfigure 5779 * @note: btstack_type 1 5780 */ 5781 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5782 return event[7]; 5783 } 5784 /** 5785 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5786 * @param event packet 5787 * @return media_type 5788 * @note: btstack_type 1 5789 */ 5790 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5791 return event[8]; 5792 } 5793 /** 5794 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5795 * @param event packet 5796 * @return media_codec_type 5797 * @note: btstack_type 2 5798 */ 5799 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5800 return little_endian_read_16(event, 9); 5801 } 5802 /** 5803 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5804 * @param event packet 5805 * @return media_codec_information_len 5806 * @note: btstack_type L 5807 */ 5808 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5809 return little_endian_read_16(event, 11); 5810 } 5811 /** 5812 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5813 * @param event packet 5814 * @return media_codec_information 5815 * @note: btstack_type V 5816 */ 5817 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5818 return &event[13]; 5819 } 5820 5821 /** 5822 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5823 * @param event packet 5824 * @return avdtp_cid 5825 * @note: btstack_type 2 5826 */ 5827 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 5828 return little_endian_read_16(event, 3); 5829 } 5830 /** 5831 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5832 * @param event packet 5833 * @param Pointer to storage for bd_addr 5834 * @note: btstack_type B 5835 */ 5836 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5837 reverse_bytes(&event[5], bd_addr, 6); 5838 } 5839 /** 5840 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5841 * @param event packet 5842 * @return local_seid 5843 * @note: btstack_type 1 5844 */ 5845 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 5846 return event[11]; 5847 } 5848 /** 5849 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5850 * @param event packet 5851 * @return remote_seid 5852 * @note: btstack_type 1 5853 */ 5854 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 5855 return event[12]; 5856 } 5857 /** 5858 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5859 * @param event packet 5860 * @return status 5861 * @note: btstack_type 1 5862 */ 5863 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 5864 return event[13]; 5865 } 5866 5867 /** 5868 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5869 * @param event packet 5870 * @return avdtp_cid 5871 * @note: btstack_type 2 5872 */ 5873 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 5874 return little_endian_read_16(event, 3); 5875 } 5876 /** 5877 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5878 * @param event packet 5879 * @return local_seid 5880 * @note: btstack_type 1 5881 */ 5882 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 5883 return event[5]; 5884 } 5885 5886 /** 5887 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5888 * @param event packet 5889 * @return avdtp_cid 5890 * @note: btstack_type 2 5891 */ 5892 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 5893 return little_endian_read_16(event, 3); 5894 } 5895 /** 5896 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5897 * @param event packet 5898 * @return local_seid 5899 * @note: btstack_type 1 5900 */ 5901 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5902 return event[5]; 5903 } 5904 /** 5905 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5906 * @param event packet 5907 * @return sequence_number 5908 * @note: btstack_type 2 5909 */ 5910 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 5911 return little_endian_read_16(event, 6); 5912 } 5913 5914 /** 5915 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE 5916 * @param event packet 5917 * @return avdtp_cid 5918 * @note: btstack_type 2 5919 */ 5920 static inline uint16_t avdtp_subevent_signaling_sep_dicovery_done_get_avdtp_cid(const uint8_t * event){ 5921 return little_endian_read_16(event, 3); 5922 } 5923 5924 /** 5925 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5926 * @param event packet 5927 * @return avdtp_cid 5928 * @note: btstack_type 2 5929 */ 5930 static inline uint16_t avdtp_subevent_signaling_delay_report_get_avdtp_cid(const uint8_t * event){ 5931 return little_endian_read_16(event, 3); 5932 } 5933 /** 5934 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5935 * @param event packet 5936 * @return local_seid 5937 * @note: btstack_type 1 5938 */ 5939 static inline uint8_t avdtp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 5940 return event[5]; 5941 } 5942 /** 5943 * @brief Get field delay_100us from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5944 * @param event packet 5945 * @return delay_100us 5946 * @note: btstack_type 2 5947 */ 5948 static inline uint16_t avdtp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 5949 return little_endian_read_16(event, 6); 5950 } 5951 5952 /** 5953 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5954 * @param event packet 5955 * @return a2dp_cid 5956 * @note: btstack_type 2 5957 */ 5958 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 5959 return little_endian_read_16(event, 3); 5960 } 5961 /** 5962 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5963 * @param event packet 5964 * @return local_seid 5965 * @note: btstack_type 1 5966 */ 5967 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5968 return event[5]; 5969 } 5970 5971 /** 5972 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5973 * @param event packet 5974 * @return a2dp_cid 5975 * @note: btstack_type 2 5976 */ 5977 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 5978 return little_endian_read_16(event, 3); 5979 } 5980 /** 5981 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5982 * @param event packet 5983 * @return local_seid 5984 * @note: btstack_type 1 5985 */ 5986 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 5987 return event[5]; 5988 } 5989 /** 5990 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5991 * @param event packet 5992 * @return remote_seid 5993 * @note: btstack_type 1 5994 */ 5995 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 5996 return event[6]; 5997 } 5998 /** 5999 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6000 * @param event packet 6001 * @return reconfigure 6002 * @note: btstack_type 1 6003 */ 6004 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 6005 return event[7]; 6006 } 6007 /** 6008 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6009 * @param event packet 6010 * @return media_type 6011 * @note: btstack_type 1 6012 */ 6013 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 6014 return event[8]; 6015 } 6016 /** 6017 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6018 * @param event packet 6019 * @return sampling_frequency 6020 * @note: btstack_type 2 6021 */ 6022 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 6023 return little_endian_read_16(event, 9); 6024 } 6025 /** 6026 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6027 * @param event packet 6028 * @return channel_mode 6029 * @note: btstack_type 1 6030 */ 6031 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 6032 return event[11]; 6033 } 6034 /** 6035 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6036 * @param event packet 6037 * @return num_channels 6038 * @note: btstack_type 1 6039 */ 6040 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 6041 return event[12]; 6042 } 6043 /** 6044 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6045 * @param event packet 6046 * @return block_length 6047 * @note: btstack_type 1 6048 */ 6049 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 6050 return event[13]; 6051 } 6052 /** 6053 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6054 * @param event packet 6055 * @return subbands 6056 * @note: btstack_type 1 6057 */ 6058 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 6059 return event[14]; 6060 } 6061 /** 6062 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6063 * @param event packet 6064 * @return allocation_method 6065 * @note: btstack_type 1 6066 */ 6067 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 6068 return event[15]; 6069 } 6070 /** 6071 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6072 * @param event packet 6073 * @return min_bitpool_value 6074 * @note: btstack_type 1 6075 */ 6076 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 6077 return event[16]; 6078 } 6079 /** 6080 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6081 * @param event packet 6082 * @return max_bitpool_value 6083 * @note: btstack_type 1 6084 */ 6085 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 6086 return event[17]; 6087 } 6088 6089 /** 6090 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6091 * @param event packet 6092 * @return a2dp_cid 6093 * @note: btstack_type 2 6094 */ 6095 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_a2dp_cid(const uint8_t * event){ 6096 return little_endian_read_16(event, 3); 6097 } 6098 /** 6099 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6100 * @param event packet 6101 * @return local_seid 6102 * @note: btstack_type 1 6103 */ 6104 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_local_seid(const uint8_t * event){ 6105 return event[5]; 6106 } 6107 /** 6108 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6109 * @param event packet 6110 * @return remote_seid 6111 * @note: btstack_type 1 6112 */ 6113 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_remote_seid(const uint8_t * event){ 6114 return event[6]; 6115 } 6116 /** 6117 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6118 * @param event packet 6119 * @return reconfigure 6120 * @note: btstack_type 1 6121 */ 6122 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_reconfigure(const uint8_t * event){ 6123 return event[7]; 6124 } 6125 /** 6126 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6127 * @param event packet 6128 * @return media_type 6129 * @note: btstack_type 1 6130 */ 6131 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_type(const uint8_t * event){ 6132 return event[8]; 6133 } 6134 /** 6135 * @brief Get field layer from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6136 * @param event packet 6137 * @return layer 6138 * @note: btstack_type 1 6139 */ 6140 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_layer(const uint8_t * event){ 6141 return event[9]; 6142 } 6143 /** 6144 * @brief Get field crc from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6145 * @param event packet 6146 * @return crc 6147 * @note: btstack_type 1 6148 */ 6149 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_crc(const uint8_t * event){ 6150 return event[10]; 6151 } 6152 /** 6153 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6154 * @param event packet 6155 * @return channel_mode 6156 * @note: btstack_type 1 6157 */ 6158 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){ 6159 return event[11]; 6160 } 6161 /** 6162 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6163 * @param event packet 6164 * @return num_channels 6165 * @note: btstack_type 1 6166 */ 6167 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_num_channels(const uint8_t * event){ 6168 return event[12]; 6169 } 6170 /** 6171 * @brief Get field media_payload_format from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6172 * @param event packet 6173 * @return media_payload_format 6174 * @note: btstack_type 1 6175 */ 6176 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_payload_format(const uint8_t * event){ 6177 return event[13]; 6178 } 6179 /** 6180 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6181 * @param event packet 6182 * @return sampling_frequency 6183 * @note: btstack_type 2 6184 */ 6185 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_sampling_frequency(const uint8_t * event){ 6186 return little_endian_read_16(event, 14); 6187 } 6188 /** 6189 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6190 * @param event packet 6191 * @return vbr 6192 * @note: btstack_type 1 6193 */ 6194 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_vbr(const uint8_t * event){ 6195 return event[16]; 6196 } 6197 /** 6198 * @brief Get field bit_rate_index from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6199 * @param event packet 6200 * @return bit_rate_index 6201 * @note: btstack_type 1 6202 */ 6203 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_bit_rate_index(const uint8_t * event){ 6204 return event[17]; 6205 } 6206 6207 /** 6208 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6209 * @param event packet 6210 * @return a2dp_cid 6211 * @note: btstack_type 2 6212 */ 6213 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_a2dp_cid(const uint8_t * event){ 6214 return little_endian_read_16(event, 3); 6215 } 6216 /** 6217 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6218 * @param event packet 6219 * @return local_seid 6220 * @note: btstack_type 1 6221 */ 6222 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_local_seid(const uint8_t * event){ 6223 return event[5]; 6224 } 6225 /** 6226 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6227 * @param event packet 6228 * @return remote_seid 6229 * @note: btstack_type 1 6230 */ 6231 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_remote_seid(const uint8_t * event){ 6232 return event[6]; 6233 } 6234 /** 6235 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6236 * @param event packet 6237 * @return reconfigure 6238 * @note: btstack_type 1 6239 */ 6240 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_reconfigure(const uint8_t * event){ 6241 return event[7]; 6242 } 6243 /** 6244 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6245 * @param event packet 6246 * @return media_type 6247 * @note: btstack_type 1 6248 */ 6249 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_media_type(const uint8_t * event){ 6250 return event[8]; 6251 } 6252 /** 6253 * @brief Get field object_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6254 * @param event packet 6255 * @return object_type 6256 * @note: btstack_type 1 6257 */ 6258 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_object_type(const uint8_t * event){ 6259 return event[9]; 6260 } 6261 /** 6262 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6263 * @param event packet 6264 * @return sampling_frequency 6265 * @note: btstack_type 3 6266 */ 6267 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_sampling_frequency(const uint8_t * event){ 6268 return little_endian_read_24(event, 10); 6269 } 6270 /** 6271 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6272 * @param event packet 6273 * @return num_channels 6274 * @note: btstack_type 1 6275 */ 6276 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_num_channels(const uint8_t * event){ 6277 return event[13]; 6278 } 6279 /** 6280 * @brief Get field bit_rate from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6281 * @param event packet 6282 * @return bit_rate 6283 * @note: btstack_type 3 6284 */ 6285 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_bit_rate(const uint8_t * event){ 6286 return little_endian_read_24(event, 14); 6287 } 6288 /** 6289 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6290 * @param event packet 6291 * @return vbr 6292 * @note: btstack_type 1 6293 */ 6294 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_vbr(const uint8_t * event){ 6295 return event[17]; 6296 } 6297 6298 /** 6299 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6300 * @param event packet 6301 * @return a2dp_cid 6302 * @note: btstack_type 2 6303 */ 6304 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_a2dp_cid(const uint8_t * event){ 6305 return little_endian_read_16(event, 3); 6306 } 6307 /** 6308 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6309 * @param event packet 6310 * @return local_seid 6311 * @note: btstack_type 1 6312 */ 6313 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_local_seid(const uint8_t * event){ 6314 return event[5]; 6315 } 6316 /** 6317 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6318 * @param event packet 6319 * @return remote_seid 6320 * @note: btstack_type 1 6321 */ 6322 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_remote_seid(const uint8_t * event){ 6323 return event[6]; 6324 } 6325 /** 6326 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6327 * @param event packet 6328 * @return reconfigure 6329 * @note: btstack_type 1 6330 */ 6331 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_reconfigure(const uint8_t * event){ 6332 return event[7]; 6333 } 6334 /** 6335 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6336 * @param event packet 6337 * @return media_type 6338 * @note: btstack_type 1 6339 */ 6340 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_media_type(const uint8_t * event){ 6341 return event[8]; 6342 } 6343 /** 6344 * @brief Get field version from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6345 * @param event packet 6346 * @return version 6347 * @note: btstack_type 1 6348 */ 6349 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_version(const uint8_t * event){ 6350 return event[9]; 6351 } 6352 /** 6353 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6354 * @param event packet 6355 * @return channel_mode 6356 * @note: btstack_type 1 6357 */ 6358 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){ 6359 return event[10]; 6360 } 6361 /** 6362 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6363 * @param event packet 6364 * @return num_channels 6365 * @note: btstack_type 1 6366 */ 6367 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_num_channels(const uint8_t * event){ 6368 return event[11]; 6369 } 6370 /** 6371 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6372 * @param event packet 6373 * @return sampling_frequency 6374 * @note: btstack_type 2 6375 */ 6376 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_sampling_frequency(const uint8_t * event){ 6377 return little_endian_read_16(event, 12); 6378 } 6379 /** 6380 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6381 * @param event packet 6382 * @return vbr 6383 * @note: btstack_type 1 6384 */ 6385 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_vbr(const uint8_t * event){ 6386 return event[14]; 6387 } 6388 /** 6389 * @brief Get field bit_rate_index from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6390 * @param event packet 6391 * @return bit_rate_index 6392 * @note: btstack_type 1 6393 */ 6394 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_bit_rate_index(const uint8_t * event){ 6395 return event[15]; 6396 } 6397 /** 6398 * @brief Get field maximum_sul from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6399 * @param event packet 6400 * @return maximum_sul 6401 * @note: btstack_type 2 6402 */ 6403 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_maximum_sul(const uint8_t * event){ 6404 return little_endian_read_16(event, 16); 6405 } 6406 6407 /** 6408 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6409 * @param event packet 6410 * @return a2dp_cid 6411 * @note: btstack_type 2 6412 */ 6413 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 6414 return little_endian_read_16(event, 3); 6415 } 6416 /** 6417 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6418 * @param event packet 6419 * @return local_seid 6420 * @note: btstack_type 1 6421 */ 6422 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 6423 return event[5]; 6424 } 6425 /** 6426 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6427 * @param event packet 6428 * @return remote_seid 6429 * @note: btstack_type 1 6430 */ 6431 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 6432 return event[6]; 6433 } 6434 /** 6435 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6436 * @param event packet 6437 * @return reconfigure 6438 * @note: btstack_type 1 6439 */ 6440 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 6441 return event[7]; 6442 } 6443 /** 6444 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6445 * @param event packet 6446 * @return media_type 6447 * @note: btstack_type 1 6448 */ 6449 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 6450 return event[8]; 6451 } 6452 /** 6453 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6454 * @param event packet 6455 * @return media_codec_type 6456 * @note: btstack_type 2 6457 */ 6458 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 6459 return little_endian_read_16(event, 9); 6460 } 6461 /** 6462 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6463 * @param event packet 6464 * @return media_codec_information_len 6465 * @note: btstack_type L 6466 */ 6467 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 6468 return little_endian_read_16(event, 11); 6469 } 6470 /** 6471 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6472 * @param event packet 6473 * @return media_codec_information 6474 * @note: btstack_type V 6475 */ 6476 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 6477 return &event[13]; 6478 } 6479 6480 /** 6481 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 6482 * @param event packet 6483 * @return a2dp_cid 6484 * @note: btstack_type 2 6485 */ 6486 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 6487 return little_endian_read_16(event, 3); 6488 } 6489 /** 6490 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 6491 * @param event packet 6492 * @param Pointer to storage for bd_addr 6493 * @note: btstack_type B 6494 */ 6495 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6496 reverse_bytes(&event[5], bd_addr, 6); 6497 } 6498 /** 6499 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 6500 * @param event packet 6501 * @return local_seid 6502 * @note: btstack_type 1 6503 */ 6504 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 6505 return event[11]; 6506 } 6507 /** 6508 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 6509 * @param event packet 6510 * @return remote_seid 6511 * @note: btstack_type 1 6512 */ 6513 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 6514 return event[12]; 6515 } 6516 /** 6517 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 6518 * @param event packet 6519 * @return status 6520 * @note: btstack_type 1 6521 */ 6522 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 6523 return event[13]; 6524 } 6525 6526 /** 6527 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 6528 * @param event packet 6529 * @return a2dp_cid 6530 * @note: btstack_type 2 6531 */ 6532 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 6533 return little_endian_read_16(event, 3); 6534 } 6535 /** 6536 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 6537 * @param event packet 6538 * @return local_seid 6539 * @note: btstack_type 1 6540 */ 6541 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 6542 return event[5]; 6543 } 6544 6545 /** 6546 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 6547 * @param event packet 6548 * @return a2dp_cid 6549 * @note: btstack_type 2 6550 */ 6551 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 6552 return little_endian_read_16(event, 3); 6553 } 6554 /** 6555 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 6556 * @param event packet 6557 * @return local_seid 6558 * @note: btstack_type 1 6559 */ 6560 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 6561 return event[5]; 6562 } 6563 6564 /** 6565 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 6566 * @param event packet 6567 * @return a2dp_cid 6568 * @note: btstack_type 2 6569 */ 6570 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 6571 return little_endian_read_16(event, 3); 6572 } 6573 /** 6574 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 6575 * @param event packet 6576 * @return local_seid 6577 * @note: btstack_type 1 6578 */ 6579 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 6580 return event[5]; 6581 } 6582 6583 /** 6584 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 6585 * @param event packet 6586 * @return a2dp_cid 6587 * @note: btstack_type 2 6588 */ 6589 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 6590 return little_endian_read_16(event, 3); 6591 } 6592 /** 6593 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 6594 * @param event packet 6595 * @return local_seid 6596 * @note: btstack_type 1 6597 */ 6598 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 6599 return event[5]; 6600 } 6601 6602 /** 6603 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 6604 * @param event packet 6605 * @return a2dp_cid 6606 * @note: btstack_type 2 6607 */ 6608 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 6609 return little_endian_read_16(event, 3); 6610 } 6611 /** 6612 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 6613 * @param event packet 6614 * @return local_seid 6615 * @note: btstack_type 1 6616 */ 6617 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 6618 return event[5]; 6619 } 6620 /** 6621 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 6622 * @param event packet 6623 * @return signal_identifier 6624 * @note: btstack_type 1 6625 */ 6626 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 6627 return event[6]; 6628 } 6629 6630 /** 6631 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 6632 * @param event packet 6633 * @return a2dp_cid 6634 * @note: btstack_type 2 6635 */ 6636 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 6637 return little_endian_read_16(event, 3); 6638 } 6639 /** 6640 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 6641 * @param event packet 6642 * @return local_seid 6643 * @note: btstack_type 1 6644 */ 6645 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 6646 return event[5]; 6647 } 6648 /** 6649 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 6650 * @param event packet 6651 * @return signal_identifier 6652 * @note: btstack_type 1 6653 */ 6654 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 6655 return event[6]; 6656 } 6657 6658 /** 6659 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 6660 * @param event packet 6661 * @return a2dp_cid 6662 * @note: btstack_type 2 6663 */ 6664 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 6665 return little_endian_read_16(event, 3); 6666 } 6667 /** 6668 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 6669 * @param event packet 6670 * @param Pointer to storage for bd_addr 6671 * @note: btstack_type B 6672 */ 6673 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6674 reverse_bytes(&event[5], bd_addr, 6); 6675 } 6676 /** 6677 * @brief Get field con_handle from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 6678 * @param event packet 6679 * @return con_handle 6680 * @note: btstack_type 2 6681 */ 6682 static inline uint16_t a2dp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){ 6683 return little_endian_read_16(event, 11); 6684 } 6685 /** 6686 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 6687 * @param event packet 6688 * @return status 6689 * @note: btstack_type 1 6690 */ 6691 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 6692 return event[13]; 6693 } 6694 6695 /** 6696 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 6697 * @param event packet 6698 * @return a2dp_cid 6699 * @note: btstack_type 2 6700 */ 6701 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 6702 return little_endian_read_16(event, 3); 6703 } 6704 6705 /** 6706 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 6707 * @param event packet 6708 * @return a2dp_cid 6709 * @note: btstack_type 2 6710 */ 6711 static inline uint16_t a2dp_subevent_stream_reconfigured_get_a2dp_cid(const uint8_t * event){ 6712 return little_endian_read_16(event, 3); 6713 } 6714 /** 6715 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 6716 * @param event packet 6717 * @return local_seid 6718 * @note: btstack_type 1 6719 */ 6720 static inline uint8_t a2dp_subevent_stream_reconfigured_get_local_seid(const uint8_t * event){ 6721 return event[5]; 6722 } 6723 /** 6724 * @brief Get field status from event A2DP_SUBEVENT_STREAM_RECONFIGURED 6725 * @param event packet 6726 * @return status 6727 * @note: btstack_type 1 6728 */ 6729 static inline uint8_t a2dp_subevent_stream_reconfigured_get_status(const uint8_t * event){ 6730 return event[6]; 6731 } 6732 6733 /** 6734 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6735 * @param event packet 6736 * @return a2dp_cid 6737 * @note: btstack_type 2 6738 */ 6739 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_capability_get_a2dp_cid(const uint8_t * event){ 6740 return little_endian_read_16(event, 3); 6741 } 6742 /** 6743 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6744 * @param event packet 6745 * @return remote_seid 6746 * @note: btstack_type 1 6747 */ 6748 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 6749 return event[5]; 6750 } 6751 /** 6752 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6753 * @param event packet 6754 * @return media_type 6755 * @note: btstack_type 1 6756 */ 6757 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 6758 return event[6]; 6759 } 6760 /** 6761 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6762 * @param event packet 6763 * @return sampling_frequency_bitmap 6764 * @note: btstack_type 1 6765 */ 6766 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 6767 return event[7]; 6768 } 6769 /** 6770 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6771 * @param event packet 6772 * @return channel_mode_bitmap 6773 * @note: btstack_type 1 6774 */ 6775 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 6776 return event[8]; 6777 } 6778 /** 6779 * @brief Get field block_length_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6780 * @param event packet 6781 * @return block_length_bitmap 6782 * @note: btstack_type 1 6783 */ 6784 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 6785 return event[9]; 6786 } 6787 /** 6788 * @brief Get field subbands_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6789 * @param event packet 6790 * @return subbands_bitmap 6791 * @note: btstack_type 1 6792 */ 6793 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 6794 return event[10]; 6795 } 6796 /** 6797 * @brief Get field allocation_method_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6798 * @param event packet 6799 * @return allocation_method_bitmap 6800 * @note: btstack_type 1 6801 */ 6802 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 6803 return event[11]; 6804 } 6805 /** 6806 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6807 * @param event packet 6808 * @return min_bitpool_value 6809 * @note: btstack_type 1 6810 */ 6811 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 6812 return event[12]; 6813 } 6814 /** 6815 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 6816 * @param event packet 6817 * @return max_bitpool_value 6818 * @note: btstack_type 1 6819 */ 6820 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 6821 return event[13]; 6822 } 6823 6824 /** 6825 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6826 * @param event packet 6827 * @return a2dp_cid 6828 * @note: btstack_type 2 6829 */ 6830 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_a2dp_cid(const uint8_t * event){ 6831 return little_endian_read_16(event, 3); 6832 } 6833 /** 6834 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6835 * @param event packet 6836 * @return remote_seid 6837 * @note: btstack_type 1 6838 */ 6839 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_remote_seid(const uint8_t * event){ 6840 return event[5]; 6841 } 6842 /** 6843 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6844 * @param event packet 6845 * @return media_type 6846 * @note: btstack_type 1 6847 */ 6848 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_type(const uint8_t * event){ 6849 return event[6]; 6850 } 6851 /** 6852 * @brief Get field layer_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6853 * @param event packet 6854 * @return layer_bitmap 6855 * @note: btstack_type 1 6856 */ 6857 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_layer_bitmap(const uint8_t * event){ 6858 return event[7]; 6859 } 6860 /** 6861 * @brief Get field crc from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6862 * @param event packet 6863 * @return crc 6864 * @note: btstack_type 1 6865 */ 6866 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_crc(const uint8_t * event){ 6867 return event[8]; 6868 } 6869 /** 6870 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6871 * @param event packet 6872 * @return channel_mode_bitmap 6873 * @note: btstack_type 1 6874 */ 6875 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_channel_mode_bitmap(const uint8_t * event){ 6876 return event[9]; 6877 } 6878 /** 6879 * @brief Get field media_payload_format from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6880 * @param event packet 6881 * @return media_payload_format 6882 * @note: btstack_type 1 6883 */ 6884 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_payload_format(const uint8_t * event){ 6885 return event[10]; 6886 } 6887 /** 6888 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6889 * @param event packet 6890 * @return sampling_frequency_bitmap 6891 * @note: btstack_type 1 6892 */ 6893 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 6894 return event[11]; 6895 } 6896 /** 6897 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6898 * @param event packet 6899 * @return vbr 6900 * @note: btstack_type 1 6901 */ 6902 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_vbr(const uint8_t * event){ 6903 return event[12]; 6904 } 6905 /** 6906 * @brief Get field bit_rate_index_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 6907 * @param event packet 6908 * @return bit_rate_index_bitmap 6909 * @note: btstack_type 2 6910 */ 6911 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 6912 return little_endian_read_16(event, 13); 6913 } 6914 6915 /** 6916 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6917 * @param event packet 6918 * @return a2dp_cid 6919 * @note: btstack_type 2 6920 */ 6921 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_a2dp_cid(const uint8_t * event){ 6922 return little_endian_read_16(event, 3); 6923 } 6924 /** 6925 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6926 * @param event packet 6927 * @return remote_seid 6928 * @note: btstack_type 1 6929 */ 6930 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_remote_seid(const uint8_t * event){ 6931 return event[5]; 6932 } 6933 /** 6934 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6935 * @param event packet 6936 * @return media_type 6937 * @note: btstack_type 1 6938 */ 6939 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_media_type(const uint8_t * event){ 6940 return event[6]; 6941 } 6942 /** 6943 * @brief Get field object_type_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6944 * @param event packet 6945 * @return object_type_bitmap 6946 * @note: btstack_type 1 6947 */ 6948 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_object_type_bitmap(const uint8_t * event){ 6949 return event[7]; 6950 } 6951 /** 6952 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6953 * @param event packet 6954 * @return sampling_frequency_bitmap 6955 * @note: btstack_type 2 6956 */ 6957 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 6958 return little_endian_read_16(event, 8); 6959 } 6960 /** 6961 * @brief Get field channels_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6962 * @param event packet 6963 * @return channels_bitmap 6964 * @note: btstack_type 1 6965 */ 6966 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_channels_bitmap(const uint8_t * event){ 6967 return event[10]; 6968 } 6969 /** 6970 * @brief Get field bit_rate from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6971 * @param event packet 6972 * @return bit_rate 6973 * @note: btstack_type 3 6974 */ 6975 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_bit_rate(const uint8_t * event){ 6976 return little_endian_read_24(event, 11); 6977 } 6978 /** 6979 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 6980 * @param event packet 6981 * @return vbr 6982 * @note: btstack_type 1 6983 */ 6984 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_vbr(const uint8_t * event){ 6985 return event[14]; 6986 } 6987 6988 /** 6989 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 6990 * @param event packet 6991 * @return a2dp_cid 6992 * @note: btstack_type 2 6993 */ 6994 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_capability_get_a2dp_cid(const uint8_t * event){ 6995 return little_endian_read_16(event, 3); 6996 } 6997 /** 6998 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 6999 * @param event packet 7000 * @return remote_seid 7001 * @note: btstack_type 1 7002 */ 7003 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_remote_seid(const uint8_t * event){ 7004 return event[5]; 7005 } 7006 /** 7007 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7008 * @param event packet 7009 * @return media_type 7010 * @note: btstack_type 1 7011 */ 7012 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_media_type(const uint8_t * event){ 7013 return event[6]; 7014 } 7015 /** 7016 * @brief Get field version from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7017 * @param event packet 7018 * @return version 7019 * @note: btstack_type 1 7020 */ 7021 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_version(const uint8_t * event){ 7022 return event[7]; 7023 } 7024 /** 7025 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7026 * @param event packet 7027 * @return channel_mode_bitmap 7028 * @note: btstack_type 1 7029 */ 7030 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_channel_mode_bitmap(const uint8_t * event){ 7031 return event[8]; 7032 } 7033 /** 7034 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7035 * @param event packet 7036 * @return sampling_frequency_bitmap 7037 * @note: btstack_type 1 7038 */ 7039 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 7040 return event[9]; 7041 } 7042 /** 7043 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7044 * @param event packet 7045 * @return vbr 7046 * @note: btstack_type 1 7047 */ 7048 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_vbr(const uint8_t * event){ 7049 return event[10]; 7050 } 7051 /** 7052 * @brief Get field bit_rate_index_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7053 * @param event packet 7054 * @return bit_rate_index_bitmap 7055 * @note: btstack_type 3 7056 */ 7057 static inline uint32_t a2dp_subevent_signaling_media_codec_atrac_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 7058 return little_endian_read_24(event, 11); 7059 } 7060 /** 7061 * @brief Get field maximum_sul from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7062 * @param event packet 7063 * @return maximum_sul 7064 * @note: btstack_type 2 7065 */ 7066 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_capability_get_maximum_sul(const uint8_t * event){ 7067 return little_endian_read_16(event, 14); 7068 } 7069 7070 /** 7071 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7072 * @param event packet 7073 * @return a2dp_cid 7074 * @note: btstack_type 2 7075 */ 7076 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_a2dp_cid(const uint8_t * event){ 7077 return little_endian_read_16(event, 3); 7078 } 7079 /** 7080 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7081 * @param event packet 7082 * @return remote_seid 7083 * @note: btstack_type 1 7084 */ 7085 static inline uint8_t a2dp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 7086 return event[5]; 7087 } 7088 /** 7089 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7090 * @param event packet 7091 * @return media_type 7092 * @note: btstack_type 1 7093 */ 7094 static inline uint8_t a2dp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 7095 return event[6]; 7096 } 7097 /** 7098 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7099 * @param event packet 7100 * @return media_codec_type 7101 * @note: btstack_type 2 7102 */ 7103 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 7104 return little_endian_read_16(event, 7); 7105 } 7106 /** 7107 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7108 * @param event packet 7109 * @return media_codec_information_len 7110 * @note: btstack_type L 7111 */ 7112 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 7113 return little_endian_read_16(event, 9); 7114 } 7115 /** 7116 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7117 * @param event packet 7118 * @return media_codec_information 7119 * @note: btstack_type V 7120 */ 7121 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 7122 return &event[11]; 7123 } 7124 7125 /** 7126 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 7127 * @param event packet 7128 * @return a2dp_cid 7129 * @note: btstack_type 2 7130 */ 7131 static inline uint16_t a2dp_subevent_signaling_delay_reporting_capability_get_a2dp_cid(const uint8_t * event){ 7132 return little_endian_read_16(event, 3); 7133 } 7134 /** 7135 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 7136 * @param event packet 7137 * @return remote_seid 7138 * @note: btstack_type 1 7139 */ 7140 static inline uint8_t a2dp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 7141 return event[5]; 7142 } 7143 7144 /** 7145 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 7146 * @param event packet 7147 * @return a2dp_cid 7148 * @note: btstack_type 2 7149 */ 7150 static inline uint16_t a2dp_subevent_signaling_delay_report_get_a2dp_cid(const uint8_t * event){ 7151 return little_endian_read_16(event, 3); 7152 } 7153 /** 7154 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 7155 * @param event packet 7156 * @return local_seid 7157 * @note: btstack_type 1 7158 */ 7159 static inline uint8_t a2dp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 7160 return event[5]; 7161 } 7162 /** 7163 * @brief Get field delay_100us from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 7164 * @param event packet 7165 * @return delay_100us 7166 * @note: btstack_type 2 7167 */ 7168 static inline uint16_t a2dp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 7169 return little_endian_read_16(event, 6); 7170 } 7171 7172 /** 7173 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 7174 * @param event packet 7175 * @return a2dp_cid 7176 * @note: btstack_type 2 7177 */ 7178 static inline uint16_t a2dp_subevent_signaling_capabilities_done_get_a2dp_cid(const uint8_t * event){ 7179 return little_endian_read_16(event, 3); 7180 } 7181 /** 7182 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 7183 * @param event packet 7184 * @return remote_seid 7185 * @note: btstack_type 1 7186 */ 7187 static inline uint8_t a2dp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 7188 return event[5]; 7189 } 7190 7191 /** 7192 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_COMPLETE 7193 * @param event packet 7194 * @return a2dp_cid 7195 * @note: btstack_type 2 7196 */ 7197 static inline uint16_t a2dp_subevent_signaling_capabilities_complete_get_a2dp_cid(const uint8_t * event){ 7198 return little_endian_read_16(event, 3); 7199 } 7200 7201 /** 7202 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 7203 * @param event packet 7204 * @return avrcp_cid 7205 * @note: btstack_type 2 7206 */ 7207 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 7208 return little_endian_read_16(event, 3); 7209 } 7210 /** 7211 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 7212 * @param event packet 7213 * @return command_type 7214 * @note: btstack_type 1 7215 */ 7216 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 7217 return event[5]; 7218 } 7219 /** 7220 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 7221 * @param event packet 7222 * @return play_status 7223 * @note: btstack_type 1 7224 */ 7225 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 7226 return event[6]; 7227 } 7228 7229 /** 7230 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 7231 * @param event packet 7232 * @return avrcp_cid 7233 * @note: btstack_type 2 7234 */ 7235 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 7236 return little_endian_read_16(event, 3); 7237 } 7238 /** 7239 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 7240 * @param event packet 7241 * @return command_type 7242 * @note: btstack_type 1 7243 */ 7244 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 7245 return event[5]; 7246 } 7247 7248 /** 7249 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END 7250 * @param event packet 7251 * @return avrcp_cid 7252 * @note: btstack_type 2 7253 */ 7254 static inline uint16_t avrcp_subevent_notification_event_track_reached_end_get_avrcp_cid(const uint8_t * event){ 7255 return little_endian_read_16(event, 3); 7256 } 7257 /** 7258 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END 7259 * @param event packet 7260 * @return command_type 7261 * @note: btstack_type 1 7262 */ 7263 static inline uint8_t avrcp_subevent_notification_event_track_reached_end_get_command_type(const uint8_t * event){ 7264 return event[5]; 7265 } 7266 7267 /** 7268 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START 7269 * @param event packet 7270 * @return avrcp_cid 7271 * @note: btstack_type 2 7272 */ 7273 static inline uint16_t avrcp_subevent_notification_event_track_reached_start_get_avrcp_cid(const uint8_t * event){ 7274 return little_endian_read_16(event, 3); 7275 } 7276 /** 7277 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START 7278 * @param event packet 7279 * @return command_type 7280 * @note: btstack_type 1 7281 */ 7282 static inline uint8_t avrcp_subevent_notification_event_track_reached_start_get_command_type(const uint8_t * event){ 7283 return event[5]; 7284 } 7285 7286 /** 7287 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 7288 * @param event packet 7289 * @return avrcp_cid 7290 * @note: btstack_type 2 7291 */ 7292 static inline uint16_t avrcp_subevent_notification_event_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 7293 return little_endian_read_16(event, 3); 7294 } 7295 /** 7296 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 7297 * @param event packet 7298 * @return command_type 7299 * @note: btstack_type 1 7300 */ 7301 static inline uint8_t avrcp_subevent_notification_event_playback_pos_changed_get_command_type(const uint8_t * event){ 7302 return event[5]; 7303 } 7304 /** 7305 * @brief Get field playback_position from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 7306 * @param event packet 7307 * @return playback_position 7308 * @note: btstack_type 4 7309 */ 7310 static inline uint32_t avrcp_subevent_notification_event_playback_pos_changed_get_playback_position(const uint8_t * event){ 7311 return little_endian_read_32(event, 6); 7312 } 7313 7314 /** 7315 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 7316 * @param event packet 7317 * @return avrcp_cid 7318 * @note: btstack_type 2 7319 */ 7320 static inline uint16_t avrcp_subevent_notification_event_batt_status_changed_get_avrcp_cid(const uint8_t * event){ 7321 return little_endian_read_16(event, 3); 7322 } 7323 /** 7324 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 7325 * @param event packet 7326 * @return command_type 7327 * @note: btstack_type 1 7328 */ 7329 static inline uint8_t avrcp_subevent_notification_event_batt_status_changed_get_command_type(const uint8_t * event){ 7330 return event[5]; 7331 } 7332 /** 7333 * @brief Get field battery_status from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 7334 * @param event packet 7335 * @return battery_status 7336 * @note: btstack_type 1 7337 */ 7338 static inline uint8_t avrcp_subevent_notification_event_batt_status_changed_get_battery_status(const uint8_t * event){ 7339 return event[6]; 7340 } 7341 7342 /** 7343 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 7344 * @param event packet 7345 * @return avrcp_cid 7346 * @note: btstack_type 2 7347 */ 7348 static inline uint16_t avrcp_subevent_notification_event_system_status_changed_get_avrcp_cid(const uint8_t * event){ 7349 return little_endian_read_16(event, 3); 7350 } 7351 /** 7352 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 7353 * @param event packet 7354 * @return command_type 7355 * @note: btstack_type 1 7356 */ 7357 static inline uint8_t avrcp_subevent_notification_event_system_status_changed_get_command_type(const uint8_t * event){ 7358 return event[5]; 7359 } 7360 /** 7361 * @brief Get field system_status from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 7362 * @param event packet 7363 * @return system_status 7364 * @note: btstack_type 1 7365 */ 7366 static inline uint8_t avrcp_subevent_notification_event_system_status_changed_get_system_status(const uint8_t * event){ 7367 return event[6]; 7368 } 7369 7370 /** 7371 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 7372 * @param event packet 7373 * @return avrcp_cid 7374 * @note: btstack_type 2 7375 */ 7376 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 7377 return little_endian_read_16(event, 3); 7378 } 7379 /** 7380 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 7381 * @param event packet 7382 * @return command_type 7383 * @note: btstack_type 1 7384 */ 7385 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 7386 return event[5]; 7387 } 7388 7389 /** 7390 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 7391 * @param event packet 7392 * @return avrcp_cid 7393 * @note: btstack_type 2 7394 */ 7395 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 7396 return little_endian_read_16(event, 3); 7397 } 7398 /** 7399 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 7400 * @param event packet 7401 * @return command_type 7402 * @note: btstack_type 1 7403 */ 7404 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 7405 return event[5]; 7406 } 7407 7408 /** 7409 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 7410 * @param event packet 7411 * @return avrcp_cid 7412 * @note: btstack_type 2 7413 */ 7414 static inline uint16_t avrcp_subevent_notification_event_uids_changed_get_avrcp_cid(const uint8_t * event){ 7415 return little_endian_read_16(event, 3); 7416 } 7417 /** 7418 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 7419 * @param event packet 7420 * @return command_type 7421 * @note: btstack_type 1 7422 */ 7423 static inline uint8_t avrcp_subevent_notification_event_uids_changed_get_command_type(const uint8_t * event){ 7424 return event[5]; 7425 } 7426 /** 7427 * @brief Get field uid_counter from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 7428 * @param event packet 7429 * @return uid_counter 7430 * @note: btstack_type 2 7431 */ 7432 static inline uint16_t avrcp_subevent_notification_event_uids_changed_get_uid_counter(const uint8_t * event){ 7433 return little_endian_read_16(event, 6); 7434 } 7435 7436 /** 7437 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 7438 * @param event packet 7439 * @return avrcp_cid 7440 * @note: btstack_type 2 7441 */ 7442 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 7443 return little_endian_read_16(event, 3); 7444 } 7445 /** 7446 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 7447 * @param event packet 7448 * @return command_type 7449 * @note: btstack_type 1 7450 */ 7451 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 7452 return event[5]; 7453 } 7454 /** 7455 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 7456 * @param event packet 7457 * @return absolute_volume 7458 * @note: btstack_type 1 7459 */ 7460 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 7461 return event[6]; 7462 } 7463 7464 /** 7465 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 7466 * @param event packet 7467 * @return avrcp_cid 7468 * @note: btstack_type 2 7469 */ 7470 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 7471 return little_endian_read_16(event, 3); 7472 } 7473 /** 7474 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 7475 * @param event packet 7476 * @return command_type 7477 * @note: btstack_type 1 7478 */ 7479 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 7480 return event[5]; 7481 } 7482 /** 7483 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 7484 * @param event packet 7485 * @return absolute_volume 7486 * @note: btstack_type 1 7487 */ 7488 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 7489 return event[6]; 7490 } 7491 7492 /** 7493 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 7494 * @param event packet 7495 * @return avrcp_cid 7496 * @note: btstack_type 2 7497 */ 7498 static inline uint16_t avrcp_subevent_enable_notification_complete_get_avrcp_cid(const uint8_t * event){ 7499 return little_endian_read_16(event, 3); 7500 } 7501 /** 7502 * @brief Get field command_type from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 7503 * @param event packet 7504 * @return command_type 7505 * @note: btstack_type 1 7506 */ 7507 static inline uint8_t avrcp_subevent_enable_notification_complete_get_command_type(const uint8_t * event){ 7508 return event[5]; 7509 } 7510 /** 7511 * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 7512 * @param event packet 7513 * @return notification_id 7514 * @note: btstack_type 1 7515 */ 7516 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){ 7517 return event[6]; 7518 } 7519 7520 /** 7521 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 7522 * @param event packet 7523 * @return status 7524 * @note: btstack_type 1 7525 */ 7526 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 7527 return event[3]; 7528 } 7529 /** 7530 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 7531 * @param event packet 7532 * @return avrcp_cid 7533 * @note: btstack_type 2 7534 */ 7535 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 7536 return little_endian_read_16(event, 4); 7537 } 7538 /** 7539 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 7540 * @param event packet 7541 * @param Pointer to storage for bd_addr 7542 * @note: btstack_type B 7543 */ 7544 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 7545 reverse_bytes(&event[6], bd_addr, 6); 7546 } 7547 /** 7548 * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 7549 * @param event packet 7550 * @return con_handle 7551 * @note: btstack_type 2 7552 */ 7553 static inline uint16_t avrcp_subevent_connection_established_get_con_handle(const uint8_t * event){ 7554 return little_endian_read_16(event, 12); 7555 } 7556 7557 /** 7558 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 7559 * @param event packet 7560 * @return avrcp_cid 7561 * @note: btstack_type 2 7562 */ 7563 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 7564 return little_endian_read_16(event, 3); 7565 } 7566 7567 /** 7568 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 7569 * @param event packet 7570 * @return avrcp_cid 7571 * @note: btstack_type 2 7572 */ 7573 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 7574 return little_endian_read_16(event, 3); 7575 } 7576 /** 7577 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 7578 * @param event packet 7579 * @return command_type 7580 * @note: btstack_type 1 7581 */ 7582 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 7583 return event[5]; 7584 } 7585 /** 7586 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 7587 * @param event packet 7588 * @return repeat_mode 7589 * @note: btstack_type 1 7590 */ 7591 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 7592 return event[6]; 7593 } 7594 /** 7595 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 7596 * @param event packet 7597 * @return shuffle_mode 7598 * @note: btstack_type 1 7599 */ 7600 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 7601 return event[7]; 7602 } 7603 7604 /** 7605 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 7606 * @param event packet 7607 * @return avrcp_cid 7608 * @note: btstack_type 2 7609 */ 7610 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 7611 return little_endian_read_16(event, 3); 7612 } 7613 /** 7614 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 7615 * @param event packet 7616 * @return command_type 7617 * @note: btstack_type 1 7618 */ 7619 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 7620 return event[5]; 7621 } 7622 /** 7623 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 7624 * @param event packet 7625 * @return song_length 7626 * @note: btstack_type 4 7627 */ 7628 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 7629 return little_endian_read_32(event, 6); 7630 } 7631 /** 7632 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 7633 * @param event packet 7634 * @return song_position 7635 * @note: btstack_type 4 7636 */ 7637 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 7638 return little_endian_read_32(event, 10); 7639 } 7640 /** 7641 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 7642 * @param event packet 7643 * @return play_status 7644 * @note: btstack_type 1 7645 */ 7646 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 7647 return event[14]; 7648 } 7649 7650 /** 7651 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 7652 * @param event packet 7653 * @return avrcp_cid 7654 * @note: btstack_type 2 7655 */ 7656 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 7657 return little_endian_read_16(event, 3); 7658 } 7659 /** 7660 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 7661 * @param event packet 7662 * @return command_type 7663 * @note: btstack_type 1 7664 */ 7665 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 7666 return event[5]; 7667 } 7668 /** 7669 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 7670 * @param event packet 7671 * @return operation_id 7672 * @note: btstack_type 1 7673 */ 7674 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 7675 return event[6]; 7676 } 7677 7678 /** 7679 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 7680 * @param event packet 7681 * @return avrcp_cid 7682 * @note: btstack_type 2 7683 */ 7684 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 7685 return little_endian_read_16(event, 3); 7686 } 7687 /** 7688 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 7689 * @param event packet 7690 * @return command_type 7691 * @note: btstack_type 1 7692 */ 7693 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 7694 return event[5]; 7695 } 7696 /** 7697 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 7698 * @param event packet 7699 * @return operation_id 7700 * @note: btstack_type 1 7701 */ 7702 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 7703 return event[6]; 7704 } 7705 7706 /** 7707 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 7708 * @param event packet 7709 * @return avrcp_cid 7710 * @note: btstack_type 2 7711 */ 7712 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 7713 return little_endian_read_16(event, 3); 7714 } 7715 /** 7716 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 7717 * @param event packet 7718 * @return command_type 7719 * @note: btstack_type 1 7720 */ 7721 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 7722 return event[5]; 7723 } 7724 7725 /** 7726 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_COMPANY_IDS_QUERY 7727 * @param event packet 7728 * @return avrcp_cid 7729 * @note: btstack_type 2 7730 */ 7731 static inline uint16_t avrcp_subevent_company_ids_query_get_avrcp_cid(const uint8_t * event){ 7732 return little_endian_read_16(event, 3); 7733 } 7734 7735 /** 7736 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_EVENT_IDS_QUERY 7737 * @param event packet 7738 * @return avrcp_cid 7739 * @note: btstack_type 2 7740 */ 7741 static inline uint16_t avrcp_subevent_event_ids_query_get_avrcp_cid(const uint8_t * event){ 7742 return little_endian_read_16(event, 3); 7743 } 7744 7745 /** 7746 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 7747 * @param event packet 7748 * @return avrcp_cid 7749 * @note: btstack_type 2 7750 */ 7751 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 7752 return little_endian_read_16(event, 3); 7753 } 7754 7755 /** 7756 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 7757 * @param event packet 7758 * @return avrcp_cid 7759 * @note: btstack_type 2 7760 */ 7761 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 7762 return little_endian_read_16(event, 3); 7763 } 7764 /** 7765 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 7766 * @param event packet 7767 * @return operation_id 7768 * @note: btstack_type 1 7769 */ 7770 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 7771 return event[5]; 7772 } 7773 /** 7774 * @brief Get field button_pressed from event AVRCP_SUBEVENT_OPERATION 7775 * @param event packet 7776 * @return button_pressed 7777 * @note: btstack_type 1 7778 */ 7779 static inline uint8_t avrcp_subevent_operation_get_button_pressed(const uint8_t * event){ 7780 return event[6]; 7781 } 7782 /** 7783 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 7784 * @param event packet 7785 * @return operands_length 7786 * @note: btstack_type 1 7787 */ 7788 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 7789 return event[7]; 7790 } 7791 /** 7792 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 7793 * @param event packet 7794 * @return operand 7795 * @note: btstack_type 1 7796 */ 7797 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 7798 return event[8]; 7799 } 7800 7801 /** 7802 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 7803 * @param event packet 7804 * @return avrcp_cid 7805 * @note: btstack_type 2 7806 */ 7807 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 7808 return little_endian_read_16(event, 3); 7809 } 7810 /** 7811 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 7812 * @param event packet 7813 * @return command_type 7814 * @note: btstack_type 1 7815 */ 7816 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 7817 return event[5]; 7818 } 7819 /** 7820 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 7821 * @param event packet 7822 * @return track 7823 * @note: btstack_type 1 7824 */ 7825 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 7826 return event[6]; 7827 } 7828 7829 /** 7830 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 7831 * @param event packet 7832 * @return avrcp_cid 7833 * @note: btstack_type 2 7834 */ 7835 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 7836 return little_endian_read_16(event, 3); 7837 } 7838 /** 7839 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 7840 * @param event packet 7841 * @return command_type 7842 * @note: btstack_type 1 7843 */ 7844 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 7845 return event[5]; 7846 } 7847 /** 7848 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 7849 * @param event packet 7850 * @return total_tracks 7851 * @note: btstack_type 1 7852 */ 7853 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 7854 return event[6]; 7855 } 7856 7857 /** 7858 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 7859 * @param event packet 7860 * @return avrcp_cid 7861 * @note: btstack_type 2 7862 */ 7863 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 7864 return little_endian_read_16(event, 3); 7865 } 7866 /** 7867 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 7868 * @param event packet 7869 * @return command_type 7870 * @note: btstack_type 1 7871 */ 7872 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 7873 return event[5]; 7874 } 7875 /** 7876 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 7877 * @param event packet 7878 * @return song_length 7879 * @note: btstack_type 4 7880 */ 7881 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 7882 return little_endian_read_32(event, 6); 7883 } 7884 7885 /** 7886 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 7887 * @param event packet 7888 * @return avrcp_cid 7889 * @note: btstack_type 2 7890 */ 7891 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 7892 return little_endian_read_16(event, 3); 7893 } 7894 /** 7895 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 7896 * @param event packet 7897 * @return command_type 7898 * @note: btstack_type 1 7899 */ 7900 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 7901 return event[5]; 7902 } 7903 /** 7904 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 7905 * @param event packet 7906 * @return value_len 7907 * @note: btstack_type J 7908 */ 7909 static inline uint8_t avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 7910 return event[6]; 7911 } 7912 /** 7913 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 7914 * @param event packet 7915 * @return value 7916 * @note: btstack_type V 7917 */ 7918 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 7919 return &event[7]; 7920 } 7921 7922 /** 7923 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 7924 * @param event packet 7925 * @return avrcp_cid 7926 * @note: btstack_type 2 7927 */ 7928 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 7929 return little_endian_read_16(event, 3); 7930 } 7931 /** 7932 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 7933 * @param event packet 7934 * @return command_type 7935 * @note: btstack_type 1 7936 */ 7937 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 7938 return event[5]; 7939 } 7940 /** 7941 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 7942 * @param event packet 7943 * @return value_len 7944 * @note: btstack_type J 7945 */ 7946 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 7947 return event[6]; 7948 } 7949 /** 7950 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 7951 * @param event packet 7952 * @return value 7953 * @note: btstack_type V 7954 */ 7955 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 7956 return &event[7]; 7957 } 7958 7959 /** 7960 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 7961 * @param event packet 7962 * @return avrcp_cid 7963 * @note: btstack_type 2 7964 */ 7965 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 7966 return little_endian_read_16(event, 3); 7967 } 7968 /** 7969 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 7970 * @param event packet 7971 * @return command_type 7972 * @note: btstack_type 1 7973 */ 7974 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 7975 return event[5]; 7976 } 7977 /** 7978 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 7979 * @param event packet 7980 * @return value_len 7981 * @note: btstack_type J 7982 */ 7983 static inline uint8_t avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 7984 return event[6]; 7985 } 7986 /** 7987 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 7988 * @param event packet 7989 * @return value 7990 * @note: btstack_type V 7991 */ 7992 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 7993 return &event[7]; 7994 } 7995 7996 /** 7997 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 7998 * @param event packet 7999 * @return avrcp_cid 8000 * @note: btstack_type 2 8001 */ 8002 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 8003 return little_endian_read_16(event, 3); 8004 } 8005 /** 8006 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8007 * @param event packet 8008 * @return command_type 8009 * @note: btstack_type 1 8010 */ 8011 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 8012 return event[5]; 8013 } 8014 /** 8015 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8016 * @param event packet 8017 * @return value_len 8018 * @note: btstack_type J 8019 */ 8020 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 8021 return event[6]; 8022 } 8023 /** 8024 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8025 * @param event packet 8026 * @return value 8027 * @note: btstack_type V 8028 */ 8029 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 8030 return &event[7]; 8031 } 8032 8033 /** 8034 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8035 * @param event packet 8036 * @return avrcp_cid 8037 * @note: btstack_type 2 8038 */ 8039 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 8040 return little_endian_read_16(event, 3); 8041 } 8042 /** 8043 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8044 * @param event packet 8045 * @return command_type 8046 * @note: btstack_type 1 8047 */ 8048 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 8049 return event[5]; 8050 } 8051 /** 8052 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8053 * @param event packet 8054 * @return status 8055 * @note: btstack_type 1 8056 */ 8057 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 8058 return event[6]; 8059 } 8060 8061 /** 8062 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8063 * @param event packet 8064 * @return avrcp_cid 8065 * @note: btstack_type 2 8066 */ 8067 static inline uint16_t avrcp_subevent_notification_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 8068 return little_endian_read_16(event, 3); 8069 } 8070 /** 8071 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8072 * @param event packet 8073 * @return command_type 8074 * @note: btstack_type 1 8075 */ 8076 static inline uint8_t avrcp_subevent_notification_playback_pos_changed_get_command_type(const uint8_t * event){ 8077 return event[5]; 8078 } 8079 /** 8080 * @brief Get field playback_position_ms from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8081 * @param event packet 8082 * @return playback_position_ms 8083 * @note: btstack_type 4 8084 */ 8085 static inline uint32_t avrcp_subevent_notification_playback_pos_changed_get_playback_position_ms(const uint8_t * event){ 8086 return little_endian_read_32(event, 6); 8087 } 8088 8089 /** 8090 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8091 * @param event packet 8092 * @return avrcp_cid 8093 * @note: btstack_type 2 8094 */ 8095 static inline uint16_t avrcp_subevent_get_capability_event_id_get_avrcp_cid(const uint8_t * event){ 8096 return little_endian_read_16(event, 3); 8097 } 8098 /** 8099 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8100 * @param event packet 8101 * @return command_type 8102 * @note: btstack_type 1 8103 */ 8104 static inline uint8_t avrcp_subevent_get_capability_event_id_get_command_type(const uint8_t * event){ 8105 return event[5]; 8106 } 8107 /** 8108 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8109 * @param event packet 8110 * @return status 8111 * @note: btstack_type 1 8112 */ 8113 static inline uint8_t avrcp_subevent_get_capability_event_id_get_status(const uint8_t * event){ 8114 return event[6]; 8115 } 8116 /** 8117 * @brief Get field event_id from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8118 * @param event packet 8119 * @return event_id 8120 * @note: btstack_type 1 8121 */ 8122 static inline uint8_t avrcp_subevent_get_capability_event_id_get_event_id(const uint8_t * event){ 8123 return event[7]; 8124 } 8125 8126 /** 8127 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 8128 * @param event packet 8129 * @return avrcp_cid 8130 * @note: btstack_type 2 8131 */ 8132 static inline uint16_t avrcp_subevent_get_capability_event_id_done_get_avrcp_cid(const uint8_t * event){ 8133 return little_endian_read_16(event, 3); 8134 } 8135 /** 8136 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 8137 * @param event packet 8138 * @return command_type 8139 * @note: btstack_type 1 8140 */ 8141 static inline uint8_t avrcp_subevent_get_capability_event_id_done_get_command_type(const uint8_t * event){ 8142 return event[5]; 8143 } 8144 /** 8145 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 8146 * @param event packet 8147 * @return status 8148 * @note: btstack_type 1 8149 */ 8150 static inline uint8_t avrcp_subevent_get_capability_event_id_done_get_status(const uint8_t * event){ 8151 return event[6]; 8152 } 8153 8154 /** 8155 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 8156 * @param event packet 8157 * @return avrcp_cid 8158 * @note: btstack_type 2 8159 */ 8160 static inline uint16_t avrcp_subevent_get_capability_company_id_get_avrcp_cid(const uint8_t * event){ 8161 return little_endian_read_16(event, 3); 8162 } 8163 /** 8164 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 8165 * @param event packet 8166 * @return command_type 8167 * @note: btstack_type 1 8168 */ 8169 static inline uint8_t avrcp_subevent_get_capability_company_id_get_command_type(const uint8_t * event){ 8170 return event[5]; 8171 } 8172 /** 8173 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 8174 * @param event packet 8175 * @return status 8176 * @note: btstack_type 1 8177 */ 8178 static inline uint8_t avrcp_subevent_get_capability_company_id_get_status(const uint8_t * event){ 8179 return event[6]; 8180 } 8181 /** 8182 * @brief Get field company_id from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 8183 * @param event packet 8184 * @return company_id 8185 * @note: btstack_type 3 8186 */ 8187 static inline uint32_t avrcp_subevent_get_capability_company_id_get_company_id(const uint8_t * event){ 8188 return little_endian_read_24(event, 7); 8189 } 8190 8191 /** 8192 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 8193 * @param event packet 8194 * @return avrcp_cid 8195 * @note: btstack_type 2 8196 */ 8197 static inline uint16_t avrcp_subevent_get_capability_company_id_done_get_avrcp_cid(const uint8_t * event){ 8198 return little_endian_read_16(event, 3); 8199 } 8200 /** 8201 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 8202 * @param event packet 8203 * @return command_type 8204 * @note: btstack_type 1 8205 */ 8206 static inline uint8_t avrcp_subevent_get_capability_company_id_done_get_command_type(const uint8_t * event){ 8207 return event[5]; 8208 } 8209 /** 8210 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 8211 * @param event packet 8212 * @return status 8213 * @note: btstack_type 1 8214 */ 8215 static inline uint8_t avrcp_subevent_get_capability_company_id_done_get_status(const uint8_t * event){ 8216 return event[6]; 8217 } 8218 8219 /** 8220 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 8221 * @param event packet 8222 * @param Pointer to storage for bd_addr 8223 * @note: btstack_type B 8224 */ 8225 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8226 reverse_bytes(&event[3], bd_addr, 6); 8227 } 8228 /** 8229 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 8230 * @param event packet 8231 * @return browsing_cid 8232 * @note: btstack_type 2 8233 */ 8234 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 8235 return little_endian_read_16(event, 9); 8236 } 8237 8238 /** 8239 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 8240 * @param event packet 8241 * @return status 8242 * @note: btstack_type 1 8243 */ 8244 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 8245 return event[3]; 8246 } 8247 /** 8248 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 8249 * @param event packet 8250 * @param Pointer to storage for bd_addr 8251 * @note: btstack_type B 8252 */ 8253 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8254 reverse_bytes(&event[4], bd_addr, 6); 8255 } 8256 /** 8257 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 8258 * @param event packet 8259 * @return browsing_cid 8260 * @note: btstack_type 2 8261 */ 8262 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 8263 return little_endian_read_16(event, 10); 8264 } 8265 8266 /** 8267 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 8268 * @param event packet 8269 * @return browsing_cid 8270 * @note: btstack_type 2 8271 */ 8272 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 8273 return little_endian_read_16(event, 3); 8274 } 8275 8276 /** 8277 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_DONE 8278 * @param event packet 8279 * @return browsing_cid 8280 * @note: btstack_type 2 8281 */ 8282 static inline uint16_t avrcp_subevent_browsing_done_get_browsing_cid(const uint8_t * event){ 8283 return little_endian_read_16(event, 3); 8284 } 8285 /** 8286 * @brief Get field uid_counter from event AVRCP_SUBEVENT_BROWSING_DONE 8287 * @param event packet 8288 * @return uid_counter 8289 * @note: btstack_type 2 8290 */ 8291 static inline uint16_t avrcp_subevent_browsing_done_get_uid_counter(const uint8_t * event){ 8292 return little_endian_read_16(event, 5); 8293 } 8294 /** 8295 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_DONE 8296 * @param event packet 8297 * @return browsing_status 8298 * @note: btstack_type 1 8299 */ 8300 static inline uint8_t avrcp_subevent_browsing_done_get_browsing_status(const uint8_t * event){ 8301 return event[7]; 8302 } 8303 /** 8304 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_DONE 8305 * @param event packet 8306 * @return bluetooth_status 8307 * @note: btstack_type 1 8308 */ 8309 static inline uint8_t avrcp_subevent_browsing_done_get_bluetooth_status(const uint8_t * event){ 8310 return event[8]; 8311 } 8312 8313 /** 8314 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 8315 * @param event packet 8316 * @return browsing_cid 8317 * @note: btstack_type 2 8318 */ 8319 static inline uint16_t avrcp_subevent_browsing_get_folder_items_get_browsing_cid(const uint8_t * event){ 8320 return little_endian_read_16(event, 3); 8321 } 8322 /** 8323 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 8324 * @param event packet 8325 * @return scope 8326 * @note: btstack_type 1 8327 */ 8328 static inline uint8_t avrcp_subevent_browsing_get_folder_items_get_scope(const uint8_t * event){ 8329 return event[5]; 8330 } 8331 /** 8332 * @brief Get field attr_bitmap from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 8333 * @param event packet 8334 * @return attr_bitmap 8335 * @note: btstack_type 4 8336 */ 8337 static inline uint32_t avrcp_subevent_browsing_get_folder_items_get_attr_bitmap(const uint8_t * event){ 8338 return little_endian_read_32(event, 6); 8339 } 8340 8341 /** 8342 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 8343 * @param event packet 8344 * @return browsing_cid 8345 * @note: btstack_type 2 8346 */ 8347 static inline uint16_t avrcp_subevent_browsing_get_total_num_items_get_browsing_cid(const uint8_t * event){ 8348 return little_endian_read_16(event, 3); 8349 } 8350 /** 8351 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 8352 * @param event packet 8353 * @return scope 8354 * @note: btstack_type 1 8355 */ 8356 static inline uint8_t avrcp_subevent_browsing_get_total_num_items_get_scope(const uint8_t * event){ 8357 return event[5]; 8358 } 8359 8360 /** 8361 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 8362 * @param event packet 8363 * @return goep_cid 8364 * @note: btstack_type 2 8365 */ 8366 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 8367 return little_endian_read_16(event, 3); 8368 } 8369 /** 8370 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 8371 * @param event packet 8372 * @return status 8373 * @note: btstack_type 1 8374 */ 8375 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 8376 return event[5]; 8377 } 8378 /** 8379 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 8380 * @param event packet 8381 * @param Pointer to storage for bd_addr 8382 * @note: btstack_type B 8383 */ 8384 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8385 reverse_bytes(&event[6], bd_addr, 6); 8386 } 8387 /** 8388 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 8389 * @param event packet 8390 * @return con_handle 8391 * @note: btstack_type H 8392 */ 8393 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 8394 return little_endian_read_16(event, 12); 8395 } 8396 /** 8397 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 8398 * @param event packet 8399 * @return incoming 8400 * @note: btstack_type 1 8401 */ 8402 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 8403 return event[14]; 8404 } 8405 8406 /** 8407 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 8408 * @param event packet 8409 * @return goep_cid 8410 * @note: btstack_type 2 8411 */ 8412 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 8413 return little_endian_read_16(event, 3); 8414 } 8415 8416 /** 8417 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 8418 * @param event packet 8419 * @return goep_cid 8420 * @note: btstack_type 2 8421 */ 8422 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 8423 return little_endian_read_16(event, 3); 8424 } 8425 8426 /** 8427 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 8428 * @param event packet 8429 * @return pbap_cid 8430 * @note: btstack_type 2 8431 */ 8432 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 8433 return little_endian_read_16(event, 3); 8434 } 8435 /** 8436 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 8437 * @param event packet 8438 * @return status 8439 * @note: btstack_type 1 8440 */ 8441 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 8442 return event[5]; 8443 } 8444 /** 8445 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 8446 * @param event packet 8447 * @param Pointer to storage for bd_addr 8448 * @note: btstack_type B 8449 */ 8450 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8451 reverse_bytes(&event[6], bd_addr, 6); 8452 } 8453 /** 8454 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 8455 * @param event packet 8456 * @return con_handle 8457 * @note: btstack_type H 8458 */ 8459 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 8460 return little_endian_read_16(event, 12); 8461 } 8462 /** 8463 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 8464 * @param event packet 8465 * @return incoming 8466 * @note: btstack_type 1 8467 */ 8468 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 8469 return event[14]; 8470 } 8471 8472 /** 8473 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 8474 * @param event packet 8475 * @return goep_cid 8476 * @note: btstack_type 2 8477 */ 8478 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 8479 return little_endian_read_16(event, 3); 8480 } 8481 8482 /** 8483 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 8484 * @param event packet 8485 * @return goep_cid 8486 * @note: btstack_type 2 8487 */ 8488 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 8489 return little_endian_read_16(event, 3); 8490 } 8491 /** 8492 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 8493 * @param event packet 8494 * @return status 8495 * @note: btstack_type 1 8496 */ 8497 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 8498 return event[5]; 8499 } 8500 8501 /** 8502 * @brief Get field goep_cid from event PBAP_SUBEVENT_PHONEBOOK_SIZE 8503 * @param event packet 8504 * @return goep_cid 8505 * @note: btstack_type 2 8506 */ 8507 static inline uint16_t pbap_subevent_phonebook_size_get_goep_cid(const uint8_t * event){ 8508 return little_endian_read_16(event, 3); 8509 } 8510 /** 8511 * @brief Get field status from event PBAP_SUBEVENT_PHONEBOOK_SIZE 8512 * @param event packet 8513 * @return status 8514 * @note: btstack_type 1 8515 */ 8516 static inline uint8_t pbap_subevent_phonebook_size_get_status(const uint8_t * event){ 8517 return event[5]; 8518 } 8519 /** 8520 * @brief Get field phoneboook_size from event PBAP_SUBEVENT_PHONEBOOK_SIZE 8521 * @param event packet 8522 * @return phoneboook_size 8523 * @note: btstack_type 2 8524 */ 8525 static inline uint16_t pbap_subevent_phonebook_size_get_phoneboook_size(const uint8_t * event){ 8526 return little_endian_read_16(event, 6); 8527 } 8528 8529 /** 8530 * @brief Get field goep_cid from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 8531 * @param event packet 8532 * @return goep_cid 8533 * @note: btstack_type 2 8534 */ 8535 static inline uint16_t pbap_subevent_authentication_request_get_goep_cid(const uint8_t * event){ 8536 return little_endian_read_16(event, 3); 8537 } 8538 /** 8539 * @brief Get field user_id_required from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 8540 * @param event packet 8541 * @return user_id_required 8542 * @note: btstack_type 1 8543 */ 8544 static inline uint8_t pbap_subevent_authentication_request_get_user_id_required(const uint8_t * event){ 8545 return event[5]; 8546 } 8547 /** 8548 * @brief Get field full_access from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 8549 * @param event packet 8550 * @return full_access 8551 * @note: btstack_type 1 8552 */ 8553 static inline uint8_t pbap_subevent_authentication_request_get_full_access(const uint8_t * event){ 8554 return event[6]; 8555 } 8556 8557 /** 8558 * @brief Get field goep_cid from event PBAP_SUBEVENT_CARD_RESULT 8559 * @param event packet 8560 * @return goep_cid 8561 * @note: btstack_type 2 8562 */ 8563 static inline uint16_t pbap_subevent_card_result_get_goep_cid(const uint8_t * event){ 8564 return little_endian_read_16(event, 3); 8565 } 8566 /** 8567 * @brief Get field name_len from event PBAP_SUBEVENT_CARD_RESULT 8568 * @param event packet 8569 * @return name_len 8570 * @note: btstack_type J 8571 */ 8572 static inline uint8_t pbap_subevent_card_result_get_name_len(const uint8_t * event){ 8573 return event[5]; 8574 } 8575 /** 8576 * @brief Get field name from event PBAP_SUBEVENT_CARD_RESULT 8577 * @param event packet 8578 * @return name 8579 * @note: btstack_type V 8580 */ 8581 static inline const uint8_t * pbap_subevent_card_result_get_name(const uint8_t * event){ 8582 return &event[6]; 8583 } 8584 /** 8585 * @brief Get field handle_len from event PBAP_SUBEVENT_CARD_RESULT 8586 * @param event packet 8587 * @return handle_len 8588 * @note: btstack_type J 8589 */ 8590 static inline uint8_t pbap_subevent_card_result_get_handle_len(const uint8_t * event){ 8591 return event[6u + event[5]]; 8592 } 8593 /** 8594 * @brief Get field handle from event PBAP_SUBEVENT_CARD_RESULT 8595 * @param event packet 8596 * @return handle 8597 * @note: btstack_type V 8598 */ 8599 static inline const uint8_t * pbap_subevent_card_result_get_handle(const uint8_t * event){ 8600 return &event[6u + event[5] + 1u]; 8601 } 8602 8603 /** 8604 * @brief Get field hid_cid from event HID_SUBEVENT_INCOMING_CONNECTION 8605 * @param event packet 8606 * @return hid_cid 8607 * @note: btstack_type 2 8608 */ 8609 static inline uint16_t hid_subevent_incoming_connection_get_hid_cid(const uint8_t * event){ 8610 return little_endian_read_16(event, 3); 8611 } 8612 /** 8613 * @brief Get field address from event HID_SUBEVENT_INCOMING_CONNECTION 8614 * @param event packet 8615 * @param Pointer to storage for address 8616 * @note: btstack_type B 8617 */ 8618 static inline void hid_subevent_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 8619 reverse_bytes(&event[5], address, 6); 8620 } 8621 /** 8622 * @brief Get field handle from event HID_SUBEVENT_INCOMING_CONNECTION 8623 * @param event packet 8624 * @return handle 8625 * @note: btstack_type H 8626 */ 8627 static inline hci_con_handle_t hid_subevent_incoming_connection_get_handle(const uint8_t * event){ 8628 return little_endian_read_16(event, 11); 8629 } 8630 8631 /** 8632 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 8633 * @param event packet 8634 * @return hid_cid 8635 * @note: btstack_type 2 8636 */ 8637 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 8638 return little_endian_read_16(event, 3); 8639 } 8640 /** 8641 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 8642 * @param event packet 8643 * @return status 8644 * @note: btstack_type 1 8645 */ 8646 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 8647 return event[5]; 8648 } 8649 /** 8650 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 8651 * @param event packet 8652 * @param Pointer to storage for bd_addr 8653 * @note: btstack_type B 8654 */ 8655 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8656 reverse_bytes(&event[6], bd_addr, 6); 8657 } 8658 /** 8659 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 8660 * @param event packet 8661 * @return con_handle 8662 * @note: btstack_type H 8663 */ 8664 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 8665 return little_endian_read_16(event, 12); 8666 } 8667 /** 8668 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 8669 * @param event packet 8670 * @return incoming 8671 * @note: btstack_type 1 8672 */ 8673 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 8674 return event[14]; 8675 } 8676 8677 /** 8678 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 8679 * @param event packet 8680 * @return hid_cid 8681 * @note: btstack_type 2 8682 */ 8683 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 8684 return little_endian_read_16(event, 3); 8685 } 8686 8687 /** 8688 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 8689 * @param event packet 8690 * @return hid_cid 8691 * @note: btstack_type 2 8692 */ 8693 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 8694 return little_endian_read_16(event, 3); 8695 } 8696 8697 /** 8698 * @brief Get field hid_cid from event HID_SUBEVENT_SUSPEND 8699 * @param event packet 8700 * @return hid_cid 8701 * @note: btstack_type 2 8702 */ 8703 static inline uint16_t hid_subevent_suspend_get_hid_cid(const uint8_t * event){ 8704 return little_endian_read_16(event, 3); 8705 } 8706 8707 /** 8708 * @brief Get field hid_cid from event HID_SUBEVENT_EXIT_SUSPEND 8709 * @param event packet 8710 * @return hid_cid 8711 * @note: btstack_type 2 8712 */ 8713 static inline uint16_t hid_subevent_exit_suspend_get_hid_cid(const uint8_t * event){ 8714 return little_endian_read_16(event, 3); 8715 } 8716 8717 /** 8718 * @brief Get field hid_cid from event HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG 8719 * @param event packet 8720 * @return hid_cid 8721 * @note: btstack_type 2 8722 */ 8723 static inline uint16_t hid_subevent_virtual_cable_unplug_get_hid_cid(const uint8_t * event){ 8724 return little_endian_read_16(event, 3); 8725 } 8726 8727 /** 8728 * @brief Get field hid_cid from event HID_SUBEVENT_GET_REPORT_RESPONSE 8729 * @param event packet 8730 * @return hid_cid 8731 * @note: btstack_type 2 8732 */ 8733 static inline uint16_t hid_subevent_get_report_response_get_hid_cid(const uint8_t * event){ 8734 return little_endian_read_16(event, 3); 8735 } 8736 /** 8737 * @brief Get field handshake_status from event HID_SUBEVENT_GET_REPORT_RESPONSE 8738 * @param event packet 8739 * @return handshake_status 8740 * @note: btstack_type 1 8741 */ 8742 static inline uint8_t hid_subevent_get_report_response_get_handshake_status(const uint8_t * event){ 8743 return event[5]; 8744 } 8745 /** 8746 * @brief Get field report_len from event HID_SUBEVENT_GET_REPORT_RESPONSE 8747 * @param event packet 8748 * @return report_len 8749 * @note: btstack_type L 8750 */ 8751 static inline uint16_t hid_subevent_get_report_response_get_report_len(const uint8_t * event){ 8752 return little_endian_read_16(event, 6); 8753 } 8754 /** 8755 * @brief Get field report from event HID_SUBEVENT_GET_REPORT_RESPONSE 8756 * @param event packet 8757 * @return report 8758 * @note: btstack_type V 8759 */ 8760 static inline const uint8_t * hid_subevent_get_report_response_get_report(const uint8_t * event){ 8761 return &event[8]; 8762 } 8763 8764 /** 8765 * @brief Get field hid_cid from event HID_SUBEVENT_SET_REPORT_RESPONSE 8766 * @param event packet 8767 * @return hid_cid 8768 * @note: btstack_type 2 8769 */ 8770 static inline uint16_t hid_subevent_set_report_response_get_hid_cid(const uint8_t * event){ 8771 return little_endian_read_16(event, 3); 8772 } 8773 /** 8774 * @brief Get field handshake_status from event HID_SUBEVENT_SET_REPORT_RESPONSE 8775 * @param event packet 8776 * @return handshake_status 8777 * @note: btstack_type 1 8778 */ 8779 static inline uint8_t hid_subevent_set_report_response_get_handshake_status(const uint8_t * event){ 8780 return event[5]; 8781 } 8782 8783 /** 8784 * @brief Get field hid_cid from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 8785 * @param event packet 8786 * @return hid_cid 8787 * @note: btstack_type 2 8788 */ 8789 static inline uint16_t hid_subevent_get_protocol_response_get_hid_cid(const uint8_t * event){ 8790 return little_endian_read_16(event, 3); 8791 } 8792 /** 8793 * @brief Get field handshake_status from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 8794 * @param event packet 8795 * @return handshake_status 8796 * @note: btstack_type 1 8797 */ 8798 static inline uint8_t hid_subevent_get_protocol_response_get_handshake_status(const uint8_t * event){ 8799 return event[5]; 8800 } 8801 /** 8802 * @brief Get field protocol_mode from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 8803 * @param event packet 8804 * @return protocol_mode 8805 * @note: btstack_type 1 8806 */ 8807 static inline uint8_t hid_subevent_get_protocol_response_get_protocol_mode(const uint8_t * event){ 8808 return event[6]; 8809 } 8810 8811 /** 8812 * @brief Get field hid_cid from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 8813 * @param event packet 8814 * @return hid_cid 8815 * @note: btstack_type 2 8816 */ 8817 static inline uint16_t hid_subevent_set_protocol_response_get_hid_cid(const uint8_t * event){ 8818 return little_endian_read_16(event, 3); 8819 } 8820 /** 8821 * @brief Get field handshake_status from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 8822 * @param event packet 8823 * @return handshake_status 8824 * @note: btstack_type 1 8825 */ 8826 static inline uint8_t hid_subevent_set_protocol_response_get_handshake_status(const uint8_t * event){ 8827 return event[5]; 8828 } 8829 /** 8830 * @brief Get field protocol_mode from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 8831 * @param event packet 8832 * @return protocol_mode 8833 * @note: btstack_type 1 8834 */ 8835 static inline uint8_t hid_subevent_set_protocol_response_get_protocol_mode(const uint8_t * event){ 8836 return event[6]; 8837 } 8838 8839 /** 8840 * @brief Get field hid_cid from event HID_SUBEVENT_REPORT 8841 * @param event packet 8842 * @return hid_cid 8843 * @note: btstack_type 2 8844 */ 8845 static inline uint16_t hid_subevent_report_get_hid_cid(const uint8_t * event){ 8846 return little_endian_read_16(event, 3); 8847 } 8848 /** 8849 * @brief Get field report_len from event HID_SUBEVENT_REPORT 8850 * @param event packet 8851 * @return report_len 8852 * @note: btstack_type L 8853 */ 8854 static inline uint16_t hid_subevent_report_get_report_len(const uint8_t * event){ 8855 return little_endian_read_16(event, 5); 8856 } 8857 /** 8858 * @brief Get field report from event HID_SUBEVENT_REPORT 8859 * @param event packet 8860 * @return report 8861 * @note: btstack_type V 8862 */ 8863 static inline const uint8_t * hid_subevent_report_get_report(const uint8_t * event){ 8864 return &event[7]; 8865 } 8866 8867 /** 8868 * @brief Get field hid_cid from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE 8869 * @param event packet 8870 * @return hid_cid 8871 * @note: btstack_type 2 8872 */ 8873 static inline uint16_t hid_subevent_descriptor_available_get_hid_cid(const uint8_t * event){ 8874 return little_endian_read_16(event, 3); 8875 } 8876 /** 8877 * @brief Get field status from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE 8878 * @param event packet 8879 * @return status 8880 * @note: btstack_type 1 8881 */ 8882 static inline uint8_t hid_subevent_descriptor_available_get_status(const uint8_t * event){ 8883 return event[5]; 8884 } 8885 8886 /** 8887 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 8888 * @param event packet 8889 * @return con_handle 8890 * @note: btstack_type 2 8891 */ 8892 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 8893 return little_endian_read_16(event, 3); 8894 } 8895 8896 /** 8897 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 8898 * @param event packet 8899 * @return con_handle 8900 * @note: btstack_type 2 8901 */ 8902 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 8903 return little_endian_read_16(event, 3); 8904 } 8905 /** 8906 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 8907 * @param event packet 8908 * @return protocol_mode 8909 * @note: btstack_type 1 8910 */ 8911 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 8912 return event[5]; 8913 } 8914 8915 /** 8916 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 8917 * @param event packet 8918 * @return con_handle 8919 * @note: btstack_type 2 8920 */ 8921 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 8922 return little_endian_read_16(event, 3); 8923 } 8924 /** 8925 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 8926 * @param event packet 8927 * @return enable 8928 * @note: btstack_type 1 8929 */ 8930 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 8931 return event[5]; 8932 } 8933 8934 /** 8935 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 8936 * @param event packet 8937 * @return con_handle 8938 * @note: btstack_type 2 8939 */ 8940 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 8941 return little_endian_read_16(event, 3); 8942 } 8943 /** 8944 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 8945 * @param event packet 8946 * @return enable 8947 * @note: btstack_type 1 8948 */ 8949 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 8950 return event[5]; 8951 } 8952 8953 /** 8954 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 8955 * @param event packet 8956 * @return con_handle 8957 * @note: btstack_type 2 8958 */ 8959 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 8960 return little_endian_read_16(event, 3); 8961 } 8962 /** 8963 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 8964 * @param event packet 8965 * @return enable 8966 * @note: btstack_type 1 8967 */ 8968 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 8969 return event[5]; 8970 } 8971 8972 /** 8973 * @brief Get field con_handle from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 8974 * @param event packet 8975 * @return con_handle 8976 * @note: btstack_type 2 8977 */ 8978 static inline uint16_t hids_subevent_output_report_enable_get_con_handle(const uint8_t * event){ 8979 return little_endian_read_16(event, 3); 8980 } 8981 /** 8982 * @brief Get field enable from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 8983 * @param event packet 8984 * @return enable 8985 * @note: btstack_type 1 8986 */ 8987 static inline uint8_t hids_subevent_output_report_enable_get_enable(const uint8_t * event){ 8988 return event[5]; 8989 } 8990 8991 /** 8992 * @brief Get field con_handle from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 8993 * @param event packet 8994 * @return con_handle 8995 * @note: btstack_type 2 8996 */ 8997 static inline uint16_t hids_subevent_feature_report_enable_get_con_handle(const uint8_t * event){ 8998 return little_endian_read_16(event, 3); 8999 } 9000 /** 9001 * @brief Get field enable from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 9002 * @param event packet 9003 * @return enable 9004 * @note: btstack_type 1 9005 */ 9006 static inline uint8_t hids_subevent_feature_report_enable_get_enable(const uint8_t * event){ 9007 return event[5]; 9008 } 9009 9010 /** 9011 * @brief Get field con_handle from event HIDS_SUBEVENT_SUSPEND 9012 * @param event packet 9013 * @return con_handle 9014 * @note: btstack_type 2 9015 */ 9016 static inline uint16_t hids_subevent_suspend_get_con_handle(const uint8_t * event){ 9017 return little_endian_read_16(event, 3); 9018 } 9019 9020 /** 9021 * @brief Get field con_handle from event HIDS_SUBEVENT_EXIT_SUSPEND 9022 * @param event packet 9023 * @return con_handle 9024 * @note: btstack_type 2 9025 */ 9026 static inline uint16_t hids_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 9027 return little_endian_read_16(event, 3); 9028 } 9029 9030 /** 9031 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9032 * @param event packet 9033 * @return con_handle 9034 * @note: btstack_type 2 9035 */ 9036 static inline uint16_t gattservice_subevent_cycling_power_start_calibration_get_con_handle(const uint8_t * event){ 9037 return little_endian_read_16(event, 3); 9038 } 9039 /** 9040 * @brief Get field measurement_type from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9041 * @param event packet 9042 * @return measurement_type 9043 * @note: btstack_type 1 9044 */ 9045 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_measurement_type(const uint8_t * event){ 9046 return event[5]; 9047 } 9048 /** 9049 * @brief Get field is_enhanced from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9050 * @param event packet 9051 * @return is_enhanced 9052 * @note: btstack_type 1 9053 */ 9054 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_is_enhanced(const uint8_t * event){ 9055 return event[6]; 9056 } 9057 9058 /** 9059 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START 9060 * @param event packet 9061 * @return con_handle 9062 * @note: btstack_type 2 9063 */ 9064 static inline uint16_t gattservice_subevent_cycling_power_broadcast_start_get_con_handle(const uint8_t * event){ 9065 return little_endian_read_16(event, 3); 9066 } 9067 9068 /** 9069 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP 9070 * @param event packet 9071 * @return con_handle 9072 * @note: btstack_type 2 9073 */ 9074 static inline uint16_t gattservice_subevent_cycling_power_broadcast_stop_get_con_handle(const uint8_t * event){ 9075 return little_endian_read_16(event, 3); 9076 } 9077 9078 /** 9079 * @brief Get field cid from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 9080 * @param event packet 9081 * @return cid 9082 * @note: btstack_type 2 9083 */ 9084 static inline uint16_t gattservice_subevent_battery_service_connected_get_cid(const uint8_t * event){ 9085 return little_endian_read_16(event, 3); 9086 } 9087 /** 9088 * @brief Get field status from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 9089 * @param event packet 9090 * @return status 9091 * @note: btstack_type 1 9092 */ 9093 static inline uint8_t gattservice_subevent_battery_service_connected_get_status(const uint8_t * event){ 9094 return event[5]; 9095 } 9096 /** 9097 * @brief Get field num_instances from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 9098 * @param event packet 9099 * @return num_instances 9100 * @note: btstack_type 1 9101 */ 9102 static inline uint8_t gattservice_subevent_battery_service_connected_get_num_instances(const uint8_t * event){ 9103 return event[6]; 9104 } 9105 /** 9106 * @brief Get field poll_bitmap from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 9107 * @param event packet 9108 * @return poll_bitmap 9109 * @note: btstack_type 1 9110 */ 9111 static inline uint8_t gattservice_subevent_battery_service_connected_get_poll_bitmap(const uint8_t * event){ 9112 return event[7]; 9113 } 9114 9115 /** 9116 * @brief Get field cid from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 9117 * @param event packet 9118 * @return cid 9119 * @note: btstack_type 2 9120 */ 9121 static inline uint16_t gattservice_subevent_battery_service_level_get_cid(const uint8_t * event){ 9122 return little_endian_read_16(event, 3); 9123 } 9124 /** 9125 * @brief Get field sevice_index from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 9126 * @param event packet 9127 * @return sevice_index 9128 * @note: btstack_type 1 9129 */ 9130 static inline uint8_t gattservice_subevent_battery_service_level_get_sevice_index(const uint8_t * event){ 9131 return event[5]; 9132 } 9133 /** 9134 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 9135 * @param event packet 9136 * @return att_status 9137 * @note: btstack_type 1 9138 */ 9139 static inline uint8_t gattservice_subevent_battery_service_level_get_att_status(const uint8_t * event){ 9140 return event[6]; 9141 } 9142 /** 9143 * @brief Get field level from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 9144 * @param event packet 9145 * @return level 9146 * @note: btstack_type 1 9147 */ 9148 static inline uint8_t gattservice_subevent_battery_service_level_get_level(const uint8_t * event){ 9149 return event[7]; 9150 } 9151 9152 /** 9153 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_DONE 9154 * @param event packet 9155 * @return con_handle 9156 * @note: btstack_type H 9157 */ 9158 static inline hci_con_handle_t gattservice_subevent_device_information_done_get_con_handle(const uint8_t * event){ 9159 return little_endian_read_16(event, 3); 9160 } 9161 /** 9162 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_DONE 9163 * @param event packet 9164 * @return att_status 9165 * @note: btstack_type 1 9166 */ 9167 static inline uint8_t gattservice_subevent_device_information_done_get_att_status(const uint8_t * event){ 9168 return event[5]; 9169 } 9170 9171 /** 9172 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 9173 * @param event packet 9174 * @return con_handle 9175 * @note: btstack_type H 9176 */ 9177 static inline hci_con_handle_t gattservice_subevent_device_information_manufacturer_name_get_con_handle(const uint8_t * event){ 9178 return little_endian_read_16(event, 3); 9179 } 9180 /** 9181 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 9182 * @param event packet 9183 * @return att_status 9184 * @note: btstack_type 1 9185 */ 9186 static inline uint8_t gattservice_subevent_device_information_manufacturer_name_get_att_status(const uint8_t * event){ 9187 return event[5]; 9188 } 9189 /** 9190 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 9191 * @param event packet 9192 * @return value 9193 * @note: btstack_type T 9194 */ 9195 static inline const char * gattservice_subevent_device_information_manufacturer_name_get_value(const uint8_t * event){ 9196 return (const char *) &event[6]; 9197 } 9198 9199 /** 9200 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 9201 * @param event packet 9202 * @return con_handle 9203 * @note: btstack_type H 9204 */ 9205 static inline hci_con_handle_t gattservice_subevent_device_information_model_number_get_con_handle(const uint8_t * event){ 9206 return little_endian_read_16(event, 3); 9207 } 9208 /** 9209 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 9210 * @param event packet 9211 * @return att_status 9212 * @note: btstack_type 1 9213 */ 9214 static inline uint8_t gattservice_subevent_device_information_model_number_get_att_status(const uint8_t * event){ 9215 return event[5]; 9216 } 9217 /** 9218 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 9219 * @param event packet 9220 * @return value 9221 * @note: btstack_type T 9222 */ 9223 static inline const char * gattservice_subevent_device_information_model_number_get_value(const uint8_t * event){ 9224 return (const char *) &event[6]; 9225 } 9226 9227 /** 9228 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 9229 * @param event packet 9230 * @return con_handle 9231 * @note: btstack_type H 9232 */ 9233 static inline hci_con_handle_t gattservice_subevent_device_information_serial_number_get_con_handle(const uint8_t * event){ 9234 return little_endian_read_16(event, 3); 9235 } 9236 /** 9237 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 9238 * @param event packet 9239 * @return att_status 9240 * @note: btstack_type 1 9241 */ 9242 static inline uint8_t gattservice_subevent_device_information_serial_number_get_att_status(const uint8_t * event){ 9243 return event[5]; 9244 } 9245 /** 9246 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 9247 * @param event packet 9248 * @return value 9249 * @note: btstack_type T 9250 */ 9251 static inline const char * gattservice_subevent_device_information_serial_number_get_value(const uint8_t * event){ 9252 return (const char *) &event[6]; 9253 } 9254 9255 /** 9256 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 9257 * @param event packet 9258 * @return con_handle 9259 * @note: btstack_type H 9260 */ 9261 static inline hci_con_handle_t gattservice_subevent_device_information_hardware_revision_get_con_handle(const uint8_t * event){ 9262 return little_endian_read_16(event, 3); 9263 } 9264 /** 9265 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 9266 * @param event packet 9267 * @return att_status 9268 * @note: btstack_type 1 9269 */ 9270 static inline uint8_t gattservice_subevent_device_information_hardware_revision_get_att_status(const uint8_t * event){ 9271 return event[5]; 9272 } 9273 /** 9274 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 9275 * @param event packet 9276 * @return value 9277 * @note: btstack_type T 9278 */ 9279 static inline const char * gattservice_subevent_device_information_hardware_revision_get_value(const uint8_t * event){ 9280 return (const char *) &event[6]; 9281 } 9282 9283 /** 9284 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 9285 * @param event packet 9286 * @return con_handle 9287 * @note: btstack_type H 9288 */ 9289 static inline hci_con_handle_t gattservice_subevent_device_information_firmware_revision_get_con_handle(const uint8_t * event){ 9290 return little_endian_read_16(event, 3); 9291 } 9292 /** 9293 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 9294 * @param event packet 9295 * @return att_status 9296 * @note: btstack_type 1 9297 */ 9298 static inline uint8_t gattservice_subevent_device_information_firmware_revision_get_att_status(const uint8_t * event){ 9299 return event[5]; 9300 } 9301 /** 9302 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 9303 * @param event packet 9304 * @return value 9305 * @note: btstack_type T 9306 */ 9307 static inline const char * gattservice_subevent_device_information_firmware_revision_get_value(const uint8_t * event){ 9308 return (const char *) &event[6]; 9309 } 9310 9311 /** 9312 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 9313 * @param event packet 9314 * @return con_handle 9315 * @note: btstack_type H 9316 */ 9317 static inline hci_con_handle_t gattservice_subevent_device_information_software_revision_get_con_handle(const uint8_t * event){ 9318 return little_endian_read_16(event, 3); 9319 } 9320 /** 9321 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 9322 * @param event packet 9323 * @return att_status 9324 * @note: btstack_type 1 9325 */ 9326 static inline uint8_t gattservice_subevent_device_information_software_revision_get_att_status(const uint8_t * event){ 9327 return event[5]; 9328 } 9329 /** 9330 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 9331 * @param event packet 9332 * @return value 9333 * @note: btstack_type T 9334 */ 9335 static inline const char * gattservice_subevent_device_information_software_revision_get_value(const uint8_t * event){ 9336 return (const char *) &event[6]; 9337 } 9338 9339 /** 9340 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 9341 * @param event packet 9342 * @return con_handle 9343 * @note: btstack_type H 9344 */ 9345 static inline hci_con_handle_t gattservice_subevent_device_information_system_id_get_con_handle(const uint8_t * event){ 9346 return little_endian_read_16(event, 3); 9347 } 9348 /** 9349 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 9350 * @param event packet 9351 * @return att_status 9352 * @note: btstack_type 1 9353 */ 9354 static inline uint8_t gattservice_subevent_device_information_system_id_get_att_status(const uint8_t * event){ 9355 return event[5]; 9356 } 9357 /** 9358 * @brief Get field manufacturer_id_low from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 9359 * @param event packet 9360 * @return manufacturer_id_low 9361 * @note: btstack_type 4 9362 */ 9363 static inline uint32_t gattservice_subevent_device_information_system_id_get_manufacturer_id_low(const uint8_t * event){ 9364 return little_endian_read_32(event, 6); 9365 } 9366 /** 9367 * @brief Get field manufacturer_id_high from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 9368 * @param event packet 9369 * @return manufacturer_id_high 9370 * @note: btstack_type 1 9371 */ 9372 static inline uint8_t gattservice_subevent_device_information_system_id_get_manufacturer_id_high(const uint8_t * event){ 9373 return event[10]; 9374 } 9375 /** 9376 * @brief Get field organizationally_unique_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 9377 * @param event packet 9378 * @return organizationally_unique_id 9379 * @note: btstack_type 3 9380 */ 9381 static inline uint32_t gattservice_subevent_device_information_system_id_get_organizationally_unique_id(const uint8_t * event){ 9382 return little_endian_read_24(event, 11); 9383 } 9384 9385 /** 9386 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 9387 * @param event packet 9388 * @return con_handle 9389 * @note: btstack_type H 9390 */ 9391 static inline hci_con_handle_t gattservice_subevent_device_information_ieee_regulatory_certification_get_con_handle(const uint8_t * event){ 9392 return little_endian_read_16(event, 3); 9393 } 9394 /** 9395 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 9396 * @param event packet 9397 * @return att_status 9398 * @note: btstack_type 1 9399 */ 9400 static inline uint8_t gattservice_subevent_device_information_ieee_regulatory_certification_get_att_status(const uint8_t * event){ 9401 return event[5]; 9402 } 9403 /** 9404 * @brief Get field value_a from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 9405 * @param event packet 9406 * @return value_a 9407 * @note: btstack_type 2 9408 */ 9409 static inline uint16_t gattservice_subevent_device_information_ieee_regulatory_certification_get_value_a(const uint8_t * event){ 9410 return little_endian_read_16(event, 6); 9411 } 9412 /** 9413 * @brief Get field value_b from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 9414 * @param event packet 9415 * @return value_b 9416 * @note: btstack_type 2 9417 */ 9418 static inline uint16_t gattservice_subevent_device_information_ieee_regulatory_certification_get_value_b(const uint8_t * event){ 9419 return little_endian_read_16(event, 8); 9420 } 9421 9422 /** 9423 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9424 * @param event packet 9425 * @return con_handle 9426 * @note: btstack_type H 9427 */ 9428 static inline hci_con_handle_t gattservice_subevent_device_information_pnp_id_get_con_handle(const uint8_t * event){ 9429 return little_endian_read_16(event, 3); 9430 } 9431 /** 9432 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9433 * @param event packet 9434 * @return att_status 9435 * @note: btstack_type 1 9436 */ 9437 static inline uint8_t gattservice_subevent_device_information_pnp_id_get_att_status(const uint8_t * event){ 9438 return event[5]; 9439 } 9440 /** 9441 * @brief Get field vendor_source_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9442 * @param event packet 9443 * @return vendor_source_id 9444 * @note: btstack_type 1 9445 */ 9446 static inline uint8_t gattservice_subevent_device_information_pnp_id_get_vendor_source_id(const uint8_t * event){ 9447 return event[6]; 9448 } 9449 /** 9450 * @brief Get field vendor_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9451 * @param event packet 9452 * @return vendor_id 9453 * @note: btstack_type 2 9454 */ 9455 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_vendor_id(const uint8_t * event){ 9456 return little_endian_read_16(event, 7); 9457 } 9458 /** 9459 * @brief Get field product_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9460 * @param event packet 9461 * @return product_id 9462 * @note: btstack_type 2 9463 */ 9464 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_product_id(const uint8_t * event){ 9465 return little_endian_read_16(event, 9); 9466 } 9467 /** 9468 * @brief Get field product_version from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 9469 * @param event packet 9470 * @return product_version 9471 * @note: btstack_type 2 9472 */ 9473 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_product_version(const uint8_t * event){ 9474 return little_endian_read_16(event, 11); 9475 } 9476 9477 /** 9478 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_CONNECTED 9479 * @param event packet 9480 * @return con_handle 9481 * @note: btstack_type H 9482 */ 9483 static inline hci_con_handle_t gattservice_subevent_scan_parameters_service_connected_get_con_handle(const uint8_t * event){ 9484 return little_endian_read_16(event, 3); 9485 } 9486 /** 9487 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_CONNECTED 9488 * @param event packet 9489 * @return att_status 9490 * @note: btstack_type 1 9491 */ 9492 static inline uint8_t gattservice_subevent_scan_parameters_service_connected_get_att_status(const uint8_t * event){ 9493 return event[5]; 9494 } 9495 9496 /** 9497 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_CONNECTED 9498 * @param event packet 9499 * @return con_handle 9500 * @note: btstack_type H 9501 */ 9502 static inline hci_con_handle_t gattservice_subevent_spp_service_connected_get_con_handle(const uint8_t * event){ 9503 return little_endian_read_16(event, 3); 9504 } 9505 9506 /** 9507 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_DISCONNECTED 9508 * @param event packet 9509 * @return con_handle 9510 * @note: btstack_type H 9511 */ 9512 static inline hci_con_handle_t gattservice_subevent_spp_service_disconnected_get_con_handle(const uint8_t * event){ 9513 return little_endian_read_16(event, 3); 9514 } 9515 9516 /** 9517 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_OPENED 9518 * @param event packet 9519 * @return map_cid 9520 * @note: btstack_type 2 9521 */ 9522 static inline uint16_t map_subevent_connection_opened_get_map_cid(const uint8_t * event){ 9523 return little_endian_read_16(event, 3); 9524 } 9525 /** 9526 * @brief Get field status from event MAP_SUBEVENT_CONNECTION_OPENED 9527 * @param event packet 9528 * @return status 9529 * @note: btstack_type 1 9530 */ 9531 static inline uint8_t map_subevent_connection_opened_get_status(const uint8_t * event){ 9532 return event[5]; 9533 } 9534 /** 9535 * @brief Get field bd_addr from event MAP_SUBEVENT_CONNECTION_OPENED 9536 * @param event packet 9537 * @param Pointer to storage for bd_addr 9538 * @note: btstack_type B 9539 */ 9540 static inline void map_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9541 reverse_bytes(&event[6], bd_addr, 6); 9542 } 9543 /** 9544 * @brief Get field con_handle from event MAP_SUBEVENT_CONNECTION_OPENED 9545 * @param event packet 9546 * @return con_handle 9547 * @note: btstack_type H 9548 */ 9549 static inline hci_con_handle_t map_subevent_connection_opened_get_con_handle(const uint8_t * event){ 9550 return little_endian_read_16(event, 12); 9551 } 9552 /** 9553 * @brief Get field incoming from event MAP_SUBEVENT_CONNECTION_OPENED 9554 * @param event packet 9555 * @return incoming 9556 * @note: btstack_type 1 9557 */ 9558 static inline uint8_t map_subevent_connection_opened_get_incoming(const uint8_t * event){ 9559 return event[14]; 9560 } 9561 9562 /** 9563 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_CLOSED 9564 * @param event packet 9565 * @return map_cid 9566 * @note: btstack_type 2 9567 */ 9568 static inline uint16_t map_subevent_connection_closed_get_map_cid(const uint8_t * event){ 9569 return little_endian_read_16(event, 3); 9570 } 9571 9572 /** 9573 * @brief Get field map_cid from event MAP_SUBEVENT_OPERATION_COMPLETED 9574 * @param event packet 9575 * @return map_cid 9576 * @note: btstack_type 2 9577 */ 9578 static inline uint16_t map_subevent_operation_completed_get_map_cid(const uint8_t * event){ 9579 return little_endian_read_16(event, 3); 9580 } 9581 /** 9582 * @brief Get field status from event MAP_SUBEVENT_OPERATION_COMPLETED 9583 * @param event packet 9584 * @return status 9585 * @note: btstack_type 1 9586 */ 9587 static inline uint8_t map_subevent_operation_completed_get_status(const uint8_t * event){ 9588 return event[5]; 9589 } 9590 9591 /** 9592 * @brief Get field map_cid from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 9593 * @param event packet 9594 * @return map_cid 9595 * @note: btstack_type 2 9596 */ 9597 static inline uint16_t map_subevent_folder_listing_item_get_map_cid(const uint8_t * event){ 9598 return little_endian_read_16(event, 3); 9599 } 9600 /** 9601 * @brief Get field name_len from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 9602 * @param event packet 9603 * @return name_len 9604 * @note: btstack_type L 9605 */ 9606 static inline uint16_t map_subevent_folder_listing_item_get_name_len(const uint8_t * event){ 9607 return little_endian_read_16(event, 5); 9608 } 9609 /** 9610 * @brief Get field name from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 9611 * @param event packet 9612 * @return name 9613 * @note: btstack_type V 9614 */ 9615 static inline const uint8_t * map_subevent_folder_listing_item_get_name(const uint8_t * event){ 9616 return &event[7]; 9617 } 9618 9619 /** 9620 * @brief Get field map_cid from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 9621 * @param event packet 9622 * @return map_cid 9623 * @note: btstack_type 2 9624 */ 9625 static inline uint16_t map_subevent_message_listing_item_get_map_cid(const uint8_t * event){ 9626 return little_endian_read_16(event, 3); 9627 } 9628 /** 9629 * @brief Get field handle from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 9630 * @param event packet 9631 * @return handle 9632 * @note: btstack_type D 9633 */ 9634 static inline const uint8_t * map_subevent_message_listing_item_get_handle(const uint8_t * event){ 9635 return (const uint8_t *) &event[5]; 9636 } 9637 9638 /** 9639 * @brief Get field map_cid from event MAP_SUBEVENT_PARSING_DONE 9640 * @param event packet 9641 * @return map_cid 9642 * @note: btstack_type 2 9643 */ 9644 static inline uint16_t map_subevent_parsing_done_get_map_cid(const uint8_t * event){ 9645 return little_endian_read_16(event, 3); 9646 } 9647 9648 9649 /** 9650 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT 9651 * @param event packet 9652 * @return status 9653 * @note: btstack_type 1 9654 */ 9655 static inline uint8_t mesh_subevent_pb_transport_pdu_sent_get_status(const uint8_t * event){ 9656 return event[3]; 9657 } 9658 9659 /** 9660 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 9661 * @param event packet 9662 * @return status 9663 * @note: btstack_type 1 9664 */ 9665 static inline uint8_t mesh_subevent_pb_transport_link_open_get_status(const uint8_t * event){ 9666 return event[3]; 9667 } 9668 /** 9669 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 9670 * @param event packet 9671 * @return pb_transport_cid 9672 * @note: btstack_type 2 9673 */ 9674 static inline uint16_t mesh_subevent_pb_transport_link_open_get_pb_transport_cid(const uint8_t * event){ 9675 return little_endian_read_16(event, 4); 9676 } 9677 /** 9678 * @brief Get field pb_type from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 9679 * @param event packet 9680 * @return pb_type 9681 * @note: btstack_type 1 9682 */ 9683 static inline uint8_t mesh_subevent_pb_transport_link_open_get_pb_type(const uint8_t * event){ 9684 return event[6]; 9685 } 9686 9687 /** 9688 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 9689 * @param event packet 9690 * @return pb_transport_cid 9691 * @note: btstack_type 1 9692 */ 9693 static inline uint8_t mesh_subevent_pb_transport_link_closed_get_pb_transport_cid(const uint8_t * event){ 9694 return event[3]; 9695 } 9696 /** 9697 * @brief Get field reason from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 9698 * @param event packet 9699 * @return reason 9700 * @note: btstack_type 2 9701 */ 9702 static inline uint16_t mesh_subevent_pb_transport_link_closed_get_reason(const uint8_t * event){ 9703 return little_endian_read_16(event, 4); 9704 } 9705 9706 /** 9707 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 9708 * @param event packet 9709 * @return pb_transport_cid 9710 * @note: btstack_type 2 9711 */ 9712 static inline uint16_t mesh_subevent_pb_prov_attention_timer_get_pb_transport_cid(const uint8_t * event){ 9713 return little_endian_read_16(event, 3); 9714 } 9715 /** 9716 * @brief Get field attention_time from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 9717 * @param event packet 9718 * @return attention_time 9719 * @note: btstack_type 1 9720 */ 9721 static inline uint8_t mesh_subevent_pb_prov_attention_timer_get_attention_time(const uint8_t * event){ 9722 return event[5]; 9723 } 9724 9725 /** 9726 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_PUBLIC_KEY_OOB 9727 * @param event packet 9728 * @return pb_transport_cid 9729 * @note: btstack_type 2 9730 */ 9731 static inline uint16_t mesh_subevent_pb_prov_start_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 9732 return little_endian_read_16(event, 3); 9733 } 9734 9735 /** 9736 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB 9737 * @param event packet 9738 * @return pb_transport_cid 9739 * @note: btstack_type 2 9740 */ 9741 static inline uint16_t mesh_subevent_pb_prov_stop_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 9742 return little_endian_read_16(event, 3); 9743 } 9744 9745 /** 9746 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_INPUT_OOB_REQUEST 9747 * @param event packet 9748 * @return pb_transport_cid 9749 * @note: btstack_type 2 9750 */ 9751 static inline uint16_t mesh_subevent_pb_prov_input_oob_request_get_pb_transport_cid(const uint8_t * event){ 9752 return little_endian_read_16(event, 3); 9753 } 9754 9755 /** 9756 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 9757 * @param event packet 9758 * @return pb_transport_cid 9759 * @note: btstack_type 2 9760 */ 9761 static inline uint16_t mesh_subevent_pb_prov_start_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 9762 return little_endian_read_16(event, 3); 9763 } 9764 /** 9765 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 9766 * @param event packet 9767 * @return output_oob 9768 * @note: btstack_type 4 9769 */ 9770 static inline uint32_t mesh_subevent_pb_prov_start_emit_output_oob_get_output_oob(const uint8_t * event){ 9771 return little_endian_read_32(event, 5); 9772 } 9773 9774 /** 9775 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_OUTPUT_OOB 9776 * @param event packet 9777 * @return pb_transport_cid 9778 * @note: btstack_type 2 9779 */ 9780 static inline uint16_t mesh_subevent_pb_prov_stop_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 9781 return little_endian_read_16(event, 3); 9782 } 9783 9784 /** 9785 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB 9786 * @param event packet 9787 * @return pb_transport_cid 9788 * @note: btstack_type 2 9789 */ 9790 static inline uint16_t mesh_subevent_pb_prov_start_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 9791 return little_endian_read_16(event, 3); 9792 } 9793 9794 /** 9795 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB 9796 * @param event packet 9797 * @return pb_transport_cid 9798 * @note: btstack_type 2 9799 */ 9800 static inline uint16_t mesh_subevent_pb_prov_stop_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 9801 return little_endian_read_16(event, 3); 9802 } 9803 9804 /** 9805 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_OUTPUT_OOB_REQUEST 9806 * @param event packet 9807 * @return pb_transport_cid 9808 * @note: btstack_type 2 9809 */ 9810 static inline uint16_t mesh_subevent_pb_prov_output_oob_request_get_pb_transport_cid(const uint8_t * event){ 9811 return little_endian_read_16(event, 3); 9812 } 9813 9814 /** 9815 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 9816 * @param event packet 9817 * @return pb_transport_cid 9818 * @note: btstack_type 2 9819 */ 9820 static inline uint16_t mesh_subevent_pb_prov_start_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 9821 return little_endian_read_16(event, 3); 9822 } 9823 /** 9824 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 9825 * @param event packet 9826 * @return output_oob 9827 * @note: btstack_type 4 9828 */ 9829 static inline uint32_t mesh_subevent_pb_prov_start_emit_input_oob_get_output_oob(const uint8_t * event){ 9830 return little_endian_read_32(event, 5); 9831 } 9832 9833 /** 9834 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_INPUT_OOB 9835 * @param event packet 9836 * @return pb_transport_cid 9837 * @note: btstack_type 2 9838 */ 9839 static inline uint16_t mesh_subevent_pb_prov_stop_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 9840 return little_endian_read_16(event, 3); 9841 } 9842 9843 /** 9844 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9845 * @param event packet 9846 * @return pb_transport_cid 9847 * @note: btstack_type 2 9848 */ 9849 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_pb_transport_cid(const uint8_t * event){ 9850 return little_endian_read_16(event, 3); 9851 } 9852 /** 9853 * @brief Get field num_elements from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9854 * @param event packet 9855 * @return num_elements 9856 * @note: btstack_type 1 9857 */ 9858 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_num_elements(const uint8_t * event){ 9859 return event[5]; 9860 } 9861 /** 9862 * @brief Get field algorithms from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9863 * @param event packet 9864 * @return algorithms 9865 * @note: btstack_type 2 9866 */ 9867 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_algorithms(const uint8_t * event){ 9868 return little_endian_read_16(event, 6); 9869 } 9870 /** 9871 * @brief Get field public_key from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9872 * @param event packet 9873 * @return public_key 9874 * @note: btstack_type 1 9875 */ 9876 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_public_key(const uint8_t * event){ 9877 return event[8]; 9878 } 9879 /** 9880 * @brief Get field static_oob_type from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9881 * @param event packet 9882 * @return static_oob_type 9883 * @note: btstack_type 1 9884 */ 9885 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_static_oob_type(const uint8_t * event){ 9886 return event[9]; 9887 } 9888 /** 9889 * @brief Get field output_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9890 * @param event packet 9891 * @return output_oob_size 9892 * @note: btstack_type 1 9893 */ 9894 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_output_oob_size(const uint8_t * event){ 9895 return event[10]; 9896 } 9897 /** 9898 * @brief Get field output_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9899 * @param event packet 9900 * @return output_oob_action 9901 * @note: btstack_type 2 9902 */ 9903 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_output_oob_action(const uint8_t * event){ 9904 return little_endian_read_16(event, 11); 9905 } 9906 /** 9907 * @brief Get field input_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9908 * @param event packet 9909 * @return input_oob_size 9910 * @note: btstack_type 1 9911 */ 9912 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_input_oob_size(const uint8_t * event){ 9913 return event[13]; 9914 } 9915 /** 9916 * @brief Get field input_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 9917 * @param event packet 9918 * @return input_oob_action 9919 * @note: btstack_type 2 9920 */ 9921 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_input_oob_action(const uint8_t * event){ 9922 return little_endian_read_16(event, 14); 9923 } 9924 9925 /** 9926 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_COMPLETE 9927 * @param event packet 9928 * @return pb_transport_cid 9929 * @note: btstack_type 2 9930 */ 9931 static inline uint16_t mesh_subevent_pb_prov_complete_get_pb_transport_cid(const uint8_t * event){ 9932 return little_endian_read_16(event, 3); 9933 } 9934 9935 /** 9936 * @brief Get field attention_time from event MESH_SUBEVENT_ATTENTION_TIMER 9937 * @param event packet 9938 * @return attention_time 9939 * @note: btstack_type 1 9940 */ 9941 static inline uint8_t mesh_subevent_attention_timer_get_attention_time(const uint8_t * event){ 9942 return event[3]; 9943 } 9944 9945 /** 9946 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_CONNECTED 9947 * @param event packet 9948 * @return con_handle 9949 * @note: btstack_type H 9950 */ 9951 static inline hci_con_handle_t mesh_subevent_proxy_connected_get_con_handle(const uint8_t * event){ 9952 return little_endian_read_16(event, 3); 9953 } 9954 9955 /** 9956 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_PDU_SENT 9957 * @param event packet 9958 * @return con_handle 9959 * @note: btstack_type H 9960 */ 9961 static inline hci_con_handle_t mesh_subevent_proxy_pdu_sent_get_con_handle(const uint8_t * event){ 9962 return little_endian_read_16(event, 3); 9963 } 9964 9965 /** 9966 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_DISCONNECTED 9967 * @param event packet 9968 * @return con_handle 9969 * @note: btstack_type H 9970 */ 9971 static inline hci_con_handle_t mesh_subevent_proxy_disconnected_get_con_handle(const uint8_t * event){ 9972 return little_endian_read_16(event, 3); 9973 } 9974 9975 /** 9976 * @brief Get field con_handle from event MESH_SUBEVENT_MESSAGE_SENT 9977 * @param event packet 9978 * @return con_handle 9979 * @note: btstack_type H 9980 */ 9981 static inline hci_con_handle_t mesh_subevent_message_sent_get_con_handle(const uint8_t * event){ 9982 return little_endian_read_16(event, 3); 9983 } 9984 9985 /** 9986 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_BOOL 9987 * @param event packet 9988 * @return element_index 9989 * @note: btstack_type 1 9990 */ 9991 static inline uint8_t mesh_subevent_state_update_bool_get_element_index(const uint8_t * event){ 9992 return event[3]; 9993 } 9994 /** 9995 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 9996 * @param event packet 9997 * @return model_identifier 9998 * @note: btstack_type 4 9999 */ 10000 static inline uint32_t mesh_subevent_state_update_bool_get_model_identifier(const uint8_t * event){ 10001 return little_endian_read_32(event, 4); 10002 } 10003 /** 10004 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 10005 * @param event packet 10006 * @return state_identifier 10007 * @note: btstack_type 4 10008 */ 10009 static inline uint32_t mesh_subevent_state_update_bool_get_state_identifier(const uint8_t * event){ 10010 return little_endian_read_32(event, 8); 10011 } 10012 /** 10013 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_BOOL 10014 * @param event packet 10015 * @return reason 10016 * @note: btstack_type 1 10017 */ 10018 static inline uint8_t mesh_subevent_state_update_bool_get_reason(const uint8_t * event){ 10019 return event[12]; 10020 } 10021 /** 10022 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_BOOL 10023 * @param event packet 10024 * @return value 10025 * @note: btstack_type 1 10026 */ 10027 static inline uint8_t mesh_subevent_state_update_bool_get_value(const uint8_t * event){ 10028 return event[13]; 10029 } 10030 10031 /** 10032 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_INT16 10033 * @param event packet 10034 * @return element_index 10035 * @note: btstack_type 1 10036 */ 10037 static inline uint8_t mesh_subevent_state_update_int16_get_element_index(const uint8_t * event){ 10038 return event[3]; 10039 } 10040 /** 10041 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 10042 * @param event packet 10043 * @return model_identifier 10044 * @note: btstack_type 4 10045 */ 10046 static inline uint32_t mesh_subevent_state_update_int16_get_model_identifier(const uint8_t * event){ 10047 return little_endian_read_32(event, 4); 10048 } 10049 /** 10050 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 10051 * @param event packet 10052 * @return state_identifier 10053 * @note: btstack_type 4 10054 */ 10055 static inline uint32_t mesh_subevent_state_update_int16_get_state_identifier(const uint8_t * event){ 10056 return little_endian_read_32(event, 8); 10057 } 10058 /** 10059 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_INT16 10060 * @param event packet 10061 * @return reason 10062 * @note: btstack_type 1 10063 */ 10064 static inline uint8_t mesh_subevent_state_update_int16_get_reason(const uint8_t * event){ 10065 return event[12]; 10066 } 10067 /** 10068 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_INT16 10069 * @param event packet 10070 * @return value 10071 * @note: btstack_type 2 10072 */ 10073 static inline uint16_t mesh_subevent_state_update_int16_get_value(const uint8_t * event){ 10074 return little_endian_read_16(event, 13); 10075 } 10076 10077 /** 10078 * @brief Get field element_index from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 10079 * @param event packet 10080 * @return element_index 10081 * @note: btstack_type 1 10082 */ 10083 static inline uint8_t mesh_subevent_message_not_acknowledged_get_element_index(const uint8_t * event){ 10084 return event[3]; 10085 } 10086 /** 10087 * @brief Get field model_identifier from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 10088 * @param event packet 10089 * @return model_identifier 10090 * @note: btstack_type 4 10091 */ 10092 static inline uint32_t mesh_subevent_message_not_acknowledged_get_model_identifier(const uint8_t * event){ 10093 return little_endian_read_32(event, 4); 10094 } 10095 /** 10096 * @brief Get field opcode from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 10097 * @param event packet 10098 * @return opcode 10099 * @note: btstack_type 4 10100 */ 10101 static inline uint32_t mesh_subevent_message_not_acknowledged_get_opcode(const uint8_t * event){ 10102 return little_endian_read_32(event, 8); 10103 } 10104 /** 10105 * @brief Get field dest from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 10106 * @param event packet 10107 * @return dest 10108 * @note: btstack_type 2 10109 */ 10110 static inline uint16_t mesh_subevent_message_not_acknowledged_get_dest(const uint8_t * event){ 10111 return little_endian_read_16(event, 12); 10112 } 10113 10114 /** 10115 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_ON_OFF 10116 * @param event packet 10117 * @return dest 10118 * @note: btstack_type 2 10119 */ 10120 static inline uint16_t mesh_subevent_generic_on_off_get_dest(const uint8_t * event){ 10121 return little_endian_read_16(event, 3); 10122 } 10123 /** 10124 * @brief Get field status from event MESH_SUBEVENT_GENERIC_ON_OFF 10125 * @param event packet 10126 * @return status 10127 * @note: btstack_type 1 10128 */ 10129 static inline uint8_t mesh_subevent_generic_on_off_get_status(const uint8_t * event){ 10130 return event[5]; 10131 } 10132 /** 10133 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_ON_OFF 10134 * @param event packet 10135 * @return present_value 10136 * @note: btstack_type 1 10137 */ 10138 static inline uint8_t mesh_subevent_generic_on_off_get_present_value(const uint8_t * event){ 10139 return event[6]; 10140 } 10141 /** 10142 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_ON_OFF 10143 * @param event packet 10144 * @return target_value 10145 * @note: btstack_type 1 10146 */ 10147 static inline uint8_t mesh_subevent_generic_on_off_get_target_value(const uint8_t * event){ 10148 return event[7]; 10149 } 10150 /** 10151 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_ON_OFF 10152 * @param event packet 10153 * @return remaining_time_ms 10154 * @note: btstack_type 4 10155 */ 10156 static inline uint32_t mesh_subevent_generic_on_off_get_remaining_time_ms(const uint8_t * event){ 10157 return little_endian_read_32(event, 8); 10158 } 10159 10160 /** 10161 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_LEVEL 10162 * @param event packet 10163 * @return dest 10164 * @note: btstack_type 2 10165 */ 10166 static inline uint16_t mesh_subevent_generic_level_get_dest(const uint8_t * event){ 10167 return little_endian_read_16(event, 3); 10168 } 10169 /** 10170 * @brief Get field status from event MESH_SUBEVENT_GENERIC_LEVEL 10171 * @param event packet 10172 * @return status 10173 * @note: btstack_type 1 10174 */ 10175 static inline uint8_t mesh_subevent_generic_level_get_status(const uint8_t * event){ 10176 return event[5]; 10177 } 10178 /** 10179 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_LEVEL 10180 * @param event packet 10181 * @return present_value 10182 * @note: btstack_type 2 10183 */ 10184 static inline uint16_t mesh_subevent_generic_level_get_present_value(const uint8_t * event){ 10185 return little_endian_read_16(event, 6); 10186 } 10187 /** 10188 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_LEVEL 10189 * @param event packet 10190 * @return target_value 10191 * @note: btstack_type 2 10192 */ 10193 static inline uint16_t mesh_subevent_generic_level_get_target_value(const uint8_t * event){ 10194 return little_endian_read_16(event, 8); 10195 } 10196 /** 10197 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_LEVEL 10198 * @param event packet 10199 * @return remaining_time_ms 10200 * @note: btstack_type 4 10201 */ 10202 static inline uint32_t mesh_subevent_generic_level_get_remaining_time_ms(const uint8_t * event){ 10203 return little_endian_read_32(event, 10); 10204 } 10205 10206 /** 10207 * @brief Get field dest from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10208 * @param event packet 10209 * @return dest 10210 * @note: btstack_type 2 10211 */ 10212 static inline uint16_t mesh_subevent_health_perform_test_get_dest(const uint8_t * event){ 10213 return little_endian_read_16(event, 3); 10214 } 10215 /** 10216 * @brief Get field netkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10217 * @param event packet 10218 * @return netkey_index 10219 * @note: btstack_type 2 10220 */ 10221 static inline uint16_t mesh_subevent_health_perform_test_get_netkey_index(const uint8_t * event){ 10222 return little_endian_read_16(event, 5); 10223 } 10224 /** 10225 * @brief Get field appkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10226 * @param event packet 10227 * @return appkey_index 10228 * @note: btstack_type 2 10229 */ 10230 static inline uint16_t mesh_subevent_health_perform_test_get_appkey_index(const uint8_t * event){ 10231 return little_endian_read_16(event, 7); 10232 } 10233 /** 10234 * @brief Get field company_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10235 * @param event packet 10236 * @return company_id 10237 * @note: btstack_type 2 10238 */ 10239 static inline uint16_t mesh_subevent_health_perform_test_get_company_id(const uint8_t * event){ 10240 return little_endian_read_16(event, 9); 10241 } 10242 /** 10243 * @brief Get field test_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10244 * @param event packet 10245 * @return test_id 10246 * @note: btstack_type 1 10247 */ 10248 static inline uint8_t mesh_subevent_health_perform_test_get_test_id(const uint8_t * event){ 10249 return event[11]; 10250 } 10251 /** 10252 * @brief Get field acknowledged from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 10253 * @param event packet 10254 * @return acknowledged 10255 * @note: btstack_type 1 10256 */ 10257 static inline uint8_t mesh_subevent_health_perform_test_get_acknowledged(const uint8_t * event){ 10258 return event[12]; 10259 } 10260 10261 /** 10262 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_ATTENTION_TIMER_CHANGED 10263 * @param event packet 10264 * @return element_index 10265 * @note: btstack_type 1 10266 */ 10267 static inline uint8_t mesh_subevent_health_attention_timer_changed_get_element_index(const uint8_t * event){ 10268 return event[3]; 10269 } 10270 10271 /** 10272 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 10273 * @param event packet 10274 * @return dest 10275 * @note: btstack_type 2 10276 */ 10277 static inline uint16_t mesh_subevent_generic_default_transition_time_get_dest(const uint8_t * event){ 10278 return little_endian_read_16(event, 3); 10279 } 10280 /** 10281 * @brief Get field status from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 10282 * @param event packet 10283 * @return status 10284 * @note: btstack_type 1 10285 */ 10286 static inline uint8_t mesh_subevent_generic_default_transition_time_get_status(const uint8_t * event){ 10287 return event[5]; 10288 } 10289 /** 10290 * @brief Get field transition_time_gdtt from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 10291 * @param event packet 10292 * @return transition_time_gdtt 10293 * @note: btstack_type 1 10294 */ 10295 static inline uint8_t mesh_subevent_generic_default_transition_time_get_transition_time_gdtt(const uint8_t * event){ 10296 return event[6]; 10297 } 10298 10299 /** 10300 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_BEACON 10301 * @param event packet 10302 * @return dest 10303 * @note: btstack_type 2 10304 */ 10305 static inline uint16_t mesh_subevent_configuration_beacon_get_dest(const uint8_t * event){ 10306 return little_endian_read_16(event, 3); 10307 } 10308 /** 10309 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_BEACON 10310 * @param event packet 10311 * @return foundation_status 10312 * @note: btstack_type 1 10313 */ 10314 static inline uint8_t mesh_subevent_configuration_beacon_get_foundation_status(const uint8_t * event){ 10315 return event[5]; 10316 } 10317 /** 10318 * @brief Get field secure_network_beacon_state from event MESH_SUBEVENT_CONFIGURATION_BEACON 10319 * @param event packet 10320 * @return secure_network_beacon_state 10321 * @note: btstack_type 1 10322 */ 10323 static inline uint8_t mesh_subevent_configuration_beacon_get_secure_network_beacon_state(const uint8_t * event){ 10324 return event[6]; 10325 } 10326 10327 /** 10328 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 10329 * @param event packet 10330 * @return dest 10331 * @note: btstack_type 2 10332 */ 10333 static inline uint16_t mesh_subevent_configuration_default_ttl_get_dest(const uint8_t * event){ 10334 return little_endian_read_16(event, 3); 10335 } 10336 /** 10337 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 10338 * @param event packet 10339 * @return foundation_status 10340 * @note: btstack_type 1 10341 */ 10342 static inline uint8_t mesh_subevent_configuration_default_ttl_get_foundation_status(const uint8_t * event){ 10343 return event[5]; 10344 } 10345 /** 10346 * @brief Get field default_ttl from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 10347 * @param event packet 10348 * @return default_ttl 10349 * @note: btstack_type 1 10350 */ 10351 static inline uint8_t mesh_subevent_configuration_default_ttl_get_default_ttl(const uint8_t * event){ 10352 return event[6]; 10353 } 10354 10355 /** 10356 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 10357 * @param event packet 10358 * @return dest 10359 * @note: btstack_type 2 10360 */ 10361 static inline uint16_t mesh_subevent_configuration_gatt_proxy_get_dest(const uint8_t * event){ 10362 return little_endian_read_16(event, 3); 10363 } 10364 /** 10365 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 10366 * @param event packet 10367 * @return foundation_status 10368 * @note: btstack_type 1 10369 */ 10370 static inline uint8_t mesh_subevent_configuration_gatt_proxy_get_foundation_status(const uint8_t * event){ 10371 return event[5]; 10372 } 10373 /** 10374 * @brief Get field gatt_proxy_state from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 10375 * @param event packet 10376 * @return gatt_proxy_state 10377 * @note: btstack_type 1 10378 */ 10379 static inline uint8_t mesh_subevent_configuration_gatt_proxy_get_gatt_proxy_state(const uint8_t * event){ 10380 return event[6]; 10381 } 10382 10383 /** 10384 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_RELAY 10385 * @param event packet 10386 * @return dest 10387 * @note: btstack_type 2 10388 */ 10389 static inline uint16_t mesh_subevent_configuration_relay_get_dest(const uint8_t * event){ 10390 return little_endian_read_16(event, 3); 10391 } 10392 /** 10393 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_RELAY 10394 * @param event packet 10395 * @return foundation_status 10396 * @note: btstack_type 1 10397 */ 10398 static inline uint8_t mesh_subevent_configuration_relay_get_foundation_status(const uint8_t * event){ 10399 return event[5]; 10400 } 10401 /** 10402 * @brief Get field relay from event MESH_SUBEVENT_CONFIGURATION_RELAY 10403 * @param event packet 10404 * @return relay 10405 * @note: btstack_type 1 10406 */ 10407 static inline uint8_t mesh_subevent_configuration_relay_get_relay(const uint8_t * event){ 10408 return event[6]; 10409 } 10410 /** 10411 * @brief Get field retransmit_count from event MESH_SUBEVENT_CONFIGURATION_RELAY 10412 * @param event packet 10413 * @return retransmit_count 10414 * @note: btstack_type 1 10415 */ 10416 static inline uint8_t mesh_subevent_configuration_relay_get_retransmit_count(const uint8_t * event){ 10417 return event[7]; 10418 } 10419 /** 10420 * @brief Get field retransmit_interval_ms from event MESH_SUBEVENT_CONFIGURATION_RELAY 10421 * @param event packet 10422 * @return retransmit_interval_ms 10423 * @note: btstack_type 1 10424 */ 10425 static inline uint8_t mesh_subevent_configuration_relay_get_retransmit_interval_ms(const uint8_t * event){ 10426 return event[8]; 10427 } 10428 10429 /** 10430 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10431 * @param event packet 10432 * @return dest 10433 * @note: btstack_type 2 10434 */ 10435 static inline uint16_t mesh_subevent_configuration_model_publication_get_dest(const uint8_t * event){ 10436 return little_endian_read_16(event, 3); 10437 } 10438 /** 10439 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10440 * @param event packet 10441 * @return foundation_status 10442 * @note: btstack_type 1 10443 */ 10444 static inline uint8_t mesh_subevent_configuration_model_publication_get_foundation_status(const uint8_t * event){ 10445 return event[5]; 10446 } 10447 /** 10448 * @brief Get field publish_address from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10449 * @param event packet 10450 * @return publish_address 10451 * @note: btstack_type 2 10452 */ 10453 static inline uint16_t mesh_subevent_configuration_model_publication_get_publish_address(const uint8_t * event){ 10454 return little_endian_read_16(event, 6); 10455 } 10456 /** 10457 * @brief Get field appkey_index from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10458 * @param event packet 10459 * @return appkey_index 10460 * @note: btstack_type 2 10461 */ 10462 static inline uint16_t mesh_subevent_configuration_model_publication_get_appkey_index(const uint8_t * event){ 10463 return little_endian_read_16(event, 8); 10464 } 10465 /** 10466 * @brief Get field credential_flag from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10467 * @param event packet 10468 * @return credential_flag 10469 * @note: btstack_type 1 10470 */ 10471 static inline uint8_t mesh_subevent_configuration_model_publication_get_credential_flag(const uint8_t * event){ 10472 return event[10]; 10473 } 10474 /** 10475 * @brief Get field publish_ttl from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10476 * @param event packet 10477 * @return publish_ttl 10478 * @note: btstack_type 1 10479 */ 10480 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_ttl(const uint8_t * event){ 10481 return event[11]; 10482 } 10483 /** 10484 * @brief Get field publish_period from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10485 * @param event packet 10486 * @return publish_period 10487 * @note: btstack_type 1 10488 */ 10489 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_period(const uint8_t * event){ 10490 return event[12]; 10491 } 10492 /** 10493 * @brief Get field publish_retransmit_count from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10494 * @param event packet 10495 * @return publish_retransmit_count 10496 * @note: btstack_type 1 10497 */ 10498 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_retransmit_count(const uint8_t * event){ 10499 return event[13]; 10500 } 10501 /** 10502 * @brief Get field publish_retransmit_interval_steps from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10503 * @param event packet 10504 * @return publish_retransmit_interval_steps 10505 * @note: btstack_type 1 10506 */ 10507 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_retransmit_interval_steps(const uint8_t * event){ 10508 return event[14]; 10509 } 10510 /** 10511 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 10512 * @param event packet 10513 * @return model_identifier 10514 * @note: btstack_type 4 10515 */ 10516 static inline uint32_t mesh_subevent_configuration_model_publication_get_model_identifier(const uint8_t * event){ 10517 return little_endian_read_32(event, 15); 10518 } 10519 10520 /** 10521 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 10522 * @param event packet 10523 * @return dest 10524 * @note: btstack_type 2 10525 */ 10526 static inline uint16_t mesh_subevent_configuration_model_subscription_get_dest(const uint8_t * event){ 10527 return little_endian_read_16(event, 3); 10528 } 10529 /** 10530 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 10531 * @param event packet 10532 * @return foundation_status 10533 * @note: btstack_type 1 10534 */ 10535 static inline uint8_t mesh_subevent_configuration_model_subscription_get_foundation_status(const uint8_t * event){ 10536 return event[5]; 10537 } 10538 /** 10539 * @brief Get field address from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 10540 * @param event packet 10541 * @return address 10542 * @note: btstack_type 2 10543 */ 10544 static inline uint16_t mesh_subevent_configuration_model_subscription_get_address(const uint8_t * event){ 10545 return little_endian_read_16(event, 6); 10546 } 10547 /** 10548 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 10549 * @param event packet 10550 * @return model_identifier 10551 * @note: btstack_type 4 10552 */ 10553 static inline uint32_t mesh_subevent_configuration_model_subscription_get_model_identifier(const uint8_t * event){ 10554 return little_endian_read_32(event, 8); 10555 } 10556 10557 /** 10558 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10559 * @param event packet 10560 * @return dest 10561 * @note: btstack_type 2 10562 */ 10563 static inline uint16_t mesh_subevent_configuration_model_subscription_list_item_get_dest(const uint8_t * event){ 10564 return little_endian_read_16(event, 3); 10565 } 10566 /** 10567 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10568 * @param event packet 10569 * @return foundation_status 10570 * @note: btstack_type 1 10571 */ 10572 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_foundation_status(const uint8_t * event){ 10573 return event[5]; 10574 } 10575 /** 10576 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10577 * @param event packet 10578 * @return model_identifier 10579 * @note: btstack_type 4 10580 */ 10581 static inline uint32_t mesh_subevent_configuration_model_subscription_list_item_get_model_identifier(const uint8_t * event){ 10582 return little_endian_read_32(event, 6); 10583 } 10584 /** 10585 * @brief Get field num_subscription_addresses from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10586 * @param event packet 10587 * @return num_subscription_addresses 10588 * @note: btstack_type 1 10589 */ 10590 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_num_subscription_addresses(const uint8_t * event){ 10591 return event[10]; 10592 } 10593 /** 10594 * @brief Get field subscription_address_pos from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10595 * @param event packet 10596 * @return subscription_address_pos 10597 * @note: btstack_type 1 10598 */ 10599 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_subscription_address_pos(const uint8_t * event){ 10600 return event[11]; 10601 } 10602 /** 10603 * @brief Get field subscription_address_item from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 10604 * @param event packet 10605 * @return subscription_address_item 10606 * @note: btstack_type 2 10607 */ 10608 static inline uint16_t mesh_subevent_configuration_model_subscription_list_item_get_subscription_address_item(const uint8_t * event){ 10609 return little_endian_read_16(event, 12); 10610 } 10611 10612 /** 10613 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX 10614 * @param event packet 10615 * @return dest 10616 * @note: btstack_type 2 10617 */ 10618 static inline uint16_t mesh_subevent_configuration_netkey_index_get_dest(const uint8_t * event){ 10619 return little_endian_read_16(event, 3); 10620 } 10621 /** 10622 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX 10623 * @param event packet 10624 * @return foundation_status 10625 * @note: btstack_type 1 10626 */ 10627 static inline uint8_t mesh_subevent_configuration_netkey_index_get_foundation_status(const uint8_t * event){ 10628 return event[5]; 10629 } 10630 10631 /** 10632 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 10633 * @param event packet 10634 * @return dest 10635 * @note: btstack_type 2 10636 */ 10637 static inline uint16_t mesh_subevent_configuration_netkey_index_list_item_get_dest(const uint8_t * event){ 10638 return little_endian_read_16(event, 3); 10639 } 10640 /** 10641 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 10642 * @param event packet 10643 * @return foundation_status 10644 * @note: btstack_type 1 10645 */ 10646 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_foundation_status(const uint8_t * event){ 10647 return event[5]; 10648 } 10649 /** 10650 * @brief Get field num_netkey_indexes from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 10651 * @param event packet 10652 * @return num_netkey_indexes 10653 * @note: btstack_type 1 10654 */ 10655 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_num_netkey_indexes(const uint8_t * event){ 10656 return event[6]; 10657 } 10658 /** 10659 * @brief Get field netkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 10660 * @param event packet 10661 * @return netkey_index_pos 10662 * @note: btstack_type 1 10663 */ 10664 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_netkey_index_pos(const uint8_t * event){ 10665 return event[7]; 10666 } 10667 /** 10668 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 10669 * @param event packet 10670 * @return netkey_index_item 10671 * @note: btstack_type 2 10672 */ 10673 static inline uint16_t mesh_subevent_configuration_netkey_index_list_item_get_netkey_index_item(const uint8_t * event){ 10674 return little_endian_read_16(event, 8); 10675 } 10676 10677 /** 10678 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 10679 * @param event packet 10680 * @return dest 10681 * @note: btstack_type 2 10682 */ 10683 static inline uint16_t mesh_subevent_configuration_appkey_index_get_dest(const uint8_t * event){ 10684 return little_endian_read_16(event, 3); 10685 } 10686 /** 10687 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 10688 * @param event packet 10689 * @return foundation_status 10690 * @note: btstack_type 1 10691 */ 10692 static inline uint8_t mesh_subevent_configuration_appkey_index_get_foundation_status(const uint8_t * event){ 10693 return event[5]; 10694 } 10695 /** 10696 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 10697 * @param event packet 10698 * @return netkey_index_item 10699 * @note: btstack_type 2 10700 */ 10701 static inline uint16_t mesh_subevent_configuration_appkey_index_get_netkey_index_item(const uint8_t * event){ 10702 return little_endian_read_16(event, 6); 10703 } 10704 /** 10705 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 10706 * @param event packet 10707 * @return appkey_index_item 10708 * @note: btstack_type 2 10709 */ 10710 static inline uint16_t mesh_subevent_configuration_appkey_index_get_appkey_index_item(const uint8_t * event){ 10711 return little_endian_read_16(event, 8); 10712 } 10713 10714 /** 10715 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10716 * @param event packet 10717 * @return dest 10718 * @note: btstack_type 2 10719 */ 10720 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_dest(const uint8_t * event){ 10721 return little_endian_read_16(event, 3); 10722 } 10723 /** 10724 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10725 * @param event packet 10726 * @return foundation_status 10727 * @note: btstack_type 1 10728 */ 10729 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_foundation_status(const uint8_t * event){ 10730 return event[5]; 10731 } 10732 /** 10733 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10734 * @param event packet 10735 * @return netkey_index 10736 * @note: btstack_type 2 10737 */ 10738 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_netkey_index(const uint8_t * event){ 10739 return little_endian_read_16(event, 6); 10740 } 10741 /** 10742 * @brief Get field num_appkey_indexes from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10743 * @param event packet 10744 * @return num_appkey_indexes 10745 * @note: btstack_type 1 10746 */ 10747 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_num_appkey_indexes(const uint8_t * event){ 10748 return event[8]; 10749 } 10750 /** 10751 * @brief Get field appkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10752 * @param event packet 10753 * @return appkey_index_pos 10754 * @note: btstack_type 1 10755 */ 10756 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_appkey_index_pos(const uint8_t * event){ 10757 return event[9]; 10758 } 10759 /** 10760 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10761 * @param event packet 10762 * @return netkey_index_item 10763 * @note: btstack_type 2 10764 */ 10765 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_netkey_index_item(const uint8_t * event){ 10766 return little_endian_read_16(event, 10); 10767 } 10768 /** 10769 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 10770 * @param event packet 10771 * @return appkey_index_item 10772 * @note: btstack_type 2 10773 */ 10774 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_appkey_index_item(const uint8_t * event){ 10775 return little_endian_read_16(event, 12); 10776 } 10777 10778 /** 10779 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 10780 * @param event packet 10781 * @return dest 10782 * @note: btstack_type 2 10783 */ 10784 static inline uint16_t mesh_subevent_configuration_node_identity_get_dest(const uint8_t * event){ 10785 return little_endian_read_16(event, 3); 10786 } 10787 /** 10788 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 10789 * @param event packet 10790 * @return foundation_status 10791 * @note: btstack_type 1 10792 */ 10793 static inline uint8_t mesh_subevent_configuration_node_identity_get_foundation_status(const uint8_t * event){ 10794 return event[5]; 10795 } 10796 /** 10797 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 10798 * @param event packet 10799 * @return netkey_index_item 10800 * @note: btstack_type 2 10801 */ 10802 static inline uint16_t mesh_subevent_configuration_node_identity_get_netkey_index_item(const uint8_t * event){ 10803 return little_endian_read_16(event, 6); 10804 } 10805 /** 10806 * @brief Get field identity_status from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 10807 * @param event packet 10808 * @return identity_status 10809 * @note: btstack_type 1 10810 */ 10811 static inline uint8_t mesh_subevent_configuration_node_identity_get_identity_status(const uint8_t * event){ 10812 return event[8]; 10813 } 10814 10815 /** 10816 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 10817 * @param event packet 10818 * @return dest 10819 * @note: btstack_type 2 10820 */ 10821 static inline uint16_t mesh_subevent_configuration_model_app_get_dest(const uint8_t * event){ 10822 return little_endian_read_16(event, 3); 10823 } 10824 /** 10825 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 10826 * @param event packet 10827 * @return foundation_status 10828 * @note: btstack_type 1 10829 */ 10830 static inline uint8_t mesh_subevent_configuration_model_app_get_foundation_status(const uint8_t * event){ 10831 return event[5]; 10832 } 10833 /** 10834 * @brief Get field appkey_index from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 10835 * @param event packet 10836 * @return appkey_index 10837 * @note: btstack_type 2 10838 */ 10839 static inline uint16_t mesh_subevent_configuration_model_app_get_appkey_index(const uint8_t * event){ 10840 return little_endian_read_16(event, 6); 10841 } 10842 /** 10843 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 10844 * @param event packet 10845 * @return model_identifier 10846 * @note: btstack_type 4 10847 */ 10848 static inline uint32_t mesh_subevent_configuration_model_app_get_model_identifier(const uint8_t * event){ 10849 return little_endian_read_32(event, 8); 10850 } 10851 10852 /** 10853 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10854 * @param event packet 10855 * @return dest 10856 * @note: btstack_type 2 10857 */ 10858 static inline uint16_t mesh_subevent_configuration_model_app_list_item_get_dest(const uint8_t * event){ 10859 return little_endian_read_16(event, 3); 10860 } 10861 /** 10862 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10863 * @param event packet 10864 * @return foundation_status 10865 * @note: btstack_type 1 10866 */ 10867 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_foundation_status(const uint8_t * event){ 10868 return event[5]; 10869 } 10870 /** 10871 * @brief Get field model_id from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10872 * @param event packet 10873 * @return model_id 10874 * @note: btstack_type 4 10875 */ 10876 static inline uint32_t mesh_subevent_configuration_model_app_list_item_get_model_id(const uint8_t * event){ 10877 return little_endian_read_32(event, 6); 10878 } 10879 /** 10880 * @brief Get field num_appkey_indexes from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10881 * @param event packet 10882 * @return num_appkey_indexes 10883 * @note: btstack_type 1 10884 */ 10885 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_num_appkey_indexes(const uint8_t * event){ 10886 return event[10]; 10887 } 10888 /** 10889 * @brief Get field appkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10890 * @param event packet 10891 * @return appkey_index_pos 10892 * @note: btstack_type 1 10893 */ 10894 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_appkey_index_pos(const uint8_t * event){ 10895 return event[11]; 10896 } 10897 /** 10898 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 10899 * @param event packet 10900 * @return appkey_index_item 10901 * @note: btstack_type 2 10902 */ 10903 static inline uint16_t mesh_subevent_configuration_model_app_list_item_get_appkey_index_item(const uint8_t * event){ 10904 return little_endian_read_16(event, 12); 10905 } 10906 10907 /** 10908 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NODE_RESET 10909 * @param event packet 10910 * @return dest 10911 * @note: btstack_type 2 10912 */ 10913 static inline uint16_t mesh_subevent_configuration_node_reset_get_dest(const uint8_t * event){ 10914 return little_endian_read_16(event, 3); 10915 } 10916 /** 10917 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NODE_RESET 10918 * @param event packet 10919 * @return foundation_status 10920 * @note: btstack_type 1 10921 */ 10922 static inline uint8_t mesh_subevent_configuration_node_reset_get_foundation_status(const uint8_t * event){ 10923 return event[5]; 10924 } 10925 10926 /** 10927 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_FRIEND 10928 * @param event packet 10929 * @return dest 10930 * @note: btstack_type 2 10931 */ 10932 static inline uint16_t mesh_subevent_configuration_friend_get_dest(const uint8_t * event){ 10933 return little_endian_read_16(event, 3); 10934 } 10935 /** 10936 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_FRIEND 10937 * @param event packet 10938 * @return foundation_status 10939 * @note: btstack_type 1 10940 */ 10941 static inline uint8_t mesh_subevent_configuration_friend_get_foundation_status(const uint8_t * event){ 10942 return event[5]; 10943 } 10944 /** 10945 * @brief Get field friend_state from event MESH_SUBEVENT_CONFIGURATION_FRIEND 10946 * @param event packet 10947 * @return friend_state 10948 * @note: btstack_type 1 10949 */ 10950 static inline uint8_t mesh_subevent_configuration_friend_get_friend_state(const uint8_t * event){ 10951 return event[6]; 10952 } 10953 10954 /** 10955 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 10956 * @param event packet 10957 * @return dest 10958 * @note: btstack_type 2 10959 */ 10960 static inline uint16_t mesh_subevent_configuration_key_refresh_phase_get_dest(const uint8_t * event){ 10961 return little_endian_read_16(event, 3); 10962 } 10963 /** 10964 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 10965 * @param event packet 10966 * @return foundation_status 10967 * @note: btstack_type 1 10968 */ 10969 static inline uint8_t mesh_subevent_configuration_key_refresh_phase_get_foundation_status(const uint8_t * event){ 10970 return event[5]; 10971 } 10972 /** 10973 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 10974 * @param event packet 10975 * @return netkey_index 10976 * @note: btstack_type 2 10977 */ 10978 static inline uint16_t mesh_subevent_configuration_key_refresh_phase_get_netkey_index(const uint8_t * event){ 10979 return little_endian_read_16(event, 6); 10980 } 10981 /** 10982 * @brief Get field phase from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 10983 * @param event packet 10984 * @return phase 10985 * @note: btstack_type 1 10986 */ 10987 static inline uint8_t mesh_subevent_configuration_key_refresh_phase_get_phase(const uint8_t * event){ 10988 return event[8]; 10989 } 10990 10991 /** 10992 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 10993 * @param event packet 10994 * @return dest 10995 * @note: btstack_type 2 10996 */ 10997 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_dest(const uint8_t * event){ 10998 return little_endian_read_16(event, 3); 10999 } 11000 /** 11001 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11002 * @param event packet 11003 * @return foundation_status 11004 * @note: btstack_type 1 11005 */ 11006 static inline uint8_t mesh_subevent_configuration_heartbeat_publication_get_foundation_status(const uint8_t * event){ 11007 return event[5]; 11008 } 11009 /** 11010 * @brief Get field heartbeat_destination from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11011 * @param event packet 11012 * @return heartbeat_destination 11013 * @note: btstack_type 2 11014 */ 11015 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_heartbeat_destination(const uint8_t * event){ 11016 return little_endian_read_16(event, 6); 11017 } 11018 /** 11019 * @brief Get field count_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11020 * @param event packet 11021 * @return count_S 11022 * @note: btstack_type 2 11023 */ 11024 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_count_S(const uint8_t * event){ 11025 return little_endian_read_16(event, 8); 11026 } 11027 /** 11028 * @brief Get field period_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11029 * @param event packet 11030 * @return period_S 11031 * @note: btstack_type 2 11032 */ 11033 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_period_S(const uint8_t * event){ 11034 return little_endian_read_16(event, 10); 11035 } 11036 /** 11037 * @brief Get field ttl from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11038 * @param event packet 11039 * @return ttl 11040 * @note: btstack_type 1 11041 */ 11042 static inline uint8_t mesh_subevent_configuration_heartbeat_publication_get_ttl(const uint8_t * event){ 11043 return event[12]; 11044 } 11045 /** 11046 * @brief Get field features from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11047 * @param event packet 11048 * @return features 11049 * @note: btstack_type 2 11050 */ 11051 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_features(const uint8_t * event){ 11052 return little_endian_read_16(event, 13); 11053 } 11054 /** 11055 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 11056 * @param event packet 11057 * @return netkey_index 11058 * @note: btstack_type 2 11059 */ 11060 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_netkey_index(const uint8_t * event){ 11061 return little_endian_read_16(event, 15); 11062 } 11063 11064 /** 11065 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11066 * @param event packet 11067 * @return dest 11068 * @note: btstack_type 2 11069 */ 11070 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_dest(const uint8_t * event){ 11071 return little_endian_read_16(event, 3); 11072 } 11073 /** 11074 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11075 * @param event packet 11076 * @return foundation_status 11077 * @note: btstack_type 1 11078 */ 11079 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_foundation_status(const uint8_t * event){ 11080 return event[5]; 11081 } 11082 /** 11083 * @brief Get field heartbeat_destination from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11084 * @param event packet 11085 * @return heartbeat_destination 11086 * @note: btstack_type 2 11087 */ 11088 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_heartbeat_destination(const uint8_t * event){ 11089 return little_endian_read_16(event, 6); 11090 } 11091 /** 11092 * @brief Get field heartbeat_source from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11093 * @param event packet 11094 * @return heartbeat_source 11095 * @note: btstack_type 2 11096 */ 11097 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_heartbeat_source(const uint8_t * event){ 11098 return little_endian_read_16(event, 8); 11099 } 11100 /** 11101 * @brief Get field count_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11102 * @param event packet 11103 * @return count_S 11104 * @note: btstack_type 2 11105 */ 11106 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_count_S(const uint8_t * event){ 11107 return little_endian_read_16(event, 10); 11108 } 11109 /** 11110 * @brief Get field period_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11111 * @param event packet 11112 * @return period_S 11113 * @note: btstack_type 2 11114 */ 11115 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_period_S(const uint8_t * event){ 11116 return little_endian_read_16(event, 12); 11117 } 11118 /** 11119 * @brief Get field min_hops from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11120 * @param event packet 11121 * @return min_hops 11122 * @note: btstack_type 1 11123 */ 11124 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_min_hops(const uint8_t * event){ 11125 return event[14]; 11126 } 11127 /** 11128 * @brief Get field max_hops from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 11129 * @param event packet 11130 * @return max_hops 11131 * @note: btstack_type 1 11132 */ 11133 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_max_hops(const uint8_t * event){ 11134 return event[15]; 11135 } 11136 11137 /** 11138 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 11139 * @param event packet 11140 * @return dest 11141 * @note: btstack_type 2 11142 */ 11143 static inline uint16_t mesh_subevent_configuration_low_power_node_poll_timeout_get_dest(const uint8_t * event){ 11144 return little_endian_read_16(event, 3); 11145 } 11146 /** 11147 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 11148 * @param event packet 11149 * @return foundation_status 11150 * @note: btstack_type 1 11151 */ 11152 static inline uint8_t mesh_subevent_configuration_low_power_node_poll_timeout_get_foundation_status(const uint8_t * event){ 11153 return event[5]; 11154 } 11155 /** 11156 * @brief Get field lpn_address from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 11157 * @param event packet 11158 * @return lpn_address 11159 * @note: btstack_type 2 11160 */ 11161 static inline uint16_t mesh_subevent_configuration_low_power_node_poll_timeout_get_lpn_address(const uint8_t * event){ 11162 return little_endian_read_16(event, 6); 11163 } 11164 /** 11165 * @brief Get field poll_timeout from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 11166 * @param event packet 11167 * @return poll_timeout 11168 * @note: btstack_type 3 11169 */ 11170 static inline uint32_t mesh_subevent_configuration_low_power_node_poll_timeout_get_poll_timeout(const uint8_t * event){ 11171 return little_endian_read_24(event, 8); 11172 } 11173 11174 /** 11175 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 11176 * @param event packet 11177 * @return dest 11178 * @note: btstack_type 2 11179 */ 11180 static inline uint16_t mesh_subevent_configuration_network_transmit_get_dest(const uint8_t * event){ 11181 return little_endian_read_16(event, 3); 11182 } 11183 /** 11184 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 11185 * @param event packet 11186 * @return foundation_status 11187 * @note: btstack_type 1 11188 */ 11189 static inline uint8_t mesh_subevent_configuration_network_transmit_get_foundation_status(const uint8_t * event){ 11190 return event[5]; 11191 } 11192 /** 11193 * @brief Get field transmit_count from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 11194 * @param event packet 11195 * @return transmit_count 11196 * @note: btstack_type 1 11197 */ 11198 static inline uint8_t mesh_subevent_configuration_network_transmit_get_transmit_count(const uint8_t * event){ 11199 return event[6]; 11200 } 11201 /** 11202 * @brief Get field transmit_interval_steps_ms from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 11203 * @param event packet 11204 * @return transmit_interval_steps_ms 11205 * @note: btstack_type 2 11206 */ 11207 static inline uint16_t mesh_subevent_configuration_network_transmit_get_transmit_interval_steps_ms(const uint8_t * event){ 11208 return little_endian_read_16(event, 7); 11209 } 11210 11211 11212 11213 /* API_END */ 11214 11215 #if defined __cplusplus 11216 } 11217 #endif 11218 11219 #endif // BTSTACK_EVENT_H 11220