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