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