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