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 status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 4156 * @param event packet 4157 * @return status 4158 * @note: btstack_type 1 4159 */ 4160 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){ 4161 return event[3]; 4162 } 4163 4164 /** 4165 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 4166 * @param event packet 4167 * @return status 4168 * @note: btstack_type 1 4169 */ 4170 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){ 4171 return event[3]; 4172 } 4173 4174 /** 4175 * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 4176 * @param event packet 4177 * @return status 4178 * @note: btstack_type 1 4179 */ 4180 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){ 4181 return event[3]; 4182 } 4183 /** 4184 * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 4185 * @param event packet 4186 * @return handle 4187 * @note: btstack_type H 4188 */ 4189 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){ 4190 return little_endian_read_16(event, 4); 4191 } 4192 4193 /** 4194 * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 4195 * @param event packet 4196 * @return status 4197 * @note: btstack_type 1 4198 */ 4199 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){ 4200 return event[3]; 4201 } 4202 4203 4204 /** 4205 * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 4206 * @param event packet 4207 * @return gain 4208 * @note: btstack_type 1 4209 */ 4210 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){ 4211 return event[3]; 4212 } 4213 4214 /** 4215 * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 4216 * @param event packet 4217 * @return gain 4218 * @note: btstack_type 1 4219 */ 4220 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){ 4221 return event[3]; 4222 } 4223 4224 /** 4225 * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND 4226 * @param event packet 4227 * @return value_length 4228 * @note: btstack_type J 4229 */ 4230 static inline uint8_t hsp_subevent_hs_command_get_value_length(const uint8_t * event){ 4231 return event[3]; 4232 } 4233 /** 4234 * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND 4235 * @param event packet 4236 * @return value 4237 * @note: btstack_type V 4238 */ 4239 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){ 4240 return &event[4]; 4241 } 4242 4243 /** 4244 * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION 4245 * @param event packet 4246 * @return value_length 4247 * @note: btstack_type J 4248 */ 4249 static inline uint8_t hsp_subevent_ag_indication_get_value_length(const uint8_t * event){ 4250 return event[3]; 4251 } 4252 /** 4253 * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION 4254 * @param event packet 4255 * @return value 4256 * @note: btstack_type V 4257 */ 4258 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){ 4259 return &event[4]; 4260 } 4261 4262 4263 /** 4264 * @brief Get field acl_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 4265 * @param event packet 4266 * @return acl_handle 4267 * @note: btstack_type H 4268 */ 4269 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_acl_handle(const uint8_t * event){ 4270 return little_endian_read_16(event, 3); 4271 } 4272 /** 4273 * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 4274 * @param event packet 4275 * @return status 4276 * @note: btstack_type 1 4277 */ 4278 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){ 4279 return event[5]; 4280 } 4281 /** 4282 * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 4283 * @param event packet 4284 * @param Pointer to storage for bd_addr 4285 * @note: btstack_type B 4286 */ 4287 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4288 reverse_bytes(&event[6], bd_addr, 6); 4289 } 4290 4291 /** 4292 * @brief Get field acl_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 4293 * @param event packet 4294 * @return acl_handle 4295 * @note: btstack_type H 4296 */ 4297 static inline hci_con_handle_t hfp_subevent_service_level_connection_released_get_acl_handle(const uint8_t * event){ 4298 return little_endian_read_16(event, 3); 4299 } 4300 4301 /** 4302 * @brief Get field acl_handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4303 * @param event packet 4304 * @return acl_handle 4305 * @note: btstack_type H 4306 */ 4307 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_acl_handle(const uint8_t * event){ 4308 return little_endian_read_16(event, 3); 4309 } 4310 /** 4311 * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4312 * @param event packet 4313 * @return status 4314 * @note: btstack_type 1 4315 */ 4316 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ 4317 return event[5]; 4318 } 4319 /** 4320 * @brief Get field sco_handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4321 * @param event packet 4322 * @return sco_handle 4323 * @note: btstack_type H 4324 */ 4325 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_sco_handle(const uint8_t * event){ 4326 return little_endian_read_16(event, 6); 4327 } 4328 /** 4329 * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4330 * @param event packet 4331 * @param Pointer to storage for bd_addr 4332 * @note: btstack_type B 4333 */ 4334 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4335 reverse_bytes(&event[8], bd_addr, 6); 4336 } 4337 /** 4338 * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 4339 * @param event packet 4340 * @return negotiated_codec 4341 * @note: btstack_type 1 4342 */ 4343 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){ 4344 return event[14]; 4345 } 4346 4347 /** 4348 * @brief Get field acl_handle from event HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 4349 * @param event packet 4350 * @return acl_handle 4351 * @note: btstack_type H 4352 */ 4353 static inline hci_con_handle_t hfp_subevent_audio_connection_released_get_acl_handle(const uint8_t * event){ 4354 return little_endian_read_16(event, 3); 4355 } 4356 /** 4357 * @brief Get field sco_handle from event HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 4358 * @param event packet 4359 * @return sco_handle 4360 * @note: btstack_type H 4361 */ 4362 static inline hci_con_handle_t hfp_subevent_audio_connection_released_get_sco_handle(const uint8_t * event){ 4363 return little_endian_read_16(event, 5); 4364 } 4365 4366 /** 4367 * @brief Get field acl_handle from event HFP_SUBEVENT_COMPLETE 4368 * @param event packet 4369 * @return acl_handle 4370 * @note: btstack_type H 4371 */ 4372 static inline hci_con_handle_t hfp_subevent_complete_get_acl_handle(const uint8_t * event){ 4373 return little_endian_read_16(event, 3); 4374 } 4375 /** 4376 * @brief Get field status from event HFP_SUBEVENT_COMPLETE 4377 * @param event packet 4378 * @return status 4379 * @note: btstack_type 1 4380 */ 4381 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){ 4382 return event[5]; 4383 } 4384 4385 /** 4386 * @brief Get field acl_handle from event HFP_SUBEVENT_AG_INDICATOR_MAPPING 4387 * @param event packet 4388 * @return acl_handle 4389 * @note: btstack_type H 4390 */ 4391 static inline hci_con_handle_t hfp_subevent_ag_indicator_mapping_get_acl_handle(const uint8_t * event){ 4392 return little_endian_read_16(event, 3); 4393 } 4394 /** 4395 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_MAPPING 4396 * @param event packet 4397 * @return indicator_index 4398 * @note: btstack_type 1 4399 */ 4400 static inline uint8_t hfp_subevent_ag_indicator_mapping_get_indicator_index(const uint8_t * event){ 4401 return event[5]; 4402 } 4403 /** 4404 * @brief Get field indicator_min_range from event HFP_SUBEVENT_AG_INDICATOR_MAPPING 4405 * @param event packet 4406 * @return indicator_min_range 4407 * @note: btstack_type 1 4408 */ 4409 static inline uint8_t hfp_subevent_ag_indicator_mapping_get_indicator_min_range(const uint8_t * event){ 4410 return event[6]; 4411 } 4412 /** 4413 * @brief Get field indicator_max_range from event HFP_SUBEVENT_AG_INDICATOR_MAPPING 4414 * @param event packet 4415 * @return indicator_max_range 4416 * @note: btstack_type 1 4417 */ 4418 static inline uint8_t hfp_subevent_ag_indicator_mapping_get_indicator_max_range(const uint8_t * event){ 4419 return event[7]; 4420 } 4421 /** 4422 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_MAPPING 4423 * @param event packet 4424 * @return indicator_name 4425 * @note: btstack_type T 4426 */ 4427 static inline const char * hfp_subevent_ag_indicator_mapping_get_indicator_name(const uint8_t * event){ 4428 return (const char *) &event[8]; 4429 } 4430 4431 /** 4432 * @brief Get field acl_handle from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4433 * @param event packet 4434 * @return acl_handle 4435 * @note: btstack_type H 4436 */ 4437 static inline hci_con_handle_t hfp_subevent_ag_indicator_status_changed_get_acl_handle(const uint8_t * event){ 4438 return little_endian_read_16(event, 3); 4439 } 4440 /** 4441 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4442 * @param event packet 4443 * @return indicator_index 4444 * @note: btstack_type 1 4445 */ 4446 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){ 4447 return event[5]; 4448 } 4449 /** 4450 * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4451 * @param event packet 4452 * @return indicator_status 4453 * @note: btstack_type 1 4454 */ 4455 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){ 4456 return event[6]; 4457 } 4458 /** 4459 * @brief Get field indicator_min_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4460 * @param event packet 4461 * @return indicator_min_range 4462 * @note: btstack_type 1 4463 */ 4464 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_min_range(const uint8_t * event){ 4465 return event[7]; 4466 } 4467 /** 4468 * @brief Get field indicator_max_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4469 * @param event packet 4470 * @return indicator_max_range 4471 * @note: btstack_type 1 4472 */ 4473 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_max_range(const uint8_t * event){ 4474 return event[8]; 4475 } 4476 /** 4477 * @brief Get field indicator_mandatory from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4478 * @param event packet 4479 * @return indicator_mandatory 4480 * @note: btstack_type 1 4481 */ 4482 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_mandatory(const uint8_t * event){ 4483 return event[9]; 4484 } 4485 /** 4486 * @brief Get field indicator_enabled from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4487 * @param event packet 4488 * @return indicator_enabled 4489 * @note: btstack_type 1 4490 */ 4491 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_enabled(const uint8_t * event){ 4492 return event[10]; 4493 } 4494 /** 4495 * @brief Get field indicator_status_changed from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4496 * @param event packet 4497 * @return indicator_status_changed 4498 * @note: btstack_type 1 4499 */ 4500 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status_changed(const uint8_t * event){ 4501 return event[11]; 4502 } 4503 /** 4504 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 4505 * @param event packet 4506 * @return indicator_name 4507 * @note: btstack_type T 4508 */ 4509 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){ 4510 return (const char *) &event[12]; 4511 } 4512 4513 /** 4514 * @brief Get field acl_handle from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4515 * @param event packet 4516 * @return acl_handle 4517 * @note: btstack_type H 4518 */ 4519 static inline hci_con_handle_t hfp_subevent_network_operator_changed_get_acl_handle(const uint8_t * event){ 4520 return little_endian_read_16(event, 3); 4521 } 4522 /** 4523 * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4524 * @param event packet 4525 * @return network_operator_mode 4526 * @note: btstack_type 1 4527 */ 4528 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){ 4529 return event[5]; 4530 } 4531 /** 4532 * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4533 * @param event packet 4534 * @return network_operator_format 4535 * @note: btstack_type 1 4536 */ 4537 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){ 4538 return event[6]; 4539 } 4540 /** 4541 * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 4542 * @param event packet 4543 * @return network_operator_name 4544 * @note: btstack_type T 4545 */ 4546 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){ 4547 return (const char *) &event[7]; 4548 } 4549 4550 /** 4551 * @brief Get field acl_handle from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 4552 * @param event packet 4553 * @return acl_handle 4554 * @note: btstack_type H 4555 */ 4556 static inline hci_con_handle_t hfp_subevent_extended_audio_gateway_error_get_acl_handle(const uint8_t * event){ 4557 return little_endian_read_16(event, 3); 4558 } 4559 /** 4560 * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 4561 * @param event packet 4562 * @return error 4563 * @note: btstack_type 1 4564 */ 4565 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){ 4566 return event[5]; 4567 } 4568 4569 /** 4570 * @brief Get field acl_handle from event HFP_SUBEVENT_START_RINGING 4571 * @param event packet 4572 * @return acl_handle 4573 * @note: btstack_type H 4574 */ 4575 static inline hci_con_handle_t hfp_subevent_start_ringing_get_acl_handle(const uint8_t * event){ 4576 return little_endian_read_16(event, 3); 4577 } 4578 4579 /** 4580 * @brief Get field acl_handle from event HFP_SUBEVENT_RING 4581 * @param event packet 4582 * @return acl_handle 4583 * @note: btstack_type H 4584 */ 4585 static inline hci_con_handle_t hfp_subevent_ring_get_acl_handle(const uint8_t * event){ 4586 return little_endian_read_16(event, 3); 4587 } 4588 4589 /** 4590 * @brief Get field acl_handle from event HFP_SUBEVENT_STOP_RINGING 4591 * @param event packet 4592 * @return acl_handle 4593 * @note: btstack_type H 4594 */ 4595 static inline hci_con_handle_t hfp_subevent_stop_ringing_get_acl_handle(const uint8_t * event){ 4596 return little_endian_read_16(event, 3); 4597 } 4598 4599 /** 4600 * @brief Get field acl_handle from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 4601 * @param event packet 4602 * @return acl_handle 4603 * @note: btstack_type H 4604 */ 4605 static inline hci_con_handle_t hfp_subevent_place_call_with_number_get_acl_handle(const uint8_t * event){ 4606 return little_endian_read_16(event, 3); 4607 } 4608 /** 4609 * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 4610 * @param event packet 4611 * @return number 4612 * @note: btstack_type T 4613 */ 4614 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){ 4615 return (const char *) &event[5]; 4616 } 4617 4618 /** 4619 * @brief Get field acl_handle from event HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 4620 * @param event packet 4621 * @return acl_handle 4622 * @note: btstack_type H 4623 */ 4624 static inline hci_con_handle_t hfp_subevent_attach_number_to_voice_tag_get_acl_handle(const uint8_t * event){ 4625 return little_endian_read_16(event, 3); 4626 } 4627 4628 /** 4629 * @brief Get field acl_handle from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 4630 * @param event packet 4631 * @return acl_handle 4632 * @note: btstack_type H 4633 */ 4634 static inline hci_con_handle_t hfp_subevent_number_for_voice_tag_get_acl_handle(const uint8_t * event){ 4635 return little_endian_read_16(event, 3); 4636 } 4637 /** 4638 * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 4639 * @param event packet 4640 * @return number 4641 * @note: btstack_type T 4642 */ 4643 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){ 4644 return (const char *) &event[5]; 4645 } 4646 4647 /** 4648 * @brief Get field acl_handle from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 4649 * @param event packet 4650 * @return acl_handle 4651 * @note: btstack_type H 4652 */ 4653 static inline hci_con_handle_t hfp_subevent_transmit_dtmf_codes_get_acl_handle(const uint8_t * event){ 4654 return little_endian_read_16(event, 3); 4655 } 4656 /** 4657 * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 4658 * @param event packet 4659 * @return dtmf 4660 * @note: btstack_type T 4661 */ 4662 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){ 4663 return (const char *) &event[5]; 4664 } 4665 4666 /** 4667 * @brief Get field acl_handle from event HFP_SUBEVENT_CALL_ANSWERED 4668 * @param event packet 4669 * @return acl_handle 4670 * @note: btstack_type H 4671 */ 4672 static inline hci_con_handle_t hfp_subevent_call_answered_get_acl_handle(const uint8_t * event){ 4673 return little_endian_read_16(event, 3); 4674 } 4675 4676 /** 4677 * @brief Get field acl_handle from event HFP_SUBEVENT_CALL_TERMINATED 4678 * @param event packet 4679 * @return acl_handle 4680 * @note: btstack_type H 4681 */ 4682 static inline hci_con_handle_t hfp_subevent_call_terminated_get_acl_handle(const uint8_t * event){ 4683 return little_endian_read_16(event, 3); 4684 } 4685 4686 /** 4687 * @brief Get field acl_handle from event HFP_SUBEVENT_CONFERENCE_CALL 4688 * @param event packet 4689 * @return acl_handle 4690 * @note: btstack_type H 4691 */ 4692 static inline hci_con_handle_t hfp_subevent_conference_call_get_acl_handle(const uint8_t * event){ 4693 return little_endian_read_16(event, 3); 4694 } 4695 4696 /** 4697 * @brief Get field acl_handle from event HFP_SUBEVENT_SPEAKER_VOLUME 4698 * @param event packet 4699 * @return acl_handle 4700 * @note: btstack_type H 4701 */ 4702 static inline hci_con_handle_t hfp_subevent_speaker_volume_get_acl_handle(const uint8_t * event){ 4703 return little_endian_read_16(event, 3); 4704 } 4705 /** 4706 * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME 4707 * @param event packet 4708 * @return gain 4709 * @note: btstack_type 1 4710 */ 4711 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){ 4712 return event[5]; 4713 } 4714 4715 /** 4716 * @brief Get field acl_handle from event HFP_SUBEVENT_MICROPHONE_VOLUME 4717 * @param event packet 4718 * @return acl_handle 4719 * @note: btstack_type H 4720 */ 4721 static inline hci_con_handle_t hfp_subevent_microphone_volume_get_acl_handle(const uint8_t * event){ 4722 return little_endian_read_16(event, 3); 4723 } 4724 /** 4725 * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME 4726 * @param event packet 4727 * @return gain 4728 * @note: btstack_type 1 4729 */ 4730 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){ 4731 return event[5]; 4732 } 4733 4734 /** 4735 * @brief Get field acl_handle from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4736 * @param event packet 4737 * @return acl_handle 4738 * @note: btstack_type H 4739 */ 4740 static inline hci_con_handle_t hfp_subevent_call_waiting_notification_get_acl_handle(const uint8_t * event){ 4741 return little_endian_read_16(event, 3); 4742 } 4743 /** 4744 * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4745 * @param event packet 4746 * @return type 4747 * @note: btstack_type 1 4748 */ 4749 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){ 4750 return event[5]; 4751 } 4752 /** 4753 * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4754 * @param event packet 4755 * @return number 4756 * @note: btstack_type T 4757 */ 4758 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){ 4759 return (const char *) &event[6]; 4760 } 4761 4762 /** 4763 * @brief Get field acl_handle from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4764 * @param event packet 4765 * @return acl_handle 4766 * @note: btstack_type H 4767 */ 4768 static inline hci_con_handle_t hfp_subevent_calling_line_identification_notification_get_acl_handle(const uint8_t * event){ 4769 return little_endian_read_16(event, 3); 4770 } 4771 /** 4772 * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4773 * @param event packet 4774 * @return type 4775 * @note: btstack_type 1 4776 */ 4777 static inline uint8_t hfp_subevent_calling_line_identification_notification_get_type(const uint8_t * event){ 4778 return event[5]; 4779 } 4780 /** 4781 * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4782 * @param event packet 4783 * @return number 4784 * @note: btstack_type T 4785 */ 4786 static inline const char * hfp_subevent_calling_line_identification_notification_get_number(const uint8_t * event){ 4787 return (const char *) &event[6]; 4788 } 4789 4790 /** 4791 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4792 * @param event packet 4793 * @return acl_handle 4794 * @note: btstack_type H 4795 */ 4796 static inline hci_con_handle_t hfp_subevent_enhanced_call_status_get_acl_handle(const uint8_t * event){ 4797 return little_endian_read_16(event, 3); 4798 } 4799 /** 4800 * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4801 * @param event packet 4802 * @return clcc_idx 4803 * @note: btstack_type 1 4804 */ 4805 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){ 4806 return event[5]; 4807 } 4808 /** 4809 * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4810 * @param event packet 4811 * @return clcc_dir 4812 * @note: btstack_type 1 4813 */ 4814 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){ 4815 return event[6]; 4816 } 4817 /** 4818 * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4819 * @param event packet 4820 * @return clcc_status 4821 * @note: btstack_type 1 4822 */ 4823 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){ 4824 return event[7]; 4825 } 4826 /** 4827 * @brief Get field clcc_mode from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4828 * @param event packet 4829 * @return clcc_mode 4830 * @note: btstack_type 1 4831 */ 4832 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mode(const uint8_t * event){ 4833 return event[8]; 4834 } 4835 /** 4836 * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4837 * @param event packet 4838 * @return clcc_mpty 4839 * @note: btstack_type 1 4840 */ 4841 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 4842 return event[9]; 4843 } 4844 /** 4845 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4846 * @param event packet 4847 * @return bnip_type 4848 * @note: btstack_type 1 4849 */ 4850 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 4851 return event[10]; 4852 } 4853 /** 4854 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4855 * @param event packet 4856 * @return bnip_number 4857 * @note: btstack_type T 4858 */ 4859 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 4860 return (const char *) &event[11]; 4861 } 4862 4863 /** 4864 * @brief Get field acl_handle from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4865 * @param event packet 4866 * @return acl_handle 4867 * @note: btstack_type H 4868 */ 4869 static inline hci_con_handle_t hfp_subevent_subscriber_number_information_get_acl_handle(const uint8_t * event){ 4870 return little_endian_read_16(event, 3); 4871 } 4872 /** 4873 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4874 * @param event packet 4875 * @return status 4876 * @note: btstack_type 1 4877 */ 4878 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 4879 return event[5]; 4880 } 4881 /** 4882 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4883 * @param event packet 4884 * @return bnip_type 4885 * @note: btstack_type 1 4886 */ 4887 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 4888 return event[6]; 4889 } 4890 /** 4891 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4892 * @param event packet 4893 * @return bnip_number 4894 * @note: btstack_type T 4895 */ 4896 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 4897 return (const char *) &event[7]; 4898 } 4899 4900 /** 4901 * @brief Get field acl_handle from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 4902 * @param event packet 4903 * @return acl_handle 4904 * @note: btstack_type H 4905 */ 4906 static inline hci_con_handle_t hfp_subevent_response_and_hold_status_get_acl_handle(const uint8_t * event){ 4907 return little_endian_read_16(event, 3); 4908 } 4909 /** 4910 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 4911 * @param event packet 4912 * @return value 4913 * @note: btstack_type T 4914 */ 4915 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 4916 return (const char *) &event[5]; 4917 } 4918 4919 /** 4920 * @brief Get field acl_handle from event HFP_SUBEVENT_AT_MESSAGE_SENT 4921 * @param event packet 4922 * @return acl_handle 4923 * @note: btstack_type H 4924 */ 4925 static inline hci_con_handle_t hfp_subevent_at_message_sent_get_acl_handle(const uint8_t * event){ 4926 return little_endian_read_16(event, 3); 4927 } 4928 /** 4929 * @brief Get field command from event HFP_SUBEVENT_AT_MESSAGE_SENT 4930 * @param event packet 4931 * @return command 4932 * @note: btstack_type T 4933 */ 4934 static inline const char * hfp_subevent_at_message_sent_get_command(const uint8_t * event){ 4935 return (const char *) &event[5]; 4936 } 4937 4938 /** 4939 * @brief Get field acl_handle from event HFP_SUBEVENT_AT_MESSAGE_RECEIVED 4940 * @param event packet 4941 * @return acl_handle 4942 * @note: btstack_type H 4943 */ 4944 static inline hci_con_handle_t hfp_subevent_at_message_received_get_acl_handle(const uint8_t * event){ 4945 return little_endian_read_16(event, 3); 4946 } 4947 /** 4948 * @brief Get field command from event HFP_SUBEVENT_AT_MESSAGE_RECEIVED 4949 * @param event packet 4950 * @return command 4951 * @note: btstack_type T 4952 */ 4953 static inline const char * hfp_subevent_at_message_received_get_command(const uint8_t * event){ 4954 return (const char *) &event[5]; 4955 } 4956 4957 /** 4958 * @brief Get field acl_handle from event HFP_SUBEVENT_IN_BAND_RING_TONE 4959 * @param event packet 4960 * @return acl_handle 4961 * @note: btstack_type H 4962 */ 4963 static inline hci_con_handle_t hfp_subevent_in_band_ring_tone_get_acl_handle(const uint8_t * event){ 4964 return little_endian_read_16(event, 3); 4965 } 4966 /** 4967 * @brief Get field status from event HFP_SUBEVENT_IN_BAND_RING_TONE 4968 * @param event packet 4969 * @return status 4970 * @note: btstack_type 1 4971 */ 4972 static inline uint8_t hfp_subevent_in_band_ring_tone_get_status(const uint8_t * event){ 4973 return event[5]; 4974 } 4975 4976 /** 4977 * @brief Get field acl_handle from event HFP_SUBEVENT_VOICE_RECOGNITION_ACTIVATED 4978 * @param event packet 4979 * @return acl_handle 4980 * @note: btstack_type H 4981 */ 4982 static inline hci_con_handle_t hfp_subevent_voice_recognition_activated_get_acl_handle(const uint8_t * event){ 4983 return little_endian_read_16(event, 3); 4984 } 4985 /** 4986 * @brief Get field status from event HFP_SUBEVENT_VOICE_RECOGNITION_ACTIVATED 4987 * @param event packet 4988 * @return status 4989 * @note: btstack_type 1 4990 */ 4991 static inline uint8_t hfp_subevent_voice_recognition_activated_get_status(const uint8_t * event){ 4992 return event[5]; 4993 } 4994 /** 4995 * @brief Get field enhanced from event HFP_SUBEVENT_VOICE_RECOGNITION_ACTIVATED 4996 * @param event packet 4997 * @return enhanced 4998 * @note: btstack_type 1 4999 */ 5000 static inline uint8_t hfp_subevent_voice_recognition_activated_get_enhanced(const uint8_t * event){ 5001 return event[6]; 5002 } 5003 5004 /** 5005 * @brief Get field acl_handle from event HFP_SUBEVENT_VOICE_RECOGNITION_DEACTIVATED 5006 * @param event packet 5007 * @return acl_handle 5008 * @note: btstack_type H 5009 */ 5010 static inline hci_con_handle_t hfp_subevent_voice_recognition_deactivated_get_acl_handle(const uint8_t * event){ 5011 return little_endian_read_16(event, 3); 5012 } 5013 /** 5014 * @brief Get field status from event HFP_SUBEVENT_VOICE_RECOGNITION_DEACTIVATED 5015 * @param event packet 5016 * @return status 5017 * @note: btstack_type 1 5018 */ 5019 static inline uint8_t hfp_subevent_voice_recognition_deactivated_get_status(const uint8_t * event){ 5020 return event[5]; 5021 } 5022 5023 /** 5024 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_HF_READY_FOR_AUDIO 5025 * @param event packet 5026 * @return acl_handle 5027 * @note: btstack_type H 5028 */ 5029 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_hf_ready_for_audio_get_acl_handle(const uint8_t * event){ 5030 return little_endian_read_16(event, 3); 5031 } 5032 /** 5033 * @brief Get field status from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_HF_READY_FOR_AUDIO 5034 * @param event packet 5035 * @return status 5036 * @note: btstack_type 1 5037 */ 5038 static inline uint8_t hfp_subevent_enhanced_voice_recognition_hf_ready_for_audio_get_status(const uint8_t * event){ 5039 return event[5]; 5040 } 5041 5042 /** 5043 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_READY_TO_ACCEPT_AUDIO_INPUT 5044 * @param event packet 5045 * @return acl_handle 5046 * @note: btstack_type H 5047 */ 5048 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_ag_ready_to_accept_audio_input_get_acl_handle(const uint8_t * event){ 5049 return little_endian_read_16(event, 3); 5050 } 5051 /** 5052 * @brief Get field status from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_READY_TO_ACCEPT_AUDIO_INPUT 5053 * @param event packet 5054 * @return status 5055 * @note: btstack_type 1 5056 */ 5057 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_ready_to_accept_audio_input_get_status(const uint8_t * event){ 5058 return event[5]; 5059 } 5060 5061 /** 5062 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_STARTING_SOUND 5063 * @param event packet 5064 * @return acl_handle 5065 * @note: btstack_type H 5066 */ 5067 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_ag_is_starting_sound_get_acl_handle(const uint8_t * event){ 5068 return little_endian_read_16(event, 3); 5069 } 5070 /** 5071 * @brief Get field status from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_STARTING_SOUND 5072 * @param event packet 5073 * @return status 5074 * @note: btstack_type 1 5075 */ 5076 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_is_starting_sound_get_status(const uint8_t * event){ 5077 return event[5]; 5078 } 5079 5080 /** 5081 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_PROCESSING_AUDIO_INPUT 5082 * @param event packet 5083 * @return acl_handle 5084 * @note: btstack_type H 5085 */ 5086 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_ag_is_processing_audio_input_get_acl_handle(const uint8_t * event){ 5087 return little_endian_read_16(event, 3); 5088 } 5089 /** 5090 * @brief Get field status from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_IS_PROCESSING_AUDIO_INPUT 5091 * @param event packet 5092 * @return status 5093 * @note: btstack_type 1 5094 */ 5095 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_is_processing_audio_input_get_status(const uint8_t * event){ 5096 return event[5]; 5097 } 5098 5099 /** 5100 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE_SENT 5101 * @param event packet 5102 * @return acl_handle 5103 * @note: btstack_type H 5104 */ 5105 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_ag_message_sent_get_acl_handle(const uint8_t * event){ 5106 return little_endian_read_16(event, 3); 5107 } 5108 /** 5109 * @brief Get field status from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE_SENT 5110 * @param event packet 5111 * @return status 5112 * @note: btstack_type 1 5113 */ 5114 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_message_sent_get_status(const uint8_t * event){ 5115 return event[5]; 5116 } 5117 5118 /** 5119 * @brief Get field acl_handle from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5120 * @param event packet 5121 * @return acl_handle 5122 * @note: btstack_type H 5123 */ 5124 static inline hci_con_handle_t hfp_subevent_enhanced_voice_recognition_ag_message_get_acl_handle(const uint8_t * event){ 5125 return little_endian_read_16(event, 3); 5126 } 5127 /** 5128 * @brief Get field text_id from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5129 * @param event packet 5130 * @return text_id 5131 * @note: btstack_type 2 5132 */ 5133 static inline uint16_t hfp_subevent_enhanced_voice_recognition_ag_message_get_text_id(const uint8_t * event){ 5134 return little_endian_read_16(event, 5); 5135 } 5136 /** 5137 * @brief Get field text_type from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5138 * @param event packet 5139 * @return text_type 5140 * @note: btstack_type 1 5141 */ 5142 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_message_get_text_type(const uint8_t * event){ 5143 return event[7]; 5144 } 5145 /** 5146 * @brief Get field text_operation from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5147 * @param event packet 5148 * @return text_operation 5149 * @note: btstack_type 1 5150 */ 5151 static inline uint8_t hfp_subevent_enhanced_voice_recognition_ag_message_get_text_operation(const uint8_t * event){ 5152 return event[8]; 5153 } 5154 /** 5155 * @brief Get field text_length from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5156 * @param event packet 5157 * @return text_length 5158 * @note: btstack_type L 5159 */ 5160 static inline uint16_t hfp_subevent_enhanced_voice_recognition_ag_message_get_text_length(const uint8_t * event){ 5161 return little_endian_read_16(event, 9); 5162 } 5163 /** 5164 * @brief Get field text from event HFP_SUBEVENT_ENHANCED_VOICE_RECOGNITION_AG_MESSAGE 5165 * @param event packet 5166 * @return text 5167 * @note: btstack_type V 5168 */ 5169 static inline const uint8_t * hfp_subevent_enhanced_voice_recognition_ag_message_get_text(const uint8_t * event){ 5170 return &event[11]; 5171 } 5172 5173 /** 5174 * @brief Get field acl_handle from event HFP_SUBEVENT_ECHO_CANCELING_AND_NOISE_REDUCTION_DEACTIVATE 5175 * @param event packet 5176 * @return acl_handle 5177 * @note: btstack_type H 5178 */ 5179 static inline hci_con_handle_t hfp_subevent_echo_canceling_and_noise_reduction_deactivate_get_acl_handle(const uint8_t * event){ 5180 return little_endian_read_16(event, 3); 5181 } 5182 /** 5183 * @brief Get field status from event HFP_SUBEVENT_ECHO_CANCELING_AND_NOISE_REDUCTION_DEACTIVATE 5184 * @param event packet 5185 * @return status 5186 * @note: btstack_type 1 5187 */ 5188 static inline uint8_t hfp_subevent_echo_canceling_and_noise_reduction_deactivate_get_status(const uint8_t * event){ 5189 return event[5]; 5190 } 5191 5192 /** 5193 * @brief Get field acl_handle from event HFP_SUBEVENT_HF_INDICATOR 5194 * @param event packet 5195 * @return acl_handle 5196 * @note: btstack_type H 5197 */ 5198 static inline hci_con_handle_t hfp_subevent_hf_indicator_get_acl_handle(const uint8_t * event){ 5199 return little_endian_read_16(event, 3); 5200 } 5201 /** 5202 * @brief Get field uuid from event HFP_SUBEVENT_HF_INDICATOR 5203 * @param event packet 5204 * @return uuid 5205 * @note: btstack_type 2 5206 */ 5207 static inline uint16_t hfp_subevent_hf_indicator_get_uuid(const uint8_t * event){ 5208 return little_endian_read_16(event, 5); 5209 } 5210 /** 5211 * @brief Get field value from event HFP_SUBEVENT_HF_INDICATOR 5212 * @param event packet 5213 * @return value 5214 * @note: btstack_type 1 5215 */ 5216 static inline uint8_t hfp_subevent_hf_indicator_get_value(const uint8_t * event){ 5217 return event[7]; 5218 } 5219 5220 #ifdef ENABLE_BLE 5221 /** 5222 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 5223 * @param event packet 5224 * @return handle 5225 * @note: btstack_type H 5226 */ 5227 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 5228 return little_endian_read_16(event, 3); 5229 } 5230 #endif 5231 5232 #ifdef ENABLE_BLE 5233 /** 5234 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 5235 * @param event packet 5236 * @return handle 5237 * @note: btstack_type H 5238 */ 5239 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 5240 return little_endian_read_16(event, 3); 5241 } 5242 /** 5243 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 5244 * @param event packet 5245 * @return attribute_id 5246 * @note: btstack_type 2 5247 */ 5248 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 5249 return little_endian_read_16(event, 5); 5250 } 5251 /** 5252 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 5253 * @param event packet 5254 * @return text 5255 * @note: btstack_type T 5256 */ 5257 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 5258 return (const char *) &event[7]; 5259 } 5260 #endif 5261 5262 #ifdef ENABLE_BLE 5263 /** 5264 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 5265 * @param event packet 5266 * @return handle 5267 * @note: btstack_type H 5268 */ 5269 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 5270 return little_endian_read_16(event, 3); 5271 } 5272 #endif 5273 5274 /** 5275 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 5276 * @param event packet 5277 * @return avdtp_cid 5278 * @note: btstack_type 2 5279 */ 5280 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 5281 return little_endian_read_16(event, 3); 5282 } 5283 /** 5284 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 5285 * @param event packet 5286 * @return local_seid 5287 * @note: btstack_type 1 5288 */ 5289 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 5290 return event[5]; 5291 } 5292 /** 5293 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 5294 * @param event packet 5295 * @return is_initiator 5296 * @note: btstack_type 1 5297 */ 5298 static inline uint8_t avdtp_subevent_signaling_accept_get_is_initiator(const uint8_t * event){ 5299 return event[6]; 5300 } 5301 /** 5302 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 5303 * @param event packet 5304 * @return signal_identifier 5305 * @note: btstack_type 1 5306 */ 5307 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 5308 return event[7]; 5309 } 5310 5311 /** 5312 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 5313 * @param event packet 5314 * @return avdtp_cid 5315 * @note: btstack_type 2 5316 */ 5317 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 5318 return little_endian_read_16(event, 3); 5319 } 5320 /** 5321 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 5322 * @param event packet 5323 * @return local_seid 5324 * @note: btstack_type 1 5325 */ 5326 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 5327 return event[5]; 5328 } 5329 /** 5330 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_REJECT 5331 * @param event packet 5332 * @return is_initiator 5333 * @note: btstack_type 1 5334 */ 5335 static inline uint8_t avdtp_subevent_signaling_reject_get_is_initiator(const uint8_t * event){ 5336 return event[6]; 5337 } 5338 /** 5339 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 5340 * @param event packet 5341 * @return signal_identifier 5342 * @note: btstack_type 1 5343 */ 5344 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 5345 return event[7]; 5346 } 5347 5348 /** 5349 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 5350 * @param event packet 5351 * @return avdtp_cid 5352 * @note: btstack_type 2 5353 */ 5354 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 5355 return little_endian_read_16(event, 3); 5356 } 5357 /** 5358 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 5359 * @param event packet 5360 * @return local_seid 5361 * @note: btstack_type 1 5362 */ 5363 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 5364 return event[5]; 5365 } 5366 /** 5367 * @brief Get field is_initiator from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 5368 * @param event packet 5369 * @return is_initiator 5370 * @note: btstack_type 1 5371 */ 5372 static inline uint8_t avdtp_subevent_signaling_general_reject_get_is_initiator(const uint8_t * event){ 5373 return event[6]; 5374 } 5375 /** 5376 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 5377 * @param event packet 5378 * @return signal_identifier 5379 * @note: btstack_type 1 5380 */ 5381 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 5382 return event[7]; 5383 } 5384 5385 /** 5386 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5387 * @param event packet 5388 * @return avdtp_cid 5389 * @note: btstack_type 2 5390 */ 5391 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 5392 return little_endian_read_16(event, 3); 5393 } 5394 /** 5395 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5396 * @param event packet 5397 * @param Pointer to storage for bd_addr 5398 * @note: btstack_type B 5399 */ 5400 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5401 reverse_bytes(&event[5], bd_addr, 6); 5402 } 5403 /** 5404 * @brief Get field con_handle from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5405 * @param event packet 5406 * @return con_handle 5407 * @note: btstack_type 2 5408 */ 5409 static inline uint16_t avdtp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){ 5410 return little_endian_read_16(event, 11); 5411 } 5412 /** 5413 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5414 * @param event packet 5415 * @return status 5416 * @note: btstack_type 1 5417 */ 5418 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 5419 return event[13]; 5420 } 5421 5422 /** 5423 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 5424 * @param event packet 5425 * @return avdtp_cid 5426 * @note: btstack_type 2 5427 */ 5428 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 5429 return little_endian_read_16(event, 3); 5430 } 5431 5432 /** 5433 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 5434 * @param event packet 5435 * @return avdtp_cid 5436 * @note: btstack_type 2 5437 */ 5438 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 5439 return little_endian_read_16(event, 3); 5440 } 5441 /** 5442 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 5443 * @param event packet 5444 * @return remote_seid 5445 * @note: btstack_type 1 5446 */ 5447 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 5448 return event[5]; 5449 } 5450 /** 5451 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 5452 * @param event packet 5453 * @return in_use 5454 * @note: btstack_type 1 5455 */ 5456 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 5457 return event[6]; 5458 } 5459 /** 5460 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 5461 * @param event packet 5462 * @return media_type 5463 * @note: btstack_type 1 5464 */ 5465 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 5466 return event[7]; 5467 } 5468 /** 5469 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 5470 * @param event packet 5471 * @return sep_type 5472 * @note: btstack_type 1 5473 */ 5474 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 5475 return event[8]; 5476 } 5477 5478 /** 5479 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5480 * @param event packet 5481 * @return avdtp_cid 5482 * @note: btstack_type 2 5483 */ 5484 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 5485 return little_endian_read_16(event, 3); 5486 } 5487 /** 5488 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5489 * @param event packet 5490 * @return remote_seid 5491 * @note: btstack_type 1 5492 */ 5493 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 5494 return event[5]; 5495 } 5496 /** 5497 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5498 * @param event packet 5499 * @return media_type 5500 * @note: btstack_type 1 5501 */ 5502 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 5503 return event[6]; 5504 } 5505 /** 5506 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5507 * @param event packet 5508 * @return sampling_frequency_bitmap 5509 * @note: btstack_type 1 5510 */ 5511 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 5512 return event[7]; 5513 } 5514 /** 5515 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5516 * @param event packet 5517 * @return channel_mode_bitmap 5518 * @note: btstack_type 1 5519 */ 5520 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 5521 return event[8]; 5522 } 5523 /** 5524 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5525 * @param event packet 5526 * @return block_length_bitmap 5527 * @note: btstack_type 1 5528 */ 5529 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 5530 return event[9]; 5531 } 5532 /** 5533 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5534 * @param event packet 5535 * @return subbands_bitmap 5536 * @note: btstack_type 1 5537 */ 5538 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 5539 return event[10]; 5540 } 5541 /** 5542 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5543 * @param event packet 5544 * @return allocation_method_bitmap 5545 * @note: btstack_type 1 5546 */ 5547 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 5548 return event[11]; 5549 } 5550 /** 5551 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5552 * @param event packet 5553 * @return min_bitpool_value 5554 * @note: btstack_type 1 5555 */ 5556 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 5557 return event[12]; 5558 } 5559 /** 5560 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 5561 * @param event packet 5562 * @return max_bitpool_value 5563 * @note: btstack_type 1 5564 */ 5565 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 5566 return event[13]; 5567 } 5568 5569 /** 5570 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5571 * @param event packet 5572 * @return avdtp_cid 5573 * @note: btstack_type 2 5574 */ 5575 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_avdtp_cid(const uint8_t * event){ 5576 return little_endian_read_16(event, 3); 5577 } 5578 /** 5579 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5580 * @param event packet 5581 * @return remote_seid 5582 * @note: btstack_type 1 5583 */ 5584 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_remote_seid(const uint8_t * event){ 5585 return event[5]; 5586 } 5587 /** 5588 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5589 * @param event packet 5590 * @return media_type 5591 * @note: btstack_type 1 5592 */ 5593 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_type(const uint8_t * event){ 5594 return event[6]; 5595 } 5596 /** 5597 * @brief Get field layer_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5598 * @param event packet 5599 * @return layer_bitmap 5600 * @note: btstack_type 1 5601 */ 5602 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_layer_bitmap(const uint8_t * event){ 5603 return event[7]; 5604 } 5605 /** 5606 * @brief Get field crc from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5607 * @param event packet 5608 * @return crc 5609 * @note: btstack_type 1 5610 */ 5611 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_crc(const uint8_t * event){ 5612 return event[8]; 5613 } 5614 /** 5615 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5616 * @param event packet 5617 * @return channel_mode_bitmap 5618 * @note: btstack_type 1 5619 */ 5620 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_channel_mode_bitmap(const uint8_t * event){ 5621 return event[9]; 5622 } 5623 /** 5624 * @brief Get field media_payload_format from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5625 * @param event packet 5626 * @return media_payload_format 5627 * @note: btstack_type 1 5628 */ 5629 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_payload_format(const uint8_t * event){ 5630 return event[10]; 5631 } 5632 /** 5633 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5634 * @param event packet 5635 * @return sampling_frequency_bitmap 5636 * @note: btstack_type 1 5637 */ 5638 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 5639 return event[11]; 5640 } 5641 /** 5642 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5643 * @param event packet 5644 * @return vbr 5645 * @note: btstack_type 1 5646 */ 5647 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_vbr(const uint8_t * event){ 5648 return event[12]; 5649 } 5650 /** 5651 * @brief Get field bit_rate_index_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 5652 * @param event packet 5653 * @return bit_rate_index_bitmap 5654 * @note: btstack_type 2 5655 */ 5656 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 5657 return little_endian_read_16(event, 13); 5658 } 5659 5660 /** 5661 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5662 * @param event packet 5663 * @return avdtp_cid 5664 * @note: btstack_type 2 5665 */ 5666 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_avdtp_cid(const uint8_t * event){ 5667 return little_endian_read_16(event, 3); 5668 } 5669 /** 5670 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5671 * @param event packet 5672 * @return remote_seid 5673 * @note: btstack_type 1 5674 */ 5675 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_remote_seid(const uint8_t * event){ 5676 return event[5]; 5677 } 5678 /** 5679 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5680 * @param event packet 5681 * @return media_type 5682 * @note: btstack_type 1 5683 */ 5684 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_media_type(const uint8_t * event){ 5685 return event[6]; 5686 } 5687 /** 5688 * @brief Get field object_type_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5689 * @param event packet 5690 * @return object_type_bitmap 5691 * @note: btstack_type 1 5692 */ 5693 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_object_type_bitmap(const uint8_t * event){ 5694 return event[7]; 5695 } 5696 /** 5697 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5698 * @param event packet 5699 * @return sampling_frequency_bitmap 5700 * @note: btstack_type 2 5701 */ 5702 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 5703 return little_endian_read_16(event, 8); 5704 } 5705 /** 5706 * @brief Get field channels_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5707 * @param event packet 5708 * @return channels_bitmap 5709 * @note: btstack_type 1 5710 */ 5711 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_channels_bitmap(const uint8_t * event){ 5712 return event[10]; 5713 } 5714 /** 5715 * @brief Get field bit_rate from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5716 * @param event packet 5717 * @return bit_rate 5718 * @note: btstack_type 3 5719 */ 5720 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_bit_rate(const uint8_t * event){ 5721 return little_endian_read_24(event, 11); 5722 } 5723 /** 5724 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 5725 * @param event packet 5726 * @return vbr 5727 * @note: btstack_type 1 5728 */ 5729 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_capability_get_vbr(const uint8_t * event){ 5730 return event[14]; 5731 } 5732 5733 /** 5734 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5735 * @param event packet 5736 * @return avdtp_cid 5737 * @note: btstack_type 2 5738 */ 5739 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_capability_get_avdtp_cid(const uint8_t * event){ 5740 return little_endian_read_16(event, 3); 5741 } 5742 /** 5743 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5744 * @param event packet 5745 * @return remote_seid 5746 * @note: btstack_type 1 5747 */ 5748 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_remote_seid(const uint8_t * event){ 5749 return event[5]; 5750 } 5751 /** 5752 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5753 * @param event packet 5754 * @return media_type 5755 * @note: btstack_type 1 5756 */ 5757 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_media_type(const uint8_t * event){ 5758 return event[6]; 5759 } 5760 /** 5761 * @brief Get field version from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5762 * @param event packet 5763 * @return version 5764 * @note: btstack_type 1 5765 */ 5766 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_version(const uint8_t * event){ 5767 return event[7]; 5768 } 5769 /** 5770 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5771 * @param event packet 5772 * @return channel_mode_bitmap 5773 * @note: btstack_type 1 5774 */ 5775 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_channel_mode_bitmap(const uint8_t * event){ 5776 return event[8]; 5777 } 5778 /** 5779 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5780 * @param event packet 5781 * @return sampling_frequency_bitmap 5782 * @note: btstack_type 1 5783 */ 5784 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 5785 return event[9]; 5786 } 5787 /** 5788 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5789 * @param event packet 5790 * @return vbr 5791 * @note: btstack_type 1 5792 */ 5793 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_capability_get_vbr(const uint8_t * event){ 5794 return event[10]; 5795 } 5796 /** 5797 * @brief Get field bit_rate_index_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5798 * @param event packet 5799 * @return bit_rate_index_bitmap 5800 * @note: btstack_type 3 5801 */ 5802 static inline uint32_t avdtp_subevent_signaling_media_codec_atrac_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 5803 return little_endian_read_24(event, 11); 5804 } 5805 /** 5806 * @brief Get field maximum_sul from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 5807 * @param event packet 5808 * @return maximum_sul 5809 * @note: btstack_type 2 5810 */ 5811 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_capability_get_maximum_sul(const uint8_t * event){ 5812 return little_endian_read_16(event, 14); 5813 } 5814 5815 /** 5816 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5817 * @param event packet 5818 * @return avdtp_cid 5819 * @note: btstack_type 2 5820 */ 5821 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 5822 return little_endian_read_16(event, 3); 5823 } 5824 /** 5825 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5826 * @param event packet 5827 * @return remote_seid 5828 * @note: btstack_type 1 5829 */ 5830 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 5831 return event[5]; 5832 } 5833 /** 5834 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5835 * @param event packet 5836 * @return media_type 5837 * @note: btstack_type 1 5838 */ 5839 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 5840 return event[6]; 5841 } 5842 /** 5843 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5844 * @param event packet 5845 * @return media_codec_type 5846 * @note: btstack_type 2 5847 */ 5848 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 5849 return little_endian_read_16(event, 7); 5850 } 5851 /** 5852 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5853 * @param event packet 5854 * @return media_codec_information_len 5855 * @note: btstack_type L 5856 */ 5857 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 5858 return little_endian_read_16(event, 9); 5859 } 5860 /** 5861 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 5862 * @param event packet 5863 * @return media_codec_information 5864 * @note: btstack_type V 5865 */ 5866 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 5867 return &event[11]; 5868 } 5869 5870 /** 5871 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 5872 * @param event packet 5873 * @return avdtp_cid 5874 * @note: btstack_type 2 5875 */ 5876 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 5877 return little_endian_read_16(event, 3); 5878 } 5879 /** 5880 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 5881 * @param event packet 5882 * @return remote_seid 5883 * @note: btstack_type 1 5884 */ 5885 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 5886 return event[5]; 5887 } 5888 5889 /** 5890 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 5891 * @param event packet 5892 * @return avdtp_cid 5893 * @note: btstack_type 2 5894 */ 5895 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 5896 return little_endian_read_16(event, 3); 5897 } 5898 /** 5899 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 5900 * @param event packet 5901 * @return remote_seid 5902 * @note: btstack_type 1 5903 */ 5904 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 5905 return event[5]; 5906 } 5907 5908 /** 5909 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5910 * @param event packet 5911 * @return avdtp_cid 5912 * @note: btstack_type 2 5913 */ 5914 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 5915 return little_endian_read_16(event, 3); 5916 } 5917 /** 5918 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5919 * @param event packet 5920 * @return remote_seid 5921 * @note: btstack_type 1 5922 */ 5923 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 5924 return event[5]; 5925 } 5926 /** 5927 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5928 * @param event packet 5929 * @return recovery_type 5930 * @note: btstack_type 1 5931 */ 5932 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 5933 return event[6]; 5934 } 5935 /** 5936 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5937 * @param event packet 5938 * @return maximum_recovery_window_size 5939 * @note: btstack_type 1 5940 */ 5941 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 5942 return event[7]; 5943 } 5944 /** 5945 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 5946 * @param event packet 5947 * @return maximum_number_media_packets 5948 * @note: btstack_type 1 5949 */ 5950 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 5951 return event[8]; 5952 } 5953 5954 /** 5955 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5956 * @param event packet 5957 * @return avdtp_cid 5958 * @note: btstack_type 2 5959 */ 5960 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 5961 return little_endian_read_16(event, 3); 5962 } 5963 /** 5964 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5965 * @param event packet 5966 * @return remote_seid 5967 * @note: btstack_type 1 5968 */ 5969 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 5970 return event[5]; 5971 } 5972 /** 5973 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5974 * @param event packet 5975 * @return cp_type 5976 * @note: btstack_type 2 5977 */ 5978 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 5979 return little_endian_read_16(event, 6); 5980 } 5981 /** 5982 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5983 * @param event packet 5984 * @return cp_type_value_len 5985 * @note: btstack_type L 5986 */ 5987 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 5988 return little_endian_read_16(event, 8); 5989 } 5990 /** 5991 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 5992 * @param event packet 5993 * @return cp_type_value 5994 * @note: btstack_type V 5995 */ 5996 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 5997 return &event[10]; 5998 } 5999 6000 /** 6001 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6002 * @param event packet 6003 * @return avdtp_cid 6004 * @note: btstack_type 2 6005 */ 6006 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 6007 return little_endian_read_16(event, 3); 6008 } 6009 /** 6010 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6011 * @param event packet 6012 * @return remote_seid 6013 * @note: btstack_type 1 6014 */ 6015 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 6016 return event[5]; 6017 } 6018 /** 6019 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6020 * @param event packet 6021 * @return fragmentation 6022 * @note: btstack_type 1 6023 */ 6024 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 6025 return event[6]; 6026 } 6027 /** 6028 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6029 * @param event packet 6030 * @return transport_identifiers_num 6031 * @note: btstack_type 1 6032 */ 6033 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 6034 return event[7]; 6035 } 6036 /** 6037 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6038 * @param event packet 6039 * @return transport_session_identifier_1 6040 * @note: btstack_type 1 6041 */ 6042 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 6043 return event[8]; 6044 } 6045 /** 6046 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6047 * @param event packet 6048 * @return transport_session_identifier_2 6049 * @note: btstack_type 1 6050 */ 6051 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 6052 return event[9]; 6053 } 6054 /** 6055 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6056 * @param event packet 6057 * @return transport_session_identifier_3 6058 * @note: btstack_type 1 6059 */ 6060 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 6061 return event[10]; 6062 } 6063 /** 6064 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6065 * @param event packet 6066 * @return tcid_1 6067 * @note: btstack_type 1 6068 */ 6069 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 6070 return event[11]; 6071 } 6072 /** 6073 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6074 * @param event packet 6075 * @return tcid_2 6076 * @note: btstack_type 1 6077 */ 6078 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 6079 return event[12]; 6080 } 6081 /** 6082 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 6083 * @param event packet 6084 * @return tcid_3 6085 * @note: btstack_type 1 6086 */ 6087 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 6088 return event[13]; 6089 } 6090 6091 /** 6092 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 6093 * @param event packet 6094 * @return avdtp_cid 6095 * @note: btstack_type 2 6096 */ 6097 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 6098 return little_endian_read_16(event, 3); 6099 } 6100 /** 6101 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 6102 * @param event packet 6103 * @return remote_seid 6104 * @note: btstack_type 1 6105 */ 6106 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 6107 return event[5]; 6108 } 6109 6110 /** 6111 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 6112 * @param event packet 6113 * @return avdtp_cid 6114 * @note: btstack_type 2 6115 */ 6116 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 6117 return little_endian_read_16(event, 3); 6118 } 6119 /** 6120 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 6121 * @param event packet 6122 * @return remote_seid 6123 * @note: btstack_type 1 6124 */ 6125 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 6126 return event[5]; 6127 } 6128 /** 6129 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 6130 * @param event packet 6131 * @return back_ch 6132 * @note: btstack_type 1 6133 */ 6134 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 6135 return event[6]; 6136 } 6137 /** 6138 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 6139 * @param event packet 6140 * @return media 6141 * @note: btstack_type 1 6142 */ 6143 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 6144 return event[7]; 6145 } 6146 /** 6147 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 6148 * @param event packet 6149 * @return recovery 6150 * @note: btstack_type 1 6151 */ 6152 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 6153 return event[8]; 6154 } 6155 6156 /** 6157 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 6158 * @param event packet 6159 * @return avdtp_cid 6160 * @note: btstack_type 2 6161 */ 6162 static inline uint16_t avdtp_subevent_signaling_capabilities_done_get_avdtp_cid(const uint8_t * event){ 6163 return little_endian_read_16(event, 3); 6164 } 6165 /** 6166 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 6167 * @param event packet 6168 * @return remote_seid 6169 * @note: btstack_type 1 6170 */ 6171 static inline uint8_t avdtp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 6172 return event[5]; 6173 } 6174 6175 /** 6176 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6177 * @param event packet 6178 * @return avdtp_cid 6179 * @note: btstack_type 2 6180 */ 6181 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 6182 return little_endian_read_16(event, 3); 6183 } 6184 /** 6185 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6186 * @param event packet 6187 * @return local_seid 6188 * @note: btstack_type 1 6189 */ 6190 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 6191 return event[5]; 6192 } 6193 /** 6194 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6195 * @param event packet 6196 * @return remote_seid 6197 * @note: btstack_type 1 6198 */ 6199 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 6200 return event[6]; 6201 } 6202 /** 6203 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6204 * @param event packet 6205 * @return reconfigure 6206 * @note: btstack_type 1 6207 */ 6208 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 6209 return event[7]; 6210 } 6211 /** 6212 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6213 * @param event packet 6214 * @return media_type 6215 * @note: btstack_type 1 6216 */ 6217 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 6218 return event[8]; 6219 } 6220 /** 6221 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6222 * @param event packet 6223 * @return sampling_frequency 6224 * @note: btstack_type 2 6225 */ 6226 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 6227 return little_endian_read_16(event, 9); 6228 } 6229 /** 6230 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6231 * @param event packet 6232 * @return channel_mode 6233 * @note: btstack_type 1 6234 */ 6235 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 6236 return event[11]; 6237 } 6238 /** 6239 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6240 * @param event packet 6241 * @return num_channels 6242 * @note: btstack_type 1 6243 */ 6244 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 6245 return event[12]; 6246 } 6247 /** 6248 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6249 * @param event packet 6250 * @return block_length 6251 * @note: btstack_type 1 6252 */ 6253 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 6254 return event[13]; 6255 } 6256 /** 6257 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6258 * @param event packet 6259 * @return subbands 6260 * @note: btstack_type 1 6261 */ 6262 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 6263 return event[14]; 6264 } 6265 /** 6266 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6267 * @param event packet 6268 * @return allocation_method 6269 * @note: btstack_type 1 6270 */ 6271 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 6272 return event[15]; 6273 } 6274 /** 6275 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6276 * @param event packet 6277 * @return min_bitpool_value 6278 * @note: btstack_type 1 6279 */ 6280 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 6281 return event[16]; 6282 } 6283 /** 6284 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6285 * @param event packet 6286 * @return max_bitpool_value 6287 * @note: btstack_type 1 6288 */ 6289 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 6290 return event[17]; 6291 } 6292 6293 /** 6294 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6295 * @param event packet 6296 * @return avdtp_cid 6297 * @note: btstack_type 2 6298 */ 6299 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_avdtp_cid(const uint8_t * event){ 6300 return little_endian_read_16(event, 3); 6301 } 6302 /** 6303 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6304 * @param event packet 6305 * @return local_seid 6306 * @note: btstack_type 1 6307 */ 6308 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_local_seid(const uint8_t * event){ 6309 return event[5]; 6310 } 6311 /** 6312 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6313 * @param event packet 6314 * @return remote_seid 6315 * @note: btstack_type 1 6316 */ 6317 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_remote_seid(const uint8_t * event){ 6318 return event[6]; 6319 } 6320 /** 6321 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6322 * @param event packet 6323 * @return reconfigure 6324 * @note: btstack_type 1 6325 */ 6326 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_reconfigure(const uint8_t * event){ 6327 return event[7]; 6328 } 6329 /** 6330 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6331 * @param event packet 6332 * @return media_type 6333 * @note: btstack_type 1 6334 */ 6335 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_type(const uint8_t * event){ 6336 return event[8]; 6337 } 6338 /** 6339 * @brief Get field layer from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6340 * @param event packet 6341 * @return layer 6342 * @note: btstack_type 1 6343 */ 6344 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_layer(const uint8_t * event){ 6345 return event[9]; 6346 } 6347 /** 6348 * @brief Get field crc from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6349 * @param event packet 6350 * @return crc 6351 * @note: btstack_type 1 6352 */ 6353 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_crc(const uint8_t * event){ 6354 return event[10]; 6355 } 6356 /** 6357 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6358 * @param event packet 6359 * @return channel_mode 6360 * @note: btstack_type 1 6361 */ 6362 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){ 6363 return event[11]; 6364 } 6365 /** 6366 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6367 * @param event packet 6368 * @return num_channels 6369 * @note: btstack_type 1 6370 */ 6371 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_num_channels(const uint8_t * event){ 6372 return event[12]; 6373 } 6374 /** 6375 * @brief Get field media_payload_format from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6376 * @param event packet 6377 * @return media_payload_format 6378 * @note: btstack_type 1 6379 */ 6380 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_payload_format(const uint8_t * event){ 6381 return event[13]; 6382 } 6383 /** 6384 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6385 * @param event packet 6386 * @return sampling_frequency 6387 * @note: btstack_type 2 6388 */ 6389 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_sampling_frequency(const uint8_t * event){ 6390 return little_endian_read_16(event, 14); 6391 } 6392 /** 6393 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6394 * @param event packet 6395 * @return vbr 6396 * @note: btstack_type 1 6397 */ 6398 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_vbr(const uint8_t * event){ 6399 return event[16]; 6400 } 6401 /** 6402 * @brief Get field bit_rate_index from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6403 * @param event packet 6404 * @return bit_rate_index 6405 * @note: btstack_type 1 6406 */ 6407 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_bit_rate_index(const uint8_t * event){ 6408 return event[17]; 6409 } 6410 6411 /** 6412 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6413 * @param event packet 6414 * @return avdtp_cid 6415 * @note: btstack_type 2 6416 */ 6417 static inline uint16_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_avdtp_cid(const uint8_t * event){ 6418 return little_endian_read_16(event, 3); 6419 } 6420 /** 6421 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6422 * @param event packet 6423 * @return local_seid 6424 * @note: btstack_type 1 6425 */ 6426 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_local_seid(const uint8_t * event){ 6427 return event[5]; 6428 } 6429 /** 6430 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6431 * @param event packet 6432 * @return remote_seid 6433 * @note: btstack_type 1 6434 */ 6435 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_remote_seid(const uint8_t * event){ 6436 return event[6]; 6437 } 6438 /** 6439 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6440 * @param event packet 6441 * @return reconfigure 6442 * @note: btstack_type 1 6443 */ 6444 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_reconfigure(const uint8_t * event){ 6445 return event[7]; 6446 } 6447 /** 6448 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6449 * @param event packet 6450 * @return media_type 6451 * @note: btstack_type 1 6452 */ 6453 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_media_type(const uint8_t * event){ 6454 return event[8]; 6455 } 6456 /** 6457 * @brief Get field object_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6458 * @param event packet 6459 * @return object_type 6460 * @note: btstack_type 1 6461 */ 6462 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_object_type(const uint8_t * event){ 6463 return event[9]; 6464 } 6465 /** 6466 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6467 * @param event packet 6468 * @return sampling_frequency 6469 * @note: btstack_type 3 6470 */ 6471 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_sampling_frequency(const uint8_t * event){ 6472 return little_endian_read_24(event, 10); 6473 } 6474 /** 6475 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6476 * @param event packet 6477 * @return num_channels 6478 * @note: btstack_type 1 6479 */ 6480 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_num_channels(const uint8_t * event){ 6481 return event[13]; 6482 } 6483 /** 6484 * @brief Get field bit_rate from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6485 * @param event packet 6486 * @return bit_rate 6487 * @note: btstack_type 3 6488 */ 6489 static inline uint32_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_bit_rate(const uint8_t * event){ 6490 return little_endian_read_24(event, 14); 6491 } 6492 /** 6493 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 6494 * @param event packet 6495 * @return vbr 6496 * @note: btstack_type 1 6497 */ 6498 static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_aac_configuration_get_vbr(const uint8_t * event){ 6499 return event[17]; 6500 } 6501 6502 /** 6503 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6504 * @param event packet 6505 * @return avdtp_cid 6506 * @note: btstack_type 2 6507 */ 6508 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_avdtp_cid(const uint8_t * event){ 6509 return little_endian_read_16(event, 3); 6510 } 6511 /** 6512 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6513 * @param event packet 6514 * @return local_seid 6515 * @note: btstack_type 1 6516 */ 6517 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_local_seid(const uint8_t * event){ 6518 return event[5]; 6519 } 6520 /** 6521 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6522 * @param event packet 6523 * @return remote_seid 6524 * @note: btstack_type 1 6525 */ 6526 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_remote_seid(const uint8_t * event){ 6527 return event[6]; 6528 } 6529 /** 6530 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6531 * @param event packet 6532 * @return reconfigure 6533 * @note: btstack_type 1 6534 */ 6535 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_reconfigure(const uint8_t * event){ 6536 return event[7]; 6537 } 6538 /** 6539 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6540 * @param event packet 6541 * @return media_type 6542 * @note: btstack_type 1 6543 */ 6544 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_media_type(const uint8_t * event){ 6545 return event[8]; 6546 } 6547 /** 6548 * @brief Get field version from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6549 * @param event packet 6550 * @return version 6551 * @note: btstack_type 1 6552 */ 6553 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_version(const uint8_t * event){ 6554 return event[9]; 6555 } 6556 /** 6557 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6558 * @param event packet 6559 * @return channel_mode 6560 * @note: btstack_type 1 6561 */ 6562 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){ 6563 return event[10]; 6564 } 6565 /** 6566 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6567 * @param event packet 6568 * @return num_channels 6569 * @note: btstack_type 1 6570 */ 6571 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_num_channels(const uint8_t * event){ 6572 return event[11]; 6573 } 6574 /** 6575 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6576 * @param event packet 6577 * @return sampling_frequency 6578 * @note: btstack_type 2 6579 */ 6580 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_sampling_frequency(const uint8_t * event){ 6581 return little_endian_read_16(event, 12); 6582 } 6583 /** 6584 * @brief Get field vbr from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6585 * @param event packet 6586 * @return vbr 6587 * @note: btstack_type 1 6588 */ 6589 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_vbr(const uint8_t * event){ 6590 return event[14]; 6591 } 6592 /** 6593 * @brief Get field bit_rate_index from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6594 * @param event packet 6595 * @return bit_rate_index 6596 * @note: btstack_type 1 6597 */ 6598 static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_bit_rate_index(const uint8_t * event){ 6599 return event[15]; 6600 } 6601 /** 6602 * @brief Get field maximum_sul from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 6603 * @param event packet 6604 * @return maximum_sul 6605 * @note: btstack_type 2 6606 */ 6607 static inline uint16_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_maximum_sul(const uint8_t * event){ 6608 return little_endian_read_16(event, 16); 6609 } 6610 6611 /** 6612 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6613 * @param event packet 6614 * @return avdtp_cid 6615 * @note: btstack_type 2 6616 */ 6617 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 6618 return little_endian_read_16(event, 3); 6619 } 6620 /** 6621 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6622 * @param event packet 6623 * @return local_seid 6624 * @note: btstack_type 1 6625 */ 6626 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 6627 return event[5]; 6628 } 6629 /** 6630 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6631 * @param event packet 6632 * @return remote_seid 6633 * @note: btstack_type 1 6634 */ 6635 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 6636 return event[6]; 6637 } 6638 /** 6639 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6640 * @param event packet 6641 * @return reconfigure 6642 * @note: btstack_type 1 6643 */ 6644 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 6645 return event[7]; 6646 } 6647 /** 6648 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6649 * @param event packet 6650 * @return media_type 6651 * @note: btstack_type 1 6652 */ 6653 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 6654 return event[8]; 6655 } 6656 /** 6657 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6658 * @param event packet 6659 * @return media_codec_type 6660 * @note: btstack_type 2 6661 */ 6662 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 6663 return little_endian_read_16(event, 9); 6664 } 6665 /** 6666 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6667 * @param event packet 6668 * @return media_codec_information_len 6669 * @note: btstack_type L 6670 */ 6671 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 6672 return little_endian_read_16(event, 11); 6673 } 6674 /** 6675 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 6676 * @param event packet 6677 * @return media_codec_information 6678 * @note: btstack_type V 6679 */ 6680 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 6681 return &event[13]; 6682 } 6683 6684 /** 6685 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 6686 * @param event packet 6687 * @return avdtp_cid 6688 * @note: btstack_type 2 6689 */ 6690 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 6691 return little_endian_read_16(event, 3); 6692 } 6693 /** 6694 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 6695 * @param event packet 6696 * @param Pointer to storage for bd_addr 6697 * @note: btstack_type B 6698 */ 6699 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6700 reverse_bytes(&event[5], bd_addr, 6); 6701 } 6702 /** 6703 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 6704 * @param event packet 6705 * @return local_seid 6706 * @note: btstack_type 1 6707 */ 6708 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 6709 return event[11]; 6710 } 6711 /** 6712 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 6713 * @param event packet 6714 * @return remote_seid 6715 * @note: btstack_type 1 6716 */ 6717 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 6718 return event[12]; 6719 } 6720 /** 6721 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 6722 * @param event packet 6723 * @return status 6724 * @note: btstack_type 1 6725 */ 6726 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 6727 return event[13]; 6728 } 6729 6730 /** 6731 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 6732 * @param event packet 6733 * @return avdtp_cid 6734 * @note: btstack_type 2 6735 */ 6736 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 6737 return little_endian_read_16(event, 3); 6738 } 6739 /** 6740 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 6741 * @param event packet 6742 * @return local_seid 6743 * @note: btstack_type 1 6744 */ 6745 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 6746 return event[5]; 6747 } 6748 6749 /** 6750 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 6751 * @param event packet 6752 * @return avdtp_cid 6753 * @note: btstack_type 2 6754 */ 6755 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 6756 return little_endian_read_16(event, 3); 6757 } 6758 /** 6759 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 6760 * @param event packet 6761 * @return local_seid 6762 * @note: btstack_type 1 6763 */ 6764 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 6765 return event[5]; 6766 } 6767 /** 6768 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 6769 * @param event packet 6770 * @return sequence_number 6771 * @note: btstack_type 2 6772 */ 6773 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 6774 return little_endian_read_16(event, 6); 6775 } 6776 6777 /** 6778 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE 6779 * @param event packet 6780 * @return avdtp_cid 6781 * @note: btstack_type 2 6782 */ 6783 static inline uint16_t avdtp_subevent_signaling_sep_dicovery_done_get_avdtp_cid(const uint8_t * event){ 6784 return little_endian_read_16(event, 3); 6785 } 6786 6787 /** 6788 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 6789 * @param event packet 6790 * @return avdtp_cid 6791 * @note: btstack_type 2 6792 */ 6793 static inline uint16_t avdtp_subevent_signaling_delay_report_get_avdtp_cid(const uint8_t * event){ 6794 return little_endian_read_16(event, 3); 6795 } 6796 /** 6797 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 6798 * @param event packet 6799 * @return local_seid 6800 * @note: btstack_type 1 6801 */ 6802 static inline uint8_t avdtp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 6803 return event[5]; 6804 } 6805 /** 6806 * @brief Get field delay_100us from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 6807 * @param event packet 6808 * @return delay_100us 6809 * @note: btstack_type 2 6810 */ 6811 static inline uint16_t avdtp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 6812 return little_endian_read_16(event, 6); 6813 } 6814 6815 /** 6816 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 6817 * @param event packet 6818 * @return a2dp_cid 6819 * @note: btstack_type 2 6820 */ 6821 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 6822 return little_endian_read_16(event, 3); 6823 } 6824 /** 6825 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 6826 * @param event packet 6827 * @return local_seid 6828 * @note: btstack_type 1 6829 */ 6830 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 6831 return event[5]; 6832 } 6833 6834 /** 6835 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6836 * @param event packet 6837 * @return a2dp_cid 6838 * @note: btstack_type 2 6839 */ 6840 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 6841 return little_endian_read_16(event, 3); 6842 } 6843 /** 6844 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6845 * @param event packet 6846 * @return local_seid 6847 * @note: btstack_type 1 6848 */ 6849 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 6850 return event[5]; 6851 } 6852 /** 6853 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6854 * @param event packet 6855 * @return remote_seid 6856 * @note: btstack_type 1 6857 */ 6858 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 6859 return event[6]; 6860 } 6861 /** 6862 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6863 * @param event packet 6864 * @return reconfigure 6865 * @note: btstack_type 1 6866 */ 6867 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 6868 return event[7]; 6869 } 6870 /** 6871 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6872 * @param event packet 6873 * @return media_type 6874 * @note: btstack_type 1 6875 */ 6876 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 6877 return event[8]; 6878 } 6879 /** 6880 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6881 * @param event packet 6882 * @return sampling_frequency 6883 * @note: btstack_type 2 6884 */ 6885 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 6886 return little_endian_read_16(event, 9); 6887 } 6888 /** 6889 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6890 * @param event packet 6891 * @return channel_mode 6892 * @note: btstack_type 1 6893 */ 6894 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 6895 return event[11]; 6896 } 6897 /** 6898 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6899 * @param event packet 6900 * @return num_channels 6901 * @note: btstack_type 1 6902 */ 6903 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 6904 return event[12]; 6905 } 6906 /** 6907 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6908 * @param event packet 6909 * @return block_length 6910 * @note: btstack_type 1 6911 */ 6912 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 6913 return event[13]; 6914 } 6915 /** 6916 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6917 * @param event packet 6918 * @return subbands 6919 * @note: btstack_type 1 6920 */ 6921 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 6922 return event[14]; 6923 } 6924 /** 6925 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6926 * @param event packet 6927 * @return allocation_method 6928 * @note: btstack_type 1 6929 */ 6930 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 6931 return event[15]; 6932 } 6933 /** 6934 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6935 * @param event packet 6936 * @return min_bitpool_value 6937 * @note: btstack_type 1 6938 */ 6939 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 6940 return event[16]; 6941 } 6942 /** 6943 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 6944 * @param event packet 6945 * @return max_bitpool_value 6946 * @note: btstack_type 1 6947 */ 6948 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 6949 return event[17]; 6950 } 6951 6952 /** 6953 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6954 * @param event packet 6955 * @return a2dp_cid 6956 * @note: btstack_type 2 6957 */ 6958 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_a2dp_cid(const uint8_t * event){ 6959 return little_endian_read_16(event, 3); 6960 } 6961 /** 6962 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6963 * @param event packet 6964 * @return local_seid 6965 * @note: btstack_type 1 6966 */ 6967 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_local_seid(const uint8_t * event){ 6968 return event[5]; 6969 } 6970 /** 6971 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6972 * @param event packet 6973 * @return remote_seid 6974 * @note: btstack_type 1 6975 */ 6976 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_remote_seid(const uint8_t * event){ 6977 return event[6]; 6978 } 6979 /** 6980 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6981 * @param event packet 6982 * @return reconfigure 6983 * @note: btstack_type 1 6984 */ 6985 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_reconfigure(const uint8_t * event){ 6986 return event[7]; 6987 } 6988 /** 6989 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6990 * @param event packet 6991 * @return media_type 6992 * @note: btstack_type 1 6993 */ 6994 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_type(const uint8_t * event){ 6995 return event[8]; 6996 } 6997 /** 6998 * @brief Get field layer from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 6999 * @param event packet 7000 * @return layer 7001 * @note: btstack_type 1 7002 */ 7003 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_layer(const uint8_t * event){ 7004 return event[9]; 7005 } 7006 /** 7007 * @brief Get field crc from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7008 * @param event packet 7009 * @return crc 7010 * @note: btstack_type 1 7011 */ 7012 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_crc(const uint8_t * event){ 7013 return event[10]; 7014 } 7015 /** 7016 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7017 * @param event packet 7018 * @return channel_mode 7019 * @note: btstack_type 1 7020 */ 7021 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){ 7022 return event[11]; 7023 } 7024 /** 7025 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7026 * @param event packet 7027 * @return num_channels 7028 * @note: btstack_type 1 7029 */ 7030 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_num_channels(const uint8_t * event){ 7031 return event[12]; 7032 } 7033 /** 7034 * @brief Get field media_payload_format from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7035 * @param event packet 7036 * @return media_payload_format 7037 * @note: btstack_type 1 7038 */ 7039 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_media_payload_format(const uint8_t * event){ 7040 return event[13]; 7041 } 7042 /** 7043 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7044 * @param event packet 7045 * @return sampling_frequency 7046 * @note: btstack_type 2 7047 */ 7048 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_sampling_frequency(const uint8_t * event){ 7049 return little_endian_read_16(event, 14); 7050 } 7051 /** 7052 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7053 * @param event packet 7054 * @return vbr 7055 * @note: btstack_type 1 7056 */ 7057 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_vbr(const uint8_t * event){ 7058 return event[16]; 7059 } 7060 /** 7061 * @brief Get field bit_rate_index from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION 7062 * @param event packet 7063 * @return bit_rate_index 7064 * @note: btstack_type 1 7065 */ 7066 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_bit_rate_index(const uint8_t * event){ 7067 return event[17]; 7068 } 7069 7070 /** 7071 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7072 * @param event packet 7073 * @return a2dp_cid 7074 * @note: btstack_type 2 7075 */ 7076 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_a2dp_cid(const uint8_t * event){ 7077 return little_endian_read_16(event, 3); 7078 } 7079 /** 7080 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7081 * @param event packet 7082 * @return local_seid 7083 * @note: btstack_type 1 7084 */ 7085 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_local_seid(const uint8_t * event){ 7086 return event[5]; 7087 } 7088 /** 7089 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7090 * @param event packet 7091 * @return remote_seid 7092 * @note: btstack_type 1 7093 */ 7094 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_remote_seid(const uint8_t * event){ 7095 return event[6]; 7096 } 7097 /** 7098 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7099 * @param event packet 7100 * @return reconfigure 7101 * @note: btstack_type 1 7102 */ 7103 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_reconfigure(const uint8_t * event){ 7104 return event[7]; 7105 } 7106 /** 7107 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7108 * @param event packet 7109 * @return media_type 7110 * @note: btstack_type 1 7111 */ 7112 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_media_type(const uint8_t * event){ 7113 return event[8]; 7114 } 7115 /** 7116 * @brief Get field object_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7117 * @param event packet 7118 * @return object_type 7119 * @note: btstack_type 1 7120 */ 7121 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_object_type(const uint8_t * event){ 7122 return event[9]; 7123 } 7124 /** 7125 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7126 * @param event packet 7127 * @return sampling_frequency 7128 * @note: btstack_type 3 7129 */ 7130 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_sampling_frequency(const uint8_t * event){ 7131 return little_endian_read_24(event, 10); 7132 } 7133 /** 7134 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7135 * @param event packet 7136 * @return num_channels 7137 * @note: btstack_type 1 7138 */ 7139 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_num_channels(const uint8_t * event){ 7140 return event[13]; 7141 } 7142 /** 7143 * @brief Get field bit_rate from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7144 * @param event packet 7145 * @return bit_rate 7146 * @note: btstack_type 3 7147 */ 7148 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_bit_rate(const uint8_t * event){ 7149 return little_endian_read_24(event, 14); 7150 } 7151 /** 7152 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CONFIGURATION 7153 * @param event packet 7154 * @return vbr 7155 * @note: btstack_type 1 7156 */ 7157 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_configuration_get_vbr(const uint8_t * event){ 7158 return event[17]; 7159 } 7160 7161 /** 7162 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7163 * @param event packet 7164 * @return a2dp_cid 7165 * @note: btstack_type 2 7166 */ 7167 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_a2dp_cid(const uint8_t * event){ 7168 return little_endian_read_16(event, 3); 7169 } 7170 /** 7171 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7172 * @param event packet 7173 * @return local_seid 7174 * @note: btstack_type 1 7175 */ 7176 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_local_seid(const uint8_t * event){ 7177 return event[5]; 7178 } 7179 /** 7180 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7181 * @param event packet 7182 * @return remote_seid 7183 * @note: btstack_type 1 7184 */ 7185 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_remote_seid(const uint8_t * event){ 7186 return event[6]; 7187 } 7188 /** 7189 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7190 * @param event packet 7191 * @return reconfigure 7192 * @note: btstack_type 1 7193 */ 7194 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_reconfigure(const uint8_t * event){ 7195 return event[7]; 7196 } 7197 /** 7198 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7199 * @param event packet 7200 * @return media_type 7201 * @note: btstack_type 1 7202 */ 7203 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_media_type(const uint8_t * event){ 7204 return event[8]; 7205 } 7206 /** 7207 * @brief Get field version from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7208 * @param event packet 7209 * @return version 7210 * @note: btstack_type 1 7211 */ 7212 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_version(const uint8_t * event){ 7213 return event[9]; 7214 } 7215 /** 7216 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7217 * @param event packet 7218 * @return channel_mode 7219 * @note: btstack_type 1 7220 */ 7221 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){ 7222 return event[10]; 7223 } 7224 /** 7225 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7226 * @param event packet 7227 * @return num_channels 7228 * @note: btstack_type 1 7229 */ 7230 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_num_channels(const uint8_t * event){ 7231 return event[11]; 7232 } 7233 /** 7234 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7235 * @param event packet 7236 * @return sampling_frequency 7237 * @note: btstack_type 2 7238 */ 7239 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_sampling_frequency(const uint8_t * event){ 7240 return little_endian_read_16(event, 12); 7241 } 7242 /** 7243 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7244 * @param event packet 7245 * @return vbr 7246 * @note: btstack_type 1 7247 */ 7248 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_vbr(const uint8_t * event){ 7249 return event[14]; 7250 } 7251 /** 7252 * @brief Get field bit_rate_index from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7253 * @param event packet 7254 * @return bit_rate_index 7255 * @note: btstack_type 1 7256 */ 7257 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_bit_rate_index(const uint8_t * event){ 7258 return event[15]; 7259 } 7260 /** 7261 * @brief Get field maximum_sul from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION 7262 * @param event packet 7263 * @return maximum_sul 7264 * @note: btstack_type 2 7265 */ 7266 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_maximum_sul(const uint8_t * event){ 7267 return little_endian_read_16(event, 16); 7268 } 7269 7270 /** 7271 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7272 * @param event packet 7273 * @return a2dp_cid 7274 * @note: btstack_type 2 7275 */ 7276 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 7277 return little_endian_read_16(event, 3); 7278 } 7279 /** 7280 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7281 * @param event packet 7282 * @return local_seid 7283 * @note: btstack_type 1 7284 */ 7285 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 7286 return event[5]; 7287 } 7288 /** 7289 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7290 * @param event packet 7291 * @return remote_seid 7292 * @note: btstack_type 1 7293 */ 7294 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 7295 return event[6]; 7296 } 7297 /** 7298 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7299 * @param event packet 7300 * @return reconfigure 7301 * @note: btstack_type 1 7302 */ 7303 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 7304 return event[7]; 7305 } 7306 /** 7307 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7308 * @param event packet 7309 * @return media_type 7310 * @note: btstack_type 1 7311 */ 7312 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 7313 return event[8]; 7314 } 7315 /** 7316 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7317 * @param event packet 7318 * @return media_codec_type 7319 * @note: btstack_type 2 7320 */ 7321 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 7322 return little_endian_read_16(event, 9); 7323 } 7324 /** 7325 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7326 * @param event packet 7327 * @return media_codec_information_len 7328 * @note: btstack_type L 7329 */ 7330 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 7331 return little_endian_read_16(event, 11); 7332 } 7333 /** 7334 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 7335 * @param event packet 7336 * @return media_codec_information 7337 * @note: btstack_type V 7338 */ 7339 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 7340 return &event[13]; 7341 } 7342 7343 /** 7344 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 7345 * @param event packet 7346 * @return a2dp_cid 7347 * @note: btstack_type 2 7348 */ 7349 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 7350 return little_endian_read_16(event, 3); 7351 } 7352 /** 7353 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 7354 * @param event packet 7355 * @param Pointer to storage for bd_addr 7356 * @note: btstack_type B 7357 */ 7358 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 7359 reverse_bytes(&event[5], bd_addr, 6); 7360 } 7361 /** 7362 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 7363 * @param event packet 7364 * @return local_seid 7365 * @note: btstack_type 1 7366 */ 7367 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 7368 return event[11]; 7369 } 7370 /** 7371 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 7372 * @param event packet 7373 * @return remote_seid 7374 * @note: btstack_type 1 7375 */ 7376 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 7377 return event[12]; 7378 } 7379 /** 7380 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 7381 * @param event packet 7382 * @return status 7383 * @note: btstack_type 1 7384 */ 7385 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 7386 return event[13]; 7387 } 7388 7389 /** 7390 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_START_STREAM_REQUESTED 7391 * @param event packet 7392 * @return a2dp_cid 7393 * @note: btstack_type 2 7394 */ 7395 static inline uint16_t a2dp_subevent_start_stream_requested_get_a2dp_cid(const uint8_t * event){ 7396 return little_endian_read_16(event, 3); 7397 } 7398 /** 7399 * @brief Get field local_seid from event A2DP_SUBEVENT_START_STREAM_REQUESTED 7400 * @param event packet 7401 * @return local_seid 7402 * @note: btstack_type 1 7403 */ 7404 static inline uint8_t a2dp_subevent_start_stream_requested_get_local_seid(const uint8_t * event){ 7405 return event[5]; 7406 } 7407 7408 /** 7409 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 7410 * @param event packet 7411 * @return a2dp_cid 7412 * @note: btstack_type 2 7413 */ 7414 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 7415 return little_endian_read_16(event, 3); 7416 } 7417 /** 7418 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 7419 * @param event packet 7420 * @return local_seid 7421 * @note: btstack_type 1 7422 */ 7423 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 7424 return event[5]; 7425 } 7426 7427 /** 7428 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 7429 * @param event packet 7430 * @return a2dp_cid 7431 * @note: btstack_type 2 7432 */ 7433 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 7434 return little_endian_read_16(event, 3); 7435 } 7436 /** 7437 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 7438 * @param event packet 7439 * @return local_seid 7440 * @note: btstack_type 1 7441 */ 7442 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 7443 return event[5]; 7444 } 7445 7446 /** 7447 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 7448 * @param event packet 7449 * @return a2dp_cid 7450 * @note: btstack_type 2 7451 */ 7452 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 7453 return little_endian_read_16(event, 3); 7454 } 7455 /** 7456 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 7457 * @param event packet 7458 * @return local_seid 7459 * @note: btstack_type 1 7460 */ 7461 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 7462 return event[5]; 7463 } 7464 7465 /** 7466 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 7467 * @param event packet 7468 * @return a2dp_cid 7469 * @note: btstack_type 2 7470 */ 7471 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 7472 return little_endian_read_16(event, 3); 7473 } 7474 /** 7475 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 7476 * @param event packet 7477 * @return local_seid 7478 * @note: btstack_type 1 7479 */ 7480 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 7481 return event[5]; 7482 } 7483 7484 /** 7485 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 7486 * @param event packet 7487 * @return a2dp_cid 7488 * @note: btstack_type 2 7489 */ 7490 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 7491 return little_endian_read_16(event, 3); 7492 } 7493 /** 7494 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 7495 * @param event packet 7496 * @return local_seid 7497 * @note: btstack_type 1 7498 */ 7499 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 7500 return event[5]; 7501 } 7502 /** 7503 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 7504 * @param event packet 7505 * @return signal_identifier 7506 * @note: btstack_type 1 7507 */ 7508 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 7509 return event[6]; 7510 } 7511 7512 /** 7513 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 7514 * @param event packet 7515 * @return a2dp_cid 7516 * @note: btstack_type 2 7517 */ 7518 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 7519 return little_endian_read_16(event, 3); 7520 } 7521 /** 7522 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 7523 * @param event packet 7524 * @return local_seid 7525 * @note: btstack_type 1 7526 */ 7527 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 7528 return event[5]; 7529 } 7530 /** 7531 * @brief Get field is_initiator from event A2DP_SUBEVENT_COMMAND_REJECTED 7532 * @param event packet 7533 * @return is_initiator 7534 * @note: btstack_type 1 7535 */ 7536 static inline uint8_t a2dp_subevent_command_rejected_get_is_initiator(const uint8_t * event){ 7537 return event[6]; 7538 } 7539 /** 7540 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 7541 * @param event packet 7542 * @return signal_identifier 7543 * @note: btstack_type 1 7544 */ 7545 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 7546 return event[7]; 7547 } 7548 7549 /** 7550 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 7551 * @param event packet 7552 * @return a2dp_cid 7553 * @note: btstack_type 2 7554 */ 7555 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 7556 return little_endian_read_16(event, 3); 7557 } 7558 /** 7559 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 7560 * @param event packet 7561 * @param Pointer to storage for bd_addr 7562 * @note: btstack_type B 7563 */ 7564 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 7565 reverse_bytes(&event[5], bd_addr, 6); 7566 } 7567 /** 7568 * @brief Get field con_handle from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 7569 * @param event packet 7570 * @return con_handle 7571 * @note: btstack_type 2 7572 */ 7573 static inline uint16_t a2dp_subevent_signaling_connection_established_get_con_handle(const uint8_t * event){ 7574 return little_endian_read_16(event, 11); 7575 } 7576 /** 7577 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 7578 * @param event packet 7579 * @return status 7580 * @note: btstack_type 1 7581 */ 7582 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 7583 return event[13]; 7584 } 7585 7586 /** 7587 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 7588 * @param event packet 7589 * @return a2dp_cid 7590 * @note: btstack_type 2 7591 */ 7592 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 7593 return little_endian_read_16(event, 3); 7594 } 7595 7596 /** 7597 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 7598 * @param event packet 7599 * @return a2dp_cid 7600 * @note: btstack_type 2 7601 */ 7602 static inline uint16_t a2dp_subevent_stream_reconfigured_get_a2dp_cid(const uint8_t * event){ 7603 return little_endian_read_16(event, 3); 7604 } 7605 /** 7606 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 7607 * @param event packet 7608 * @return local_seid 7609 * @note: btstack_type 1 7610 */ 7611 static inline uint8_t a2dp_subevent_stream_reconfigured_get_local_seid(const uint8_t * event){ 7612 return event[5]; 7613 } 7614 /** 7615 * @brief Get field status from event A2DP_SUBEVENT_STREAM_RECONFIGURED 7616 * @param event packet 7617 * @return status 7618 * @note: btstack_type 1 7619 */ 7620 static inline uint8_t a2dp_subevent_stream_reconfigured_get_status(const uint8_t * event){ 7621 return event[6]; 7622 } 7623 7624 /** 7625 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7626 * @param event packet 7627 * @return a2dp_cid 7628 * @note: btstack_type 2 7629 */ 7630 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_capability_get_a2dp_cid(const uint8_t * event){ 7631 return little_endian_read_16(event, 3); 7632 } 7633 /** 7634 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7635 * @param event packet 7636 * @return remote_seid 7637 * @note: btstack_type 1 7638 */ 7639 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 7640 return event[5]; 7641 } 7642 /** 7643 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7644 * @param event packet 7645 * @return media_type 7646 * @note: btstack_type 1 7647 */ 7648 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 7649 return event[6]; 7650 } 7651 /** 7652 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7653 * @param event packet 7654 * @return sampling_frequency_bitmap 7655 * @note: btstack_type 1 7656 */ 7657 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 7658 return event[7]; 7659 } 7660 /** 7661 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7662 * @param event packet 7663 * @return channel_mode_bitmap 7664 * @note: btstack_type 1 7665 */ 7666 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 7667 return event[8]; 7668 } 7669 /** 7670 * @brief Get field block_length_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7671 * @param event packet 7672 * @return block_length_bitmap 7673 * @note: btstack_type 1 7674 */ 7675 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 7676 return event[9]; 7677 } 7678 /** 7679 * @brief Get field subbands_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7680 * @param event packet 7681 * @return subbands_bitmap 7682 * @note: btstack_type 1 7683 */ 7684 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 7685 return event[10]; 7686 } 7687 /** 7688 * @brief Get field allocation_method_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7689 * @param event packet 7690 * @return allocation_method_bitmap 7691 * @note: btstack_type 1 7692 */ 7693 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 7694 return event[11]; 7695 } 7696 /** 7697 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7698 * @param event packet 7699 * @return min_bitpool_value 7700 * @note: btstack_type 1 7701 */ 7702 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 7703 return event[12]; 7704 } 7705 /** 7706 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 7707 * @param event packet 7708 * @return max_bitpool_value 7709 * @note: btstack_type 1 7710 */ 7711 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 7712 return event[13]; 7713 } 7714 7715 /** 7716 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7717 * @param event packet 7718 * @return a2dp_cid 7719 * @note: btstack_type 2 7720 */ 7721 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_a2dp_cid(const uint8_t * event){ 7722 return little_endian_read_16(event, 3); 7723 } 7724 /** 7725 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7726 * @param event packet 7727 * @return remote_seid 7728 * @note: btstack_type 1 7729 */ 7730 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_remote_seid(const uint8_t * event){ 7731 return event[5]; 7732 } 7733 /** 7734 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7735 * @param event packet 7736 * @return media_type 7737 * @note: btstack_type 1 7738 */ 7739 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_type(const uint8_t * event){ 7740 return event[6]; 7741 } 7742 /** 7743 * @brief Get field layer_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7744 * @param event packet 7745 * @return layer_bitmap 7746 * @note: btstack_type 1 7747 */ 7748 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_layer_bitmap(const uint8_t * event){ 7749 return event[7]; 7750 } 7751 /** 7752 * @brief Get field crc from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7753 * @param event packet 7754 * @return crc 7755 * @note: btstack_type 1 7756 */ 7757 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_crc(const uint8_t * event){ 7758 return event[8]; 7759 } 7760 /** 7761 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7762 * @param event packet 7763 * @return channel_mode_bitmap 7764 * @note: btstack_type 1 7765 */ 7766 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_channel_mode_bitmap(const uint8_t * event){ 7767 return event[9]; 7768 } 7769 /** 7770 * @brief Get field media_payload_format from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7771 * @param event packet 7772 * @return media_payload_format 7773 * @note: btstack_type 1 7774 */ 7775 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_media_payload_format(const uint8_t * event){ 7776 return event[10]; 7777 } 7778 /** 7779 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7780 * @param event packet 7781 * @return sampling_frequency_bitmap 7782 * @note: btstack_type 1 7783 */ 7784 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 7785 return event[11]; 7786 } 7787 /** 7788 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7789 * @param event packet 7790 * @return vbr 7791 * @note: btstack_type 1 7792 */ 7793 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_vbr(const uint8_t * event){ 7794 return event[12]; 7795 } 7796 /** 7797 * @brief Get field bit_rate_index_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CAPABILITY 7798 * @param event packet 7799 * @return bit_rate_index_bitmap 7800 * @note: btstack_type 2 7801 */ 7802 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_audio_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 7803 return little_endian_read_16(event, 13); 7804 } 7805 7806 /** 7807 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7808 * @param event packet 7809 * @return a2dp_cid 7810 * @note: btstack_type 2 7811 */ 7812 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_a2dp_cid(const uint8_t * event){ 7813 return little_endian_read_16(event, 3); 7814 } 7815 /** 7816 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7817 * @param event packet 7818 * @return remote_seid 7819 * @note: btstack_type 1 7820 */ 7821 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_remote_seid(const uint8_t * event){ 7822 return event[5]; 7823 } 7824 /** 7825 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7826 * @param event packet 7827 * @return media_type 7828 * @note: btstack_type 1 7829 */ 7830 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_media_type(const uint8_t * event){ 7831 return event[6]; 7832 } 7833 /** 7834 * @brief Get field object_type_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7835 * @param event packet 7836 * @return object_type_bitmap 7837 * @note: btstack_type 1 7838 */ 7839 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_object_type_bitmap(const uint8_t * event){ 7840 return event[7]; 7841 } 7842 /** 7843 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7844 * @param event packet 7845 * @return sampling_frequency_bitmap 7846 * @note: btstack_type 2 7847 */ 7848 static inline uint16_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 7849 return little_endian_read_16(event, 8); 7850 } 7851 /** 7852 * @brief Get field channels_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7853 * @param event packet 7854 * @return channels_bitmap 7855 * @note: btstack_type 1 7856 */ 7857 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_channels_bitmap(const uint8_t * event){ 7858 return event[10]; 7859 } 7860 /** 7861 * @brief Get field bit_rate from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7862 * @param event packet 7863 * @return bit_rate 7864 * @note: btstack_type 3 7865 */ 7866 static inline uint32_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_bit_rate(const uint8_t * event){ 7867 return little_endian_read_24(event, 11); 7868 } 7869 /** 7870 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AAC_CAPABILITY 7871 * @param event packet 7872 * @return vbr 7873 * @note: btstack_type 1 7874 */ 7875 static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_aac_capability_get_vbr(const uint8_t * event){ 7876 return event[14]; 7877 } 7878 7879 /** 7880 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7881 * @param event packet 7882 * @return a2dp_cid 7883 * @note: btstack_type 2 7884 */ 7885 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_capability_get_a2dp_cid(const uint8_t * event){ 7886 return little_endian_read_16(event, 3); 7887 } 7888 /** 7889 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7890 * @param event packet 7891 * @return remote_seid 7892 * @note: btstack_type 1 7893 */ 7894 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_remote_seid(const uint8_t * event){ 7895 return event[5]; 7896 } 7897 /** 7898 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7899 * @param event packet 7900 * @return media_type 7901 * @note: btstack_type 1 7902 */ 7903 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_media_type(const uint8_t * event){ 7904 return event[6]; 7905 } 7906 /** 7907 * @brief Get field version from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7908 * @param event packet 7909 * @return version 7910 * @note: btstack_type 1 7911 */ 7912 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_version(const uint8_t * event){ 7913 return event[7]; 7914 } 7915 /** 7916 * @brief Get field channel_mode_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7917 * @param event packet 7918 * @return channel_mode_bitmap 7919 * @note: btstack_type 1 7920 */ 7921 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_channel_mode_bitmap(const uint8_t * event){ 7922 return event[8]; 7923 } 7924 /** 7925 * @brief Get field sampling_frequency_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7926 * @param event packet 7927 * @return sampling_frequency_bitmap 7928 * @note: btstack_type 1 7929 */ 7930 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 7931 return event[9]; 7932 } 7933 /** 7934 * @brief Get field vbr from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7935 * @param event packet 7936 * @return vbr 7937 * @note: btstack_type 1 7938 */ 7939 static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_capability_get_vbr(const uint8_t * event){ 7940 return event[10]; 7941 } 7942 /** 7943 * @brief Get field bit_rate_index_bitmap from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7944 * @param event packet 7945 * @return bit_rate_index_bitmap 7946 * @note: btstack_type 3 7947 */ 7948 static inline uint32_t a2dp_subevent_signaling_media_codec_atrac_capability_get_bit_rate_index_bitmap(const uint8_t * event){ 7949 return little_endian_read_24(event, 11); 7950 } 7951 /** 7952 * @brief Get field maximum_sul from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CAPABILITY 7953 * @param event packet 7954 * @return maximum_sul 7955 * @note: btstack_type 2 7956 */ 7957 static inline uint16_t a2dp_subevent_signaling_media_codec_atrac_capability_get_maximum_sul(const uint8_t * event){ 7958 return little_endian_read_16(event, 14); 7959 } 7960 7961 /** 7962 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7963 * @param event packet 7964 * @return a2dp_cid 7965 * @note: btstack_type 2 7966 */ 7967 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_a2dp_cid(const uint8_t * event){ 7968 return little_endian_read_16(event, 3); 7969 } 7970 /** 7971 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7972 * @param event packet 7973 * @return remote_seid 7974 * @note: btstack_type 1 7975 */ 7976 static inline uint8_t a2dp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 7977 return event[5]; 7978 } 7979 /** 7980 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7981 * @param event packet 7982 * @return media_type 7983 * @note: btstack_type 1 7984 */ 7985 static inline uint8_t a2dp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 7986 return event[6]; 7987 } 7988 /** 7989 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7990 * @param event packet 7991 * @return media_codec_type 7992 * @note: btstack_type 2 7993 */ 7994 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 7995 return little_endian_read_16(event, 7); 7996 } 7997 /** 7998 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 7999 * @param event packet 8000 * @return media_codec_information_len 8001 * @note: btstack_type L 8002 */ 8003 static inline uint16_t a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 8004 return little_endian_read_16(event, 9); 8005 } 8006 /** 8007 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 8008 * @param event packet 8009 * @return media_codec_information 8010 * @note: btstack_type V 8011 */ 8012 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 8013 return &event[11]; 8014 } 8015 8016 /** 8017 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 8018 * @param event packet 8019 * @return a2dp_cid 8020 * @note: btstack_type 2 8021 */ 8022 static inline uint16_t a2dp_subevent_signaling_delay_reporting_capability_get_a2dp_cid(const uint8_t * event){ 8023 return little_endian_read_16(event, 3); 8024 } 8025 /** 8026 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 8027 * @param event packet 8028 * @return remote_seid 8029 * @note: btstack_type 1 8030 */ 8031 static inline uint8_t a2dp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 8032 return event[5]; 8033 } 8034 8035 /** 8036 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 8037 * @param event packet 8038 * @return a2dp_cid 8039 * @note: btstack_type 2 8040 */ 8041 static inline uint16_t a2dp_subevent_signaling_delay_report_get_a2dp_cid(const uint8_t * event){ 8042 return little_endian_read_16(event, 3); 8043 } 8044 /** 8045 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 8046 * @param event packet 8047 * @return local_seid 8048 * @note: btstack_type 1 8049 */ 8050 static inline uint8_t a2dp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 8051 return event[5]; 8052 } 8053 /** 8054 * @brief Get field delay_100us from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 8055 * @param event packet 8056 * @return delay_100us 8057 * @note: btstack_type 2 8058 */ 8059 static inline uint16_t a2dp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 8060 return little_endian_read_16(event, 6); 8061 } 8062 8063 /** 8064 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 8065 * @param event packet 8066 * @return a2dp_cid 8067 * @note: btstack_type 2 8068 */ 8069 static inline uint16_t a2dp_subevent_signaling_capabilities_done_get_a2dp_cid(const uint8_t * event){ 8070 return little_endian_read_16(event, 3); 8071 } 8072 /** 8073 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 8074 * @param event packet 8075 * @return remote_seid 8076 * @note: btstack_type 1 8077 */ 8078 static inline uint8_t a2dp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 8079 return event[5]; 8080 } 8081 8082 /** 8083 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_COMPLETE 8084 * @param event packet 8085 * @return a2dp_cid 8086 * @note: btstack_type 2 8087 */ 8088 static inline uint16_t a2dp_subevent_signaling_capabilities_complete_get_a2dp_cid(const uint8_t * event){ 8089 return little_endian_read_16(event, 3); 8090 } 8091 8092 /** 8093 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 8094 * @param event packet 8095 * @return avrcp_cid 8096 * @note: btstack_type 2 8097 */ 8098 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 8099 return little_endian_read_16(event, 3); 8100 } 8101 /** 8102 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 8103 * @param event packet 8104 * @return command_type 8105 * @note: btstack_type 1 8106 */ 8107 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 8108 return event[5]; 8109 } 8110 /** 8111 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 8112 * @param event packet 8113 * @return play_status 8114 * @note: btstack_type 1 8115 */ 8116 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 8117 return event[6]; 8118 } 8119 8120 /** 8121 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 8122 * @param event packet 8123 * @return avrcp_cid 8124 * @note: btstack_type 2 8125 */ 8126 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 8127 return little_endian_read_16(event, 3); 8128 } 8129 /** 8130 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 8131 * @param event packet 8132 * @return command_type 8133 * @note: btstack_type 1 8134 */ 8135 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 8136 return event[5]; 8137 } 8138 8139 /** 8140 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END 8141 * @param event packet 8142 * @return avrcp_cid 8143 * @note: btstack_type 2 8144 */ 8145 static inline uint16_t avrcp_subevent_notification_event_track_reached_end_get_avrcp_cid(const uint8_t * event){ 8146 return little_endian_read_16(event, 3); 8147 } 8148 /** 8149 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_END 8150 * @param event packet 8151 * @return command_type 8152 * @note: btstack_type 1 8153 */ 8154 static inline uint8_t avrcp_subevent_notification_event_track_reached_end_get_command_type(const uint8_t * event){ 8155 return event[5]; 8156 } 8157 8158 /** 8159 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START 8160 * @param event packet 8161 * @return avrcp_cid 8162 * @note: btstack_type 2 8163 */ 8164 static inline uint16_t avrcp_subevent_notification_event_track_reached_start_get_avrcp_cid(const uint8_t * event){ 8165 return little_endian_read_16(event, 3); 8166 } 8167 /** 8168 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_TRACK_REACHED_START 8169 * @param event packet 8170 * @return command_type 8171 * @note: btstack_type 1 8172 */ 8173 static inline uint8_t avrcp_subevent_notification_event_track_reached_start_get_command_type(const uint8_t * event){ 8174 return event[5]; 8175 } 8176 8177 /** 8178 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 8179 * @param event packet 8180 * @return avrcp_cid 8181 * @note: btstack_type 2 8182 */ 8183 static inline uint16_t avrcp_subevent_notification_event_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 8184 return little_endian_read_16(event, 3); 8185 } 8186 /** 8187 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 8188 * @param event packet 8189 * @return command_type 8190 * @note: btstack_type 1 8191 */ 8192 static inline uint8_t avrcp_subevent_notification_event_playback_pos_changed_get_command_type(const uint8_t * event){ 8193 return event[5]; 8194 } 8195 /** 8196 * @brief Get field playback_position from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_PLAYBACK_POS_CHANGED 8197 * @param event packet 8198 * @return playback_position 8199 * @note: btstack_type 4 8200 */ 8201 static inline uint32_t avrcp_subevent_notification_event_playback_pos_changed_get_playback_position(const uint8_t * event){ 8202 return little_endian_read_32(event, 6); 8203 } 8204 8205 /** 8206 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 8207 * @param event packet 8208 * @return avrcp_cid 8209 * @note: btstack_type 2 8210 */ 8211 static inline uint16_t avrcp_subevent_notification_event_batt_status_changed_get_avrcp_cid(const uint8_t * event){ 8212 return little_endian_read_16(event, 3); 8213 } 8214 /** 8215 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 8216 * @param event packet 8217 * @return command_type 8218 * @note: btstack_type 1 8219 */ 8220 static inline uint8_t avrcp_subevent_notification_event_batt_status_changed_get_command_type(const uint8_t * event){ 8221 return event[5]; 8222 } 8223 /** 8224 * @brief Get field battery_status from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_BATT_STATUS_CHANGED 8225 * @param event packet 8226 * @return battery_status 8227 * @note: btstack_type 1 8228 */ 8229 static inline uint8_t avrcp_subevent_notification_event_batt_status_changed_get_battery_status(const uint8_t * event){ 8230 return event[6]; 8231 } 8232 8233 /** 8234 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 8235 * @param event packet 8236 * @return avrcp_cid 8237 * @note: btstack_type 2 8238 */ 8239 static inline uint16_t avrcp_subevent_notification_event_system_status_changed_get_avrcp_cid(const uint8_t * event){ 8240 return little_endian_read_16(event, 3); 8241 } 8242 /** 8243 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 8244 * @param event packet 8245 * @return command_type 8246 * @note: btstack_type 1 8247 */ 8248 static inline uint8_t avrcp_subevent_notification_event_system_status_changed_get_command_type(const uint8_t * event){ 8249 return event[5]; 8250 } 8251 /** 8252 * @brief Get field system_status from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_SYSTEM_STATUS_CHANGED 8253 * @param event packet 8254 * @return system_status 8255 * @note: btstack_type 1 8256 */ 8257 static inline uint8_t avrcp_subevent_notification_event_system_status_changed_get_system_status(const uint8_t * event){ 8258 return event[6]; 8259 } 8260 8261 /** 8262 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 8263 * @param event packet 8264 * @return avrcp_cid 8265 * @note: btstack_type 2 8266 */ 8267 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 8268 return little_endian_read_16(event, 3); 8269 } 8270 /** 8271 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 8272 * @param event packet 8273 * @return command_type 8274 * @note: btstack_type 1 8275 */ 8276 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 8277 return event[5]; 8278 } 8279 8280 /** 8281 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 8282 * @param event packet 8283 * @return avrcp_cid 8284 * @note: btstack_type 2 8285 */ 8286 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 8287 return little_endian_read_16(event, 3); 8288 } 8289 /** 8290 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 8291 * @param event packet 8292 * @return command_type 8293 * @note: btstack_type 1 8294 */ 8295 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 8296 return event[5]; 8297 } 8298 8299 /** 8300 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 8301 * @param event packet 8302 * @return avrcp_cid 8303 * @note: btstack_type 2 8304 */ 8305 static inline uint16_t avrcp_subevent_notification_event_uids_changed_get_avrcp_cid(const uint8_t * event){ 8306 return little_endian_read_16(event, 3); 8307 } 8308 /** 8309 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 8310 * @param event packet 8311 * @return command_type 8312 * @note: btstack_type 1 8313 */ 8314 static inline uint8_t avrcp_subevent_notification_event_uids_changed_get_command_type(const uint8_t * event){ 8315 return event[5]; 8316 } 8317 /** 8318 * @brief Get field uid_counter from event AVRCP_SUBEVENT_NOTIFICATION_EVENT_UIDS_CHANGED 8319 * @param event packet 8320 * @return uid_counter 8321 * @note: btstack_type 2 8322 */ 8323 static inline uint16_t avrcp_subevent_notification_event_uids_changed_get_uid_counter(const uint8_t * event){ 8324 return little_endian_read_16(event, 6); 8325 } 8326 8327 /** 8328 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 8329 * @param event packet 8330 * @return avrcp_cid 8331 * @note: btstack_type 2 8332 */ 8333 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 8334 return little_endian_read_16(event, 3); 8335 } 8336 /** 8337 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 8338 * @param event packet 8339 * @return command_type 8340 * @note: btstack_type 1 8341 */ 8342 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 8343 return event[5]; 8344 } 8345 /** 8346 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 8347 * @param event packet 8348 * @return absolute_volume 8349 * @note: btstack_type 1 8350 */ 8351 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 8352 return event[6]; 8353 } 8354 8355 /** 8356 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 8357 * @param event packet 8358 * @return avrcp_cid 8359 * @note: btstack_type 2 8360 */ 8361 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 8362 return little_endian_read_16(event, 3); 8363 } 8364 /** 8365 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 8366 * @param event packet 8367 * @return command_type 8368 * @note: btstack_type 1 8369 */ 8370 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 8371 return event[5]; 8372 } 8373 /** 8374 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 8375 * @param event packet 8376 * @return absolute_volume 8377 * @note: btstack_type 1 8378 */ 8379 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 8380 return event[6]; 8381 } 8382 8383 /** 8384 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_STATE 8385 * @param event packet 8386 * @return avrcp_cid 8387 * @note: btstack_type 2 8388 */ 8389 static inline uint16_t avrcp_subevent_notification_state_get_avrcp_cid(const uint8_t * event){ 8390 return little_endian_read_16(event, 3); 8391 } 8392 /** 8393 * @brief Get field status from event AVRCP_SUBEVENT_NOTIFICATION_STATE 8394 * @param event packet 8395 * @return status 8396 * @note: btstack_type 1 8397 */ 8398 static inline uint8_t avrcp_subevent_notification_state_get_status(const uint8_t * event){ 8399 return event[5]; 8400 } 8401 /** 8402 * @brief Get field enabled from event AVRCP_SUBEVENT_NOTIFICATION_STATE 8403 * @param event packet 8404 * @return enabled 8405 * @note: btstack_type 1 8406 */ 8407 static inline uint8_t avrcp_subevent_notification_state_get_enabled(const uint8_t * event){ 8408 return event[6]; 8409 } 8410 /** 8411 * @brief Get field event_id from event AVRCP_SUBEVENT_NOTIFICATION_STATE 8412 * @param event packet 8413 * @return event_id 8414 * @note: btstack_type 1 8415 */ 8416 static inline uint8_t avrcp_subevent_notification_state_get_event_id(const uint8_t * event){ 8417 return event[7]; 8418 } 8419 8420 /** 8421 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 8422 * @param event packet 8423 * @return status 8424 * @note: btstack_type 1 8425 */ 8426 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 8427 return event[3]; 8428 } 8429 /** 8430 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 8431 * @param event packet 8432 * @return avrcp_cid 8433 * @note: btstack_type 2 8434 */ 8435 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 8436 return little_endian_read_16(event, 4); 8437 } 8438 /** 8439 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 8440 * @param event packet 8441 * @param Pointer to storage for bd_addr 8442 * @note: btstack_type B 8443 */ 8444 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 8445 reverse_bytes(&event[6], bd_addr, 6); 8446 } 8447 /** 8448 * @brief Get field con_handle from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 8449 * @param event packet 8450 * @return con_handle 8451 * @note: btstack_type 2 8452 */ 8453 static inline uint16_t avrcp_subevent_connection_established_get_con_handle(const uint8_t * event){ 8454 return little_endian_read_16(event, 12); 8455 } 8456 8457 /** 8458 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 8459 * @param event packet 8460 * @return avrcp_cid 8461 * @note: btstack_type 2 8462 */ 8463 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 8464 return little_endian_read_16(event, 3); 8465 } 8466 8467 /** 8468 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 8469 * @param event packet 8470 * @return avrcp_cid 8471 * @note: btstack_type 2 8472 */ 8473 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 8474 return little_endian_read_16(event, 3); 8475 } 8476 /** 8477 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 8478 * @param event packet 8479 * @return command_type 8480 * @note: btstack_type 1 8481 */ 8482 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 8483 return event[5]; 8484 } 8485 /** 8486 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 8487 * @param event packet 8488 * @return repeat_mode 8489 * @note: btstack_type 1 8490 */ 8491 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 8492 return event[6]; 8493 } 8494 /** 8495 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 8496 * @param event packet 8497 * @return shuffle_mode 8498 * @note: btstack_type 1 8499 */ 8500 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 8501 return event[7]; 8502 } 8503 8504 /** 8505 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 8506 * @param event packet 8507 * @return avrcp_cid 8508 * @note: btstack_type 2 8509 */ 8510 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 8511 return little_endian_read_16(event, 3); 8512 } 8513 /** 8514 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 8515 * @param event packet 8516 * @return command_type 8517 * @note: btstack_type 1 8518 */ 8519 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 8520 return event[5]; 8521 } 8522 /** 8523 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 8524 * @param event packet 8525 * @return song_length 8526 * @note: btstack_type 4 8527 */ 8528 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 8529 return little_endian_read_32(event, 6); 8530 } 8531 /** 8532 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 8533 * @param event packet 8534 * @return song_position 8535 * @note: btstack_type 4 8536 */ 8537 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 8538 return little_endian_read_32(event, 10); 8539 } 8540 /** 8541 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 8542 * @param event packet 8543 * @return play_status 8544 * @note: btstack_type 1 8545 */ 8546 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 8547 return event[14]; 8548 } 8549 8550 /** 8551 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 8552 * @param event packet 8553 * @return avrcp_cid 8554 * @note: btstack_type 2 8555 */ 8556 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 8557 return little_endian_read_16(event, 3); 8558 } 8559 /** 8560 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 8561 * @param event packet 8562 * @return command_type 8563 * @note: btstack_type 1 8564 */ 8565 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 8566 return event[5]; 8567 } 8568 /** 8569 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 8570 * @param event packet 8571 * @return operation_id 8572 * @note: btstack_type 1 8573 */ 8574 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 8575 return event[6]; 8576 } 8577 8578 /** 8579 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 8580 * @param event packet 8581 * @return avrcp_cid 8582 * @note: btstack_type 2 8583 */ 8584 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 8585 return little_endian_read_16(event, 3); 8586 } 8587 /** 8588 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 8589 * @param event packet 8590 * @return command_type 8591 * @note: btstack_type 1 8592 */ 8593 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 8594 return event[5]; 8595 } 8596 /** 8597 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 8598 * @param event packet 8599 * @return operation_id 8600 * @note: btstack_type 1 8601 */ 8602 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 8603 return event[6]; 8604 } 8605 8606 /** 8607 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 8608 * @param event packet 8609 * @return avrcp_cid 8610 * @note: btstack_type 2 8611 */ 8612 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 8613 return little_endian_read_16(event, 3); 8614 } 8615 /** 8616 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 8617 * @param event packet 8618 * @return command_type 8619 * @note: btstack_type 1 8620 */ 8621 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 8622 return event[5]; 8623 } 8624 8625 /** 8626 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 8627 * @param event packet 8628 * @return avrcp_cid 8629 * @note: btstack_type 2 8630 */ 8631 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 8632 return little_endian_read_16(event, 3); 8633 } 8634 8635 /** 8636 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 8637 * @param event packet 8638 * @return avrcp_cid 8639 * @note: btstack_type 2 8640 */ 8641 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 8642 return little_endian_read_16(event, 3); 8643 } 8644 /** 8645 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 8646 * @param event packet 8647 * @return operation_id 8648 * @note: btstack_type 1 8649 */ 8650 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 8651 return event[5]; 8652 } 8653 /** 8654 * @brief Get field button_pressed from event AVRCP_SUBEVENT_OPERATION 8655 * @param event packet 8656 * @return button_pressed 8657 * @note: btstack_type 1 8658 */ 8659 static inline uint8_t avrcp_subevent_operation_get_button_pressed(const uint8_t * event){ 8660 return event[6]; 8661 } 8662 /** 8663 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 8664 * @param event packet 8665 * @return operands_length 8666 * @note: btstack_type 1 8667 */ 8668 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 8669 return event[7]; 8670 } 8671 /** 8672 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 8673 * @param event packet 8674 * @return operand 8675 * @note: btstack_type 1 8676 */ 8677 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 8678 return event[8]; 8679 } 8680 8681 /** 8682 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 8683 * @param event packet 8684 * @return avrcp_cid 8685 * @note: btstack_type 2 8686 */ 8687 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 8688 return little_endian_read_16(event, 3); 8689 } 8690 /** 8691 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 8692 * @param event packet 8693 * @return command_type 8694 * @note: btstack_type 1 8695 */ 8696 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 8697 return event[5]; 8698 } 8699 /** 8700 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 8701 * @param event packet 8702 * @return track 8703 * @note: btstack_type 1 8704 */ 8705 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 8706 return event[6]; 8707 } 8708 8709 /** 8710 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 8711 * @param event packet 8712 * @return avrcp_cid 8713 * @note: btstack_type 2 8714 */ 8715 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 8716 return little_endian_read_16(event, 3); 8717 } 8718 /** 8719 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 8720 * @param event packet 8721 * @return command_type 8722 * @note: btstack_type 1 8723 */ 8724 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 8725 return event[5]; 8726 } 8727 /** 8728 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 8729 * @param event packet 8730 * @return total_tracks 8731 * @note: btstack_type 1 8732 */ 8733 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 8734 return event[6]; 8735 } 8736 8737 /** 8738 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 8739 * @param event packet 8740 * @return avrcp_cid 8741 * @note: btstack_type 2 8742 */ 8743 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 8744 return little_endian_read_16(event, 3); 8745 } 8746 /** 8747 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 8748 * @param event packet 8749 * @return command_type 8750 * @note: btstack_type 1 8751 */ 8752 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 8753 return event[5]; 8754 } 8755 /** 8756 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 8757 * @param event packet 8758 * @return song_length 8759 * @note: btstack_type 4 8760 */ 8761 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 8762 return little_endian_read_32(event, 6); 8763 } 8764 8765 /** 8766 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 8767 * @param event packet 8768 * @return avrcp_cid 8769 * @note: btstack_type 2 8770 */ 8771 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 8772 return little_endian_read_16(event, 3); 8773 } 8774 /** 8775 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 8776 * @param event packet 8777 * @return command_type 8778 * @note: btstack_type 1 8779 */ 8780 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 8781 return event[5]; 8782 } 8783 /** 8784 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 8785 * @param event packet 8786 * @return value_len 8787 * @note: btstack_type J 8788 */ 8789 static inline uint8_t avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 8790 return event[6]; 8791 } 8792 /** 8793 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 8794 * @param event packet 8795 * @return value 8796 * @note: btstack_type V 8797 */ 8798 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 8799 return &event[7]; 8800 } 8801 8802 /** 8803 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 8804 * @param event packet 8805 * @return avrcp_cid 8806 * @note: btstack_type 2 8807 */ 8808 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 8809 return little_endian_read_16(event, 3); 8810 } 8811 /** 8812 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 8813 * @param event packet 8814 * @return command_type 8815 * @note: btstack_type 1 8816 */ 8817 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 8818 return event[5]; 8819 } 8820 /** 8821 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 8822 * @param event packet 8823 * @return value_len 8824 * @note: btstack_type J 8825 */ 8826 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 8827 return event[6]; 8828 } 8829 /** 8830 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 8831 * @param event packet 8832 * @return value 8833 * @note: btstack_type V 8834 */ 8835 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 8836 return &event[7]; 8837 } 8838 8839 /** 8840 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 8841 * @param event packet 8842 * @return avrcp_cid 8843 * @note: btstack_type 2 8844 */ 8845 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 8846 return little_endian_read_16(event, 3); 8847 } 8848 /** 8849 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 8850 * @param event packet 8851 * @return command_type 8852 * @note: btstack_type 1 8853 */ 8854 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 8855 return event[5]; 8856 } 8857 /** 8858 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 8859 * @param event packet 8860 * @return value_len 8861 * @note: btstack_type J 8862 */ 8863 static inline uint8_t avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 8864 return event[6]; 8865 } 8866 /** 8867 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 8868 * @param event packet 8869 * @return value 8870 * @note: btstack_type V 8871 */ 8872 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 8873 return &event[7]; 8874 } 8875 8876 /** 8877 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8878 * @param event packet 8879 * @return avrcp_cid 8880 * @note: btstack_type 2 8881 */ 8882 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 8883 return little_endian_read_16(event, 3); 8884 } 8885 /** 8886 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8887 * @param event packet 8888 * @return command_type 8889 * @note: btstack_type 1 8890 */ 8891 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 8892 return event[5]; 8893 } 8894 /** 8895 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8896 * @param event packet 8897 * @return value_len 8898 * @note: btstack_type J 8899 */ 8900 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 8901 return event[6]; 8902 } 8903 /** 8904 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 8905 * @param event packet 8906 * @return value 8907 * @note: btstack_type V 8908 */ 8909 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 8910 return &event[7]; 8911 } 8912 8913 /** 8914 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8915 * @param event packet 8916 * @return avrcp_cid 8917 * @note: btstack_type 2 8918 */ 8919 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 8920 return little_endian_read_16(event, 3); 8921 } 8922 /** 8923 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8924 * @param event packet 8925 * @return command_type 8926 * @note: btstack_type 1 8927 */ 8928 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 8929 return event[5]; 8930 } 8931 /** 8932 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 8933 * @param event packet 8934 * @return status 8935 * @note: btstack_type 1 8936 */ 8937 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 8938 return event[6]; 8939 } 8940 8941 /** 8942 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8943 * @param event packet 8944 * @return avrcp_cid 8945 * @note: btstack_type 2 8946 */ 8947 static inline uint16_t avrcp_subevent_notification_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 8948 return little_endian_read_16(event, 3); 8949 } 8950 /** 8951 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8952 * @param event packet 8953 * @return command_type 8954 * @note: btstack_type 1 8955 */ 8956 static inline uint8_t avrcp_subevent_notification_playback_pos_changed_get_command_type(const uint8_t * event){ 8957 return event[5]; 8958 } 8959 /** 8960 * @brief Get field playback_position_ms from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 8961 * @param event packet 8962 * @return playback_position_ms 8963 * @note: btstack_type 4 8964 */ 8965 static inline uint32_t avrcp_subevent_notification_playback_pos_changed_get_playback_position_ms(const uint8_t * event){ 8966 return little_endian_read_32(event, 6); 8967 } 8968 8969 /** 8970 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8971 * @param event packet 8972 * @return avrcp_cid 8973 * @note: btstack_type 2 8974 */ 8975 static inline uint16_t avrcp_subevent_get_capability_event_id_get_avrcp_cid(const uint8_t * event){ 8976 return little_endian_read_16(event, 3); 8977 } 8978 /** 8979 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8980 * @param event packet 8981 * @return command_type 8982 * @note: btstack_type 1 8983 */ 8984 static inline uint8_t avrcp_subevent_get_capability_event_id_get_command_type(const uint8_t * event){ 8985 return event[5]; 8986 } 8987 /** 8988 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8989 * @param event packet 8990 * @return status 8991 * @note: btstack_type 1 8992 */ 8993 static inline uint8_t avrcp_subevent_get_capability_event_id_get_status(const uint8_t * event){ 8994 return event[6]; 8995 } 8996 /** 8997 * @brief Get field event_id from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID 8998 * @param event packet 8999 * @return event_id 9000 * @note: btstack_type 1 9001 */ 9002 static inline uint8_t avrcp_subevent_get_capability_event_id_get_event_id(const uint8_t * event){ 9003 return event[7]; 9004 } 9005 9006 /** 9007 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 9008 * @param event packet 9009 * @return avrcp_cid 9010 * @note: btstack_type 2 9011 */ 9012 static inline uint16_t avrcp_subevent_get_capability_event_id_done_get_avrcp_cid(const uint8_t * event){ 9013 return little_endian_read_16(event, 3); 9014 } 9015 /** 9016 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 9017 * @param event packet 9018 * @return command_type 9019 * @note: btstack_type 1 9020 */ 9021 static inline uint8_t avrcp_subevent_get_capability_event_id_done_get_command_type(const uint8_t * event){ 9022 return event[5]; 9023 } 9024 /** 9025 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_EVENT_ID_DONE 9026 * @param event packet 9027 * @return status 9028 * @note: btstack_type 1 9029 */ 9030 static inline uint8_t avrcp_subevent_get_capability_event_id_done_get_status(const uint8_t * event){ 9031 return event[6]; 9032 } 9033 9034 /** 9035 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 9036 * @param event packet 9037 * @return avrcp_cid 9038 * @note: btstack_type 2 9039 */ 9040 static inline uint16_t avrcp_subevent_get_capability_company_id_get_avrcp_cid(const uint8_t * event){ 9041 return little_endian_read_16(event, 3); 9042 } 9043 /** 9044 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 9045 * @param event packet 9046 * @return command_type 9047 * @note: btstack_type 1 9048 */ 9049 static inline uint8_t avrcp_subevent_get_capability_company_id_get_command_type(const uint8_t * event){ 9050 return event[5]; 9051 } 9052 /** 9053 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 9054 * @param event packet 9055 * @return status 9056 * @note: btstack_type 1 9057 */ 9058 static inline uint8_t avrcp_subevent_get_capability_company_id_get_status(const uint8_t * event){ 9059 return event[6]; 9060 } 9061 /** 9062 * @brief Get field company_id from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID 9063 * @param event packet 9064 * @return company_id 9065 * @note: btstack_type 3 9066 */ 9067 static inline uint32_t avrcp_subevent_get_capability_company_id_get_company_id(const uint8_t * event){ 9068 return little_endian_read_24(event, 7); 9069 } 9070 9071 /** 9072 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 9073 * @param event packet 9074 * @return avrcp_cid 9075 * @note: btstack_type 2 9076 */ 9077 static inline uint16_t avrcp_subevent_get_capability_company_id_done_get_avrcp_cid(const uint8_t * event){ 9078 return little_endian_read_16(event, 3); 9079 } 9080 /** 9081 * @brief Get field command_type from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 9082 * @param event packet 9083 * @return command_type 9084 * @note: btstack_type 1 9085 */ 9086 static inline uint8_t avrcp_subevent_get_capability_company_id_done_get_command_type(const uint8_t * event){ 9087 return event[5]; 9088 } 9089 /** 9090 * @brief Get field status from event AVRCP_SUBEVENT_GET_CAPABILITY_COMPANY_ID_DONE 9091 * @param event packet 9092 * @return status 9093 * @note: btstack_type 1 9094 */ 9095 static inline uint8_t avrcp_subevent_get_capability_company_id_done_get_status(const uint8_t * event){ 9096 return event[6]; 9097 } 9098 9099 /** 9100 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 9101 * @param event packet 9102 * @param Pointer to storage for bd_addr 9103 * @note: btstack_type B 9104 */ 9105 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9106 reverse_bytes(&event[3], bd_addr, 6); 9107 } 9108 /** 9109 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 9110 * @param event packet 9111 * @return browsing_cid 9112 * @note: btstack_type 2 9113 */ 9114 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 9115 return little_endian_read_16(event, 9); 9116 } 9117 9118 /** 9119 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 9120 * @param event packet 9121 * @return status 9122 * @note: btstack_type 1 9123 */ 9124 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 9125 return event[3]; 9126 } 9127 /** 9128 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 9129 * @param event packet 9130 * @param Pointer to storage for bd_addr 9131 * @note: btstack_type B 9132 */ 9133 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9134 reverse_bytes(&event[4], bd_addr, 6); 9135 } 9136 /** 9137 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 9138 * @param event packet 9139 * @return browsing_cid 9140 * @note: btstack_type 2 9141 */ 9142 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 9143 return little_endian_read_16(event, 10); 9144 } 9145 9146 /** 9147 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 9148 * @param event packet 9149 * @return browsing_cid 9150 * @note: btstack_type 2 9151 */ 9152 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 9153 return little_endian_read_16(event, 3); 9154 } 9155 9156 /** 9157 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_DONE 9158 * @param event packet 9159 * @return browsing_cid 9160 * @note: btstack_type 2 9161 */ 9162 static inline uint16_t avrcp_subevent_browsing_done_get_browsing_cid(const uint8_t * event){ 9163 return little_endian_read_16(event, 3); 9164 } 9165 /** 9166 * @brief Get field uid_counter from event AVRCP_SUBEVENT_BROWSING_DONE 9167 * @param event packet 9168 * @return uid_counter 9169 * @note: btstack_type 2 9170 */ 9171 static inline uint16_t avrcp_subevent_browsing_done_get_uid_counter(const uint8_t * event){ 9172 return little_endian_read_16(event, 5); 9173 } 9174 /** 9175 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_DONE 9176 * @param event packet 9177 * @return browsing_status 9178 * @note: btstack_type 1 9179 */ 9180 static inline uint8_t avrcp_subevent_browsing_done_get_browsing_status(const uint8_t * event){ 9181 return event[7]; 9182 } 9183 /** 9184 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_DONE 9185 * @param event packet 9186 * @return bluetooth_status 9187 * @note: btstack_type 1 9188 */ 9189 static inline uint8_t avrcp_subevent_browsing_done_get_bluetooth_status(const uint8_t * event){ 9190 return event[8]; 9191 } 9192 9193 /** 9194 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 9195 * @param event packet 9196 * @return browsing_cid 9197 * @note: btstack_type 2 9198 */ 9199 static inline uint16_t avrcp_subevent_browsing_get_folder_items_get_browsing_cid(const uint8_t * event){ 9200 return little_endian_read_16(event, 3); 9201 } 9202 /** 9203 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 9204 * @param event packet 9205 * @return scope 9206 * @note: btstack_type 1 9207 */ 9208 static inline uint8_t avrcp_subevent_browsing_get_folder_items_get_scope(const uint8_t * event){ 9209 return event[5]; 9210 } 9211 /** 9212 * @brief Get field attr_bitmap from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 9213 * @param event packet 9214 * @return attr_bitmap 9215 * @note: btstack_type 4 9216 */ 9217 static inline uint32_t avrcp_subevent_browsing_get_folder_items_get_attr_bitmap(const uint8_t * event){ 9218 return little_endian_read_32(event, 6); 9219 } 9220 9221 /** 9222 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 9223 * @param event packet 9224 * @return browsing_cid 9225 * @note: btstack_type 2 9226 */ 9227 static inline uint16_t avrcp_subevent_browsing_get_total_num_items_get_browsing_cid(const uint8_t * event){ 9228 return little_endian_read_16(event, 3); 9229 } 9230 /** 9231 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 9232 * @param event packet 9233 * @return scope 9234 * @note: btstack_type 1 9235 */ 9236 static inline uint8_t avrcp_subevent_browsing_get_total_num_items_get_scope(const uint8_t * event){ 9237 return event[5]; 9238 } 9239 9240 /** 9241 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_SET_BROWSED_PLAYER 9242 * @param event packet 9243 * @return browsing_cid 9244 * @note: btstack_type 2 9245 */ 9246 static inline uint16_t avrcp_subevent_browsing_set_browsed_player_get_browsing_cid(const uint8_t * event){ 9247 return little_endian_read_16(event, 3); 9248 } 9249 /** 9250 * @brief Get field player_id from event AVRCP_SUBEVENT_BROWSING_SET_BROWSED_PLAYER 9251 * @param event packet 9252 * @return player_id 9253 * @note: btstack_type 2 9254 */ 9255 static inline uint16_t avrcp_subevent_browsing_set_browsed_player_get_player_id(const uint8_t * event){ 9256 return little_endian_read_16(event, 5); 9257 } 9258 9259 /** 9260 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 9261 * @param event packet 9262 * @return goep_cid 9263 * @note: btstack_type 2 9264 */ 9265 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 9266 return little_endian_read_16(event, 3); 9267 } 9268 /** 9269 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 9270 * @param event packet 9271 * @return status 9272 * @note: btstack_type 1 9273 */ 9274 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 9275 return event[5]; 9276 } 9277 /** 9278 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 9279 * @param event packet 9280 * @param Pointer to storage for bd_addr 9281 * @note: btstack_type B 9282 */ 9283 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9284 reverse_bytes(&event[6], bd_addr, 6); 9285 } 9286 /** 9287 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 9288 * @param event packet 9289 * @return con_handle 9290 * @note: btstack_type H 9291 */ 9292 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 9293 return little_endian_read_16(event, 12); 9294 } 9295 /** 9296 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 9297 * @param event packet 9298 * @return incoming 9299 * @note: btstack_type 1 9300 */ 9301 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 9302 return event[14]; 9303 } 9304 9305 /** 9306 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 9307 * @param event packet 9308 * @return goep_cid 9309 * @note: btstack_type 2 9310 */ 9311 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 9312 return little_endian_read_16(event, 3); 9313 } 9314 9315 /** 9316 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 9317 * @param event packet 9318 * @return goep_cid 9319 * @note: btstack_type 2 9320 */ 9321 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 9322 return little_endian_read_16(event, 3); 9323 } 9324 9325 /** 9326 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 9327 * @param event packet 9328 * @return pbap_cid 9329 * @note: btstack_type 2 9330 */ 9331 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 9332 return little_endian_read_16(event, 3); 9333 } 9334 /** 9335 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 9336 * @param event packet 9337 * @return status 9338 * @note: btstack_type 1 9339 */ 9340 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 9341 return event[5]; 9342 } 9343 /** 9344 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 9345 * @param event packet 9346 * @param Pointer to storage for bd_addr 9347 * @note: btstack_type B 9348 */ 9349 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9350 reverse_bytes(&event[6], bd_addr, 6); 9351 } 9352 /** 9353 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 9354 * @param event packet 9355 * @return con_handle 9356 * @note: btstack_type H 9357 */ 9358 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 9359 return little_endian_read_16(event, 12); 9360 } 9361 /** 9362 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 9363 * @param event packet 9364 * @return incoming 9365 * @note: btstack_type 1 9366 */ 9367 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 9368 return event[14]; 9369 } 9370 9371 /** 9372 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 9373 * @param event packet 9374 * @return goep_cid 9375 * @note: btstack_type 2 9376 */ 9377 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 9378 return little_endian_read_16(event, 3); 9379 } 9380 9381 /** 9382 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 9383 * @param event packet 9384 * @return goep_cid 9385 * @note: btstack_type 2 9386 */ 9387 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 9388 return little_endian_read_16(event, 3); 9389 } 9390 /** 9391 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 9392 * @param event packet 9393 * @return status 9394 * @note: btstack_type 1 9395 */ 9396 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 9397 return event[5]; 9398 } 9399 9400 /** 9401 * @brief Get field goep_cid from event PBAP_SUBEVENT_PHONEBOOK_SIZE 9402 * @param event packet 9403 * @return goep_cid 9404 * @note: btstack_type 2 9405 */ 9406 static inline uint16_t pbap_subevent_phonebook_size_get_goep_cid(const uint8_t * event){ 9407 return little_endian_read_16(event, 3); 9408 } 9409 /** 9410 * @brief Get field status from event PBAP_SUBEVENT_PHONEBOOK_SIZE 9411 * @param event packet 9412 * @return status 9413 * @note: btstack_type 1 9414 */ 9415 static inline uint8_t pbap_subevent_phonebook_size_get_status(const uint8_t * event){ 9416 return event[5]; 9417 } 9418 /** 9419 * @brief Get field phonebook_size from event PBAP_SUBEVENT_PHONEBOOK_SIZE 9420 * @param event packet 9421 * @return phonebook_size 9422 * @note: btstack_type 2 9423 */ 9424 static inline uint16_t pbap_subevent_phonebook_size_get_phonebook_size(const uint8_t * event){ 9425 return little_endian_read_16(event, 6); 9426 } 9427 9428 /** 9429 * @brief Get field goep_cid from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 9430 * @param event packet 9431 * @return goep_cid 9432 * @note: btstack_type 2 9433 */ 9434 static inline uint16_t pbap_subevent_authentication_request_get_goep_cid(const uint8_t * event){ 9435 return little_endian_read_16(event, 3); 9436 } 9437 /** 9438 * @brief Get field user_id_required from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 9439 * @param event packet 9440 * @return user_id_required 9441 * @note: btstack_type 1 9442 */ 9443 static inline uint8_t pbap_subevent_authentication_request_get_user_id_required(const uint8_t * event){ 9444 return event[5]; 9445 } 9446 /** 9447 * @brief Get field full_access from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 9448 * @param event packet 9449 * @return full_access 9450 * @note: btstack_type 1 9451 */ 9452 static inline uint8_t pbap_subevent_authentication_request_get_full_access(const uint8_t * event){ 9453 return event[6]; 9454 } 9455 9456 /** 9457 * @brief Get field goep_cid from event PBAP_SUBEVENT_CARD_RESULT 9458 * @param event packet 9459 * @return goep_cid 9460 * @note: btstack_type 2 9461 */ 9462 static inline uint16_t pbap_subevent_card_result_get_goep_cid(const uint8_t * event){ 9463 return little_endian_read_16(event, 3); 9464 } 9465 /** 9466 * @brief Get field name_len from event PBAP_SUBEVENT_CARD_RESULT 9467 * @param event packet 9468 * @return name_len 9469 * @note: btstack_type J 9470 */ 9471 static inline uint8_t pbap_subevent_card_result_get_name_len(const uint8_t * event){ 9472 return event[5]; 9473 } 9474 /** 9475 * @brief Get field name from event PBAP_SUBEVENT_CARD_RESULT 9476 * @param event packet 9477 * @return name 9478 * @note: btstack_type V 9479 */ 9480 static inline const uint8_t * pbap_subevent_card_result_get_name(const uint8_t * event){ 9481 return &event[6]; 9482 } 9483 /** 9484 * @brief Get field handle_len from event PBAP_SUBEVENT_CARD_RESULT 9485 * @param event packet 9486 * @return handle_len 9487 * @note: btstack_type J 9488 */ 9489 static inline uint8_t pbap_subevent_card_result_get_handle_len(const uint8_t * event){ 9490 return event[6u + event[5]]; 9491 } 9492 /** 9493 * @brief Get field handle from event PBAP_SUBEVENT_CARD_RESULT 9494 * @param event packet 9495 * @return handle 9496 * @note: btstack_type V 9497 */ 9498 static inline const uint8_t * pbap_subevent_card_result_get_handle(const uint8_t * event){ 9499 return &event[6u + event[5] + 1u]; 9500 } 9501 9502 /** 9503 * @brief Get field hid_cid from event HID_SUBEVENT_INCOMING_CONNECTION 9504 * @param event packet 9505 * @return hid_cid 9506 * @note: btstack_type 2 9507 */ 9508 static inline uint16_t hid_subevent_incoming_connection_get_hid_cid(const uint8_t * event){ 9509 return little_endian_read_16(event, 3); 9510 } 9511 /** 9512 * @brief Get field address from event HID_SUBEVENT_INCOMING_CONNECTION 9513 * @param event packet 9514 * @param Pointer to storage for address 9515 * @note: btstack_type B 9516 */ 9517 static inline void hid_subevent_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 9518 reverse_bytes(&event[5], address, 6); 9519 } 9520 /** 9521 * @brief Get field handle from event HID_SUBEVENT_INCOMING_CONNECTION 9522 * @param event packet 9523 * @return handle 9524 * @note: btstack_type H 9525 */ 9526 static inline hci_con_handle_t hid_subevent_incoming_connection_get_handle(const uint8_t * event){ 9527 return little_endian_read_16(event, 11); 9528 } 9529 9530 /** 9531 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 9532 * @param event packet 9533 * @return hid_cid 9534 * @note: btstack_type 2 9535 */ 9536 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 9537 return little_endian_read_16(event, 3); 9538 } 9539 /** 9540 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 9541 * @param event packet 9542 * @return status 9543 * @note: btstack_type 1 9544 */ 9545 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 9546 return event[5]; 9547 } 9548 /** 9549 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 9550 * @param event packet 9551 * @param Pointer to storage for bd_addr 9552 * @note: btstack_type B 9553 */ 9554 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 9555 reverse_bytes(&event[6], bd_addr, 6); 9556 } 9557 /** 9558 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 9559 * @param event packet 9560 * @return con_handle 9561 * @note: btstack_type H 9562 */ 9563 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 9564 return little_endian_read_16(event, 12); 9565 } 9566 /** 9567 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 9568 * @param event packet 9569 * @return incoming 9570 * @note: btstack_type 1 9571 */ 9572 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 9573 return event[14]; 9574 } 9575 9576 /** 9577 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 9578 * @param event packet 9579 * @return hid_cid 9580 * @note: btstack_type 2 9581 */ 9582 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 9583 return little_endian_read_16(event, 3); 9584 } 9585 9586 /** 9587 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 9588 * @param event packet 9589 * @return hid_cid 9590 * @note: btstack_type 2 9591 */ 9592 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 9593 return little_endian_read_16(event, 3); 9594 } 9595 9596 /** 9597 * @brief Get field hid_cid from event HID_SUBEVENT_SUSPEND 9598 * @param event packet 9599 * @return hid_cid 9600 * @note: btstack_type 2 9601 */ 9602 static inline uint16_t hid_subevent_suspend_get_hid_cid(const uint8_t * event){ 9603 return little_endian_read_16(event, 3); 9604 } 9605 9606 /** 9607 * @brief Get field hid_cid from event HID_SUBEVENT_EXIT_SUSPEND 9608 * @param event packet 9609 * @return hid_cid 9610 * @note: btstack_type 2 9611 */ 9612 static inline uint16_t hid_subevent_exit_suspend_get_hid_cid(const uint8_t * event){ 9613 return little_endian_read_16(event, 3); 9614 } 9615 9616 /** 9617 * @brief Get field hid_cid from event HID_SUBEVENT_VIRTUAL_CABLE_UNPLUG 9618 * @param event packet 9619 * @return hid_cid 9620 * @note: btstack_type 2 9621 */ 9622 static inline uint16_t hid_subevent_virtual_cable_unplug_get_hid_cid(const uint8_t * event){ 9623 return little_endian_read_16(event, 3); 9624 } 9625 9626 /** 9627 * @brief Get field hid_cid from event HID_SUBEVENT_GET_REPORT_RESPONSE 9628 * @param event packet 9629 * @return hid_cid 9630 * @note: btstack_type 2 9631 */ 9632 static inline uint16_t hid_subevent_get_report_response_get_hid_cid(const uint8_t * event){ 9633 return little_endian_read_16(event, 3); 9634 } 9635 /** 9636 * @brief Get field handshake_status from event HID_SUBEVENT_GET_REPORT_RESPONSE 9637 * @param event packet 9638 * @return handshake_status 9639 * @note: btstack_type 1 9640 */ 9641 static inline uint8_t hid_subevent_get_report_response_get_handshake_status(const uint8_t * event){ 9642 return event[5]; 9643 } 9644 /** 9645 * @brief Get field report_len from event HID_SUBEVENT_GET_REPORT_RESPONSE 9646 * @param event packet 9647 * @return report_len 9648 * @note: btstack_type L 9649 */ 9650 static inline uint16_t hid_subevent_get_report_response_get_report_len(const uint8_t * event){ 9651 return little_endian_read_16(event, 6); 9652 } 9653 /** 9654 * @brief Get field report from event HID_SUBEVENT_GET_REPORT_RESPONSE 9655 * @param event packet 9656 * @return report 9657 * @note: btstack_type V 9658 */ 9659 static inline const uint8_t * hid_subevent_get_report_response_get_report(const uint8_t * event){ 9660 return &event[8]; 9661 } 9662 9663 /** 9664 * @brief Get field hid_cid from event HID_SUBEVENT_SET_REPORT_RESPONSE 9665 * @param event packet 9666 * @return hid_cid 9667 * @note: btstack_type 2 9668 */ 9669 static inline uint16_t hid_subevent_set_report_response_get_hid_cid(const uint8_t * event){ 9670 return little_endian_read_16(event, 3); 9671 } 9672 /** 9673 * @brief Get field handshake_status from event HID_SUBEVENT_SET_REPORT_RESPONSE 9674 * @param event packet 9675 * @return handshake_status 9676 * @note: btstack_type 1 9677 */ 9678 static inline uint8_t hid_subevent_set_report_response_get_handshake_status(const uint8_t * event){ 9679 return event[5]; 9680 } 9681 9682 /** 9683 * @brief Get field hid_cid from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 9684 * @param event packet 9685 * @return hid_cid 9686 * @note: btstack_type 2 9687 */ 9688 static inline uint16_t hid_subevent_get_protocol_response_get_hid_cid(const uint8_t * event){ 9689 return little_endian_read_16(event, 3); 9690 } 9691 /** 9692 * @brief Get field handshake_status from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 9693 * @param event packet 9694 * @return handshake_status 9695 * @note: btstack_type 1 9696 */ 9697 static inline uint8_t hid_subevent_get_protocol_response_get_handshake_status(const uint8_t * event){ 9698 return event[5]; 9699 } 9700 /** 9701 * @brief Get field protocol_mode from event HID_SUBEVENT_GET_PROTOCOL_RESPONSE 9702 * @param event packet 9703 * @return protocol_mode 9704 * @note: btstack_type 1 9705 */ 9706 static inline uint8_t hid_subevent_get_protocol_response_get_protocol_mode(const uint8_t * event){ 9707 return event[6]; 9708 } 9709 9710 /** 9711 * @brief Get field hid_cid from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 9712 * @param event packet 9713 * @return hid_cid 9714 * @note: btstack_type 2 9715 */ 9716 static inline uint16_t hid_subevent_set_protocol_response_get_hid_cid(const uint8_t * event){ 9717 return little_endian_read_16(event, 3); 9718 } 9719 /** 9720 * @brief Get field handshake_status from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 9721 * @param event packet 9722 * @return handshake_status 9723 * @note: btstack_type 1 9724 */ 9725 static inline uint8_t hid_subevent_set_protocol_response_get_handshake_status(const uint8_t * event){ 9726 return event[5]; 9727 } 9728 /** 9729 * @brief Get field protocol_mode from event HID_SUBEVENT_SET_PROTOCOL_RESPONSE 9730 * @param event packet 9731 * @return protocol_mode 9732 * @note: btstack_type 1 9733 */ 9734 static inline uint8_t hid_subevent_set_protocol_response_get_protocol_mode(const uint8_t * event){ 9735 return event[6]; 9736 } 9737 9738 /** 9739 * @brief Get field hid_cid from event HID_SUBEVENT_REPORT 9740 * @param event packet 9741 * @return hid_cid 9742 * @note: btstack_type 2 9743 */ 9744 static inline uint16_t hid_subevent_report_get_hid_cid(const uint8_t * event){ 9745 return little_endian_read_16(event, 3); 9746 } 9747 /** 9748 * @brief Get field report_len from event HID_SUBEVENT_REPORT 9749 * @param event packet 9750 * @return report_len 9751 * @note: btstack_type L 9752 */ 9753 static inline uint16_t hid_subevent_report_get_report_len(const uint8_t * event){ 9754 return little_endian_read_16(event, 5); 9755 } 9756 /** 9757 * @brief Get field report from event HID_SUBEVENT_REPORT 9758 * @param event packet 9759 * @return report 9760 * @note: btstack_type V 9761 */ 9762 static inline const uint8_t * hid_subevent_report_get_report(const uint8_t * event){ 9763 return &event[7]; 9764 } 9765 9766 /** 9767 * @brief Get field hid_cid from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE 9768 * @param event packet 9769 * @return hid_cid 9770 * @note: btstack_type 2 9771 */ 9772 static inline uint16_t hid_subevent_descriptor_available_get_hid_cid(const uint8_t * event){ 9773 return little_endian_read_16(event, 3); 9774 } 9775 /** 9776 * @brief Get field status from event HID_SUBEVENT_DESCRIPTOR_AVAILABLE 9777 * @param event packet 9778 * @return status 9779 * @note: btstack_type 1 9780 */ 9781 static inline uint8_t hid_subevent_descriptor_available_get_status(const uint8_t * event){ 9782 return event[5]; 9783 } 9784 9785 /** 9786 * @brief Get field hid_cid from event HID_SUBEVENT_SNIFF_SUBRATING_PARAMS 9787 * @param event packet 9788 * @return hid_cid 9789 * @note: btstack_type 2 9790 */ 9791 static inline uint16_t hid_subevent_sniff_subrating_params_get_hid_cid(const uint8_t * event){ 9792 return little_endian_read_16(event, 3); 9793 } 9794 /** 9795 * @brief Get field host_max_latency from event HID_SUBEVENT_SNIFF_SUBRATING_PARAMS 9796 * @param event packet 9797 * @return host_max_latency 9798 * @note: btstack_type 2 9799 */ 9800 static inline uint16_t hid_subevent_sniff_subrating_params_get_host_max_latency(const uint8_t * event){ 9801 return little_endian_read_16(event, 5); 9802 } 9803 /** 9804 * @brief Get field host_min_timeout from event HID_SUBEVENT_SNIFF_SUBRATING_PARAMS 9805 * @param event packet 9806 * @return host_min_timeout 9807 * @note: btstack_type 2 9808 */ 9809 static inline uint16_t hid_subevent_sniff_subrating_params_get_host_min_timeout(const uint8_t * event){ 9810 return little_endian_read_16(event, 7); 9811 } 9812 9813 /** 9814 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 9815 * @param event packet 9816 * @return con_handle 9817 * @note: btstack_type 2 9818 */ 9819 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 9820 return little_endian_read_16(event, 3); 9821 } 9822 9823 /** 9824 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 9825 * @param event packet 9826 * @return con_handle 9827 * @note: btstack_type 2 9828 */ 9829 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 9830 return little_endian_read_16(event, 3); 9831 } 9832 /** 9833 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 9834 * @param event packet 9835 * @return protocol_mode 9836 * @note: btstack_type 1 9837 */ 9838 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 9839 return event[5]; 9840 } 9841 9842 /** 9843 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 9844 * @param event packet 9845 * @return con_handle 9846 * @note: btstack_type 2 9847 */ 9848 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 9849 return little_endian_read_16(event, 3); 9850 } 9851 /** 9852 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 9853 * @param event packet 9854 * @return enable 9855 * @note: btstack_type 1 9856 */ 9857 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 9858 return event[5]; 9859 } 9860 9861 /** 9862 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 9863 * @param event packet 9864 * @return con_handle 9865 * @note: btstack_type 2 9866 */ 9867 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 9868 return little_endian_read_16(event, 3); 9869 } 9870 /** 9871 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 9872 * @param event packet 9873 * @return enable 9874 * @note: btstack_type 1 9875 */ 9876 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 9877 return event[5]; 9878 } 9879 9880 /** 9881 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 9882 * @param event packet 9883 * @return con_handle 9884 * @note: btstack_type 2 9885 */ 9886 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 9887 return little_endian_read_16(event, 3); 9888 } 9889 /** 9890 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 9891 * @param event packet 9892 * @return enable 9893 * @note: btstack_type 1 9894 */ 9895 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 9896 return event[5]; 9897 } 9898 9899 /** 9900 * @brief Get field con_handle from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 9901 * @param event packet 9902 * @return con_handle 9903 * @note: btstack_type 2 9904 */ 9905 static inline uint16_t hids_subevent_output_report_enable_get_con_handle(const uint8_t * event){ 9906 return little_endian_read_16(event, 3); 9907 } 9908 /** 9909 * @brief Get field enable from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 9910 * @param event packet 9911 * @return enable 9912 * @note: btstack_type 1 9913 */ 9914 static inline uint8_t hids_subevent_output_report_enable_get_enable(const uint8_t * event){ 9915 return event[5]; 9916 } 9917 9918 /** 9919 * @brief Get field con_handle from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 9920 * @param event packet 9921 * @return con_handle 9922 * @note: btstack_type 2 9923 */ 9924 static inline uint16_t hids_subevent_feature_report_enable_get_con_handle(const uint8_t * event){ 9925 return little_endian_read_16(event, 3); 9926 } 9927 /** 9928 * @brief Get field enable from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 9929 * @param event packet 9930 * @return enable 9931 * @note: btstack_type 1 9932 */ 9933 static inline uint8_t hids_subevent_feature_report_enable_get_enable(const uint8_t * event){ 9934 return event[5]; 9935 } 9936 9937 /** 9938 * @brief Get field con_handle from event HIDS_SUBEVENT_SUSPEND 9939 * @param event packet 9940 * @return con_handle 9941 * @note: btstack_type 2 9942 */ 9943 static inline uint16_t hids_subevent_suspend_get_con_handle(const uint8_t * event){ 9944 return little_endian_read_16(event, 3); 9945 } 9946 9947 /** 9948 * @brief Get field con_handle from event HIDS_SUBEVENT_EXIT_SUSPEND 9949 * @param event packet 9950 * @return con_handle 9951 * @note: btstack_type 2 9952 */ 9953 static inline uint16_t hids_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 9954 return little_endian_read_16(event, 3); 9955 } 9956 9957 /** 9958 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9959 * @param event packet 9960 * @return con_handle 9961 * @note: btstack_type 2 9962 */ 9963 static inline uint16_t gattservice_subevent_cycling_power_start_calibration_get_con_handle(const uint8_t * event){ 9964 return little_endian_read_16(event, 3); 9965 } 9966 /** 9967 * @brief Get field measurement_type from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9968 * @param event packet 9969 * @return measurement_type 9970 * @note: btstack_type 1 9971 */ 9972 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_measurement_type(const uint8_t * event){ 9973 return event[5]; 9974 } 9975 /** 9976 * @brief Get field is_enhanced from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 9977 * @param event packet 9978 * @return is_enhanced 9979 * @note: btstack_type 1 9980 */ 9981 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_is_enhanced(const uint8_t * event){ 9982 return event[6]; 9983 } 9984 9985 /** 9986 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START 9987 * @param event packet 9988 * @return con_handle 9989 * @note: btstack_type 2 9990 */ 9991 static inline uint16_t gattservice_subevent_cycling_power_broadcast_start_get_con_handle(const uint8_t * event){ 9992 return little_endian_read_16(event, 3); 9993 } 9994 9995 /** 9996 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP 9997 * @param event packet 9998 * @return con_handle 9999 * @note: btstack_type 2 10000 */ 10001 static inline uint16_t gattservice_subevent_cycling_power_broadcast_stop_get_con_handle(const uint8_t * event){ 10002 return little_endian_read_16(event, 3); 10003 } 10004 10005 /** 10006 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 10007 * @param event packet 10008 * @return hids_cid 10009 * @note: btstack_type 2 10010 */ 10011 static inline uint16_t gattservice_subevent_battery_service_connected_get_hids_cid(const uint8_t * event){ 10012 return little_endian_read_16(event, 3); 10013 } 10014 /** 10015 * @brief Get field status from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 10016 * @param event packet 10017 * @return status 10018 * @note: btstack_type 1 10019 */ 10020 static inline uint8_t gattservice_subevent_battery_service_connected_get_status(const uint8_t * event){ 10021 return event[5]; 10022 } 10023 /** 10024 * @brief Get field num_instances from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 10025 * @param event packet 10026 * @return num_instances 10027 * @note: btstack_type 1 10028 */ 10029 static inline uint8_t gattservice_subevent_battery_service_connected_get_num_instances(const uint8_t * event){ 10030 return event[6]; 10031 } 10032 /** 10033 * @brief Get field poll_bitmap from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_CONNECTED 10034 * @param event packet 10035 * @return poll_bitmap 10036 * @note: btstack_type 1 10037 */ 10038 static inline uint8_t gattservice_subevent_battery_service_connected_get_poll_bitmap(const uint8_t * event){ 10039 return event[7]; 10040 } 10041 10042 /** 10043 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 10044 * @param event packet 10045 * @return hids_cid 10046 * @note: btstack_type 2 10047 */ 10048 static inline uint16_t gattservice_subevent_battery_service_level_get_hids_cid(const uint8_t * event){ 10049 return little_endian_read_16(event, 3); 10050 } 10051 /** 10052 * @brief Get field sevice_index from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 10053 * @param event packet 10054 * @return sevice_index 10055 * @note: btstack_type 1 10056 */ 10057 static inline uint8_t gattservice_subevent_battery_service_level_get_sevice_index(const uint8_t * event){ 10058 return event[5]; 10059 } 10060 /** 10061 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 10062 * @param event packet 10063 * @return att_status 10064 * @note: btstack_type 1 10065 */ 10066 static inline uint8_t gattservice_subevent_battery_service_level_get_att_status(const uint8_t * event){ 10067 return event[6]; 10068 } 10069 /** 10070 * @brief Get field level from event GATTSERVICE_SUBEVENT_BATTERY_SERVICE_LEVEL 10071 * @param event packet 10072 * @return level 10073 * @note: btstack_type 1 10074 */ 10075 static inline uint8_t gattservice_subevent_battery_service_level_get_level(const uint8_t * event){ 10076 return event[7]; 10077 } 10078 10079 /** 10080 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_DONE 10081 * @param event packet 10082 * @return con_handle 10083 * @note: btstack_type H 10084 */ 10085 static inline hci_con_handle_t gattservice_subevent_device_information_done_get_con_handle(const uint8_t * event){ 10086 return little_endian_read_16(event, 3); 10087 } 10088 /** 10089 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_DONE 10090 * @param event packet 10091 * @return att_status 10092 * @note: btstack_type 1 10093 */ 10094 static inline uint8_t gattservice_subevent_device_information_done_get_att_status(const uint8_t * event){ 10095 return event[5]; 10096 } 10097 10098 /** 10099 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 10100 * @param event packet 10101 * @return con_handle 10102 * @note: btstack_type H 10103 */ 10104 static inline hci_con_handle_t gattservice_subevent_device_information_manufacturer_name_get_con_handle(const uint8_t * event){ 10105 return little_endian_read_16(event, 3); 10106 } 10107 /** 10108 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 10109 * @param event packet 10110 * @return att_status 10111 * @note: btstack_type 1 10112 */ 10113 static inline uint8_t gattservice_subevent_device_information_manufacturer_name_get_att_status(const uint8_t * event){ 10114 return event[5]; 10115 } 10116 /** 10117 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MANUFACTURER_NAME 10118 * @param event packet 10119 * @return value 10120 * @note: btstack_type T 10121 */ 10122 static inline const char * gattservice_subevent_device_information_manufacturer_name_get_value(const uint8_t * event){ 10123 return (const char *) &event[6]; 10124 } 10125 10126 /** 10127 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 10128 * @param event packet 10129 * @return con_handle 10130 * @note: btstack_type H 10131 */ 10132 static inline hci_con_handle_t gattservice_subevent_device_information_model_number_get_con_handle(const uint8_t * event){ 10133 return little_endian_read_16(event, 3); 10134 } 10135 /** 10136 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 10137 * @param event packet 10138 * @return att_status 10139 * @note: btstack_type 1 10140 */ 10141 static inline uint8_t gattservice_subevent_device_information_model_number_get_att_status(const uint8_t * event){ 10142 return event[5]; 10143 } 10144 /** 10145 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_MODEL_NUMBER 10146 * @param event packet 10147 * @return value 10148 * @note: btstack_type T 10149 */ 10150 static inline const char * gattservice_subevent_device_information_model_number_get_value(const uint8_t * event){ 10151 return (const char *) &event[6]; 10152 } 10153 10154 /** 10155 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 10156 * @param event packet 10157 * @return con_handle 10158 * @note: btstack_type H 10159 */ 10160 static inline hci_con_handle_t gattservice_subevent_device_information_serial_number_get_con_handle(const uint8_t * event){ 10161 return little_endian_read_16(event, 3); 10162 } 10163 /** 10164 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 10165 * @param event packet 10166 * @return att_status 10167 * @note: btstack_type 1 10168 */ 10169 static inline uint8_t gattservice_subevent_device_information_serial_number_get_att_status(const uint8_t * event){ 10170 return event[5]; 10171 } 10172 /** 10173 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SERIAL_NUMBER 10174 * @param event packet 10175 * @return value 10176 * @note: btstack_type T 10177 */ 10178 static inline const char * gattservice_subevent_device_information_serial_number_get_value(const uint8_t * event){ 10179 return (const char *) &event[6]; 10180 } 10181 10182 /** 10183 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 10184 * @param event packet 10185 * @return con_handle 10186 * @note: btstack_type H 10187 */ 10188 static inline hci_con_handle_t gattservice_subevent_device_information_hardware_revision_get_con_handle(const uint8_t * event){ 10189 return little_endian_read_16(event, 3); 10190 } 10191 /** 10192 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 10193 * @param event packet 10194 * @return att_status 10195 * @note: btstack_type 1 10196 */ 10197 static inline uint8_t gattservice_subevent_device_information_hardware_revision_get_att_status(const uint8_t * event){ 10198 return event[5]; 10199 } 10200 /** 10201 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_HARDWARE_REVISION 10202 * @param event packet 10203 * @return value 10204 * @note: btstack_type T 10205 */ 10206 static inline const char * gattservice_subevent_device_information_hardware_revision_get_value(const uint8_t * event){ 10207 return (const char *) &event[6]; 10208 } 10209 10210 /** 10211 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 10212 * @param event packet 10213 * @return con_handle 10214 * @note: btstack_type H 10215 */ 10216 static inline hci_con_handle_t gattservice_subevent_device_information_firmware_revision_get_con_handle(const uint8_t * event){ 10217 return little_endian_read_16(event, 3); 10218 } 10219 /** 10220 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 10221 * @param event packet 10222 * @return att_status 10223 * @note: btstack_type 1 10224 */ 10225 static inline uint8_t gattservice_subevent_device_information_firmware_revision_get_att_status(const uint8_t * event){ 10226 return event[5]; 10227 } 10228 /** 10229 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_FIRMWARE_REVISION 10230 * @param event packet 10231 * @return value 10232 * @note: btstack_type T 10233 */ 10234 static inline const char * gattservice_subevent_device_information_firmware_revision_get_value(const uint8_t * event){ 10235 return (const char *) &event[6]; 10236 } 10237 10238 /** 10239 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 10240 * @param event packet 10241 * @return con_handle 10242 * @note: btstack_type H 10243 */ 10244 static inline hci_con_handle_t gattservice_subevent_device_information_software_revision_get_con_handle(const uint8_t * event){ 10245 return little_endian_read_16(event, 3); 10246 } 10247 /** 10248 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 10249 * @param event packet 10250 * @return att_status 10251 * @note: btstack_type 1 10252 */ 10253 static inline uint8_t gattservice_subevent_device_information_software_revision_get_att_status(const uint8_t * event){ 10254 return event[5]; 10255 } 10256 /** 10257 * @brief Get field value from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SOFTWARE_REVISION 10258 * @param event packet 10259 * @return value 10260 * @note: btstack_type T 10261 */ 10262 static inline const char * gattservice_subevent_device_information_software_revision_get_value(const uint8_t * event){ 10263 return (const char *) &event[6]; 10264 } 10265 10266 /** 10267 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 10268 * @param event packet 10269 * @return con_handle 10270 * @note: btstack_type H 10271 */ 10272 static inline hci_con_handle_t gattservice_subevent_device_information_system_id_get_con_handle(const uint8_t * event){ 10273 return little_endian_read_16(event, 3); 10274 } 10275 /** 10276 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 10277 * @param event packet 10278 * @return att_status 10279 * @note: btstack_type 1 10280 */ 10281 static inline uint8_t gattservice_subevent_device_information_system_id_get_att_status(const uint8_t * event){ 10282 return event[5]; 10283 } 10284 /** 10285 * @brief Get field manufacturer_id_low from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 10286 * @param event packet 10287 * @return manufacturer_id_low 10288 * @note: btstack_type 4 10289 */ 10290 static inline uint32_t gattservice_subevent_device_information_system_id_get_manufacturer_id_low(const uint8_t * event){ 10291 return little_endian_read_32(event, 6); 10292 } 10293 /** 10294 * @brief Get field manufacturer_id_high from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 10295 * @param event packet 10296 * @return manufacturer_id_high 10297 * @note: btstack_type 1 10298 */ 10299 static inline uint8_t gattservice_subevent_device_information_system_id_get_manufacturer_id_high(const uint8_t * event){ 10300 return event[10]; 10301 } 10302 /** 10303 * @brief Get field organizationally_unique_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_SYSTEM_ID 10304 * @param event packet 10305 * @return organizationally_unique_id 10306 * @note: btstack_type 3 10307 */ 10308 static inline uint32_t gattservice_subevent_device_information_system_id_get_organizationally_unique_id(const uint8_t * event){ 10309 return little_endian_read_24(event, 11); 10310 } 10311 10312 /** 10313 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 10314 * @param event packet 10315 * @return con_handle 10316 * @note: btstack_type H 10317 */ 10318 static inline hci_con_handle_t gattservice_subevent_device_information_ieee_regulatory_certification_get_con_handle(const uint8_t * event){ 10319 return little_endian_read_16(event, 3); 10320 } 10321 /** 10322 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 10323 * @param event packet 10324 * @return att_status 10325 * @note: btstack_type 1 10326 */ 10327 static inline uint8_t gattservice_subevent_device_information_ieee_regulatory_certification_get_att_status(const uint8_t * event){ 10328 return event[5]; 10329 } 10330 /** 10331 * @brief Get field value_a from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 10332 * @param event packet 10333 * @return value_a 10334 * @note: btstack_type 2 10335 */ 10336 static inline uint16_t gattservice_subevent_device_information_ieee_regulatory_certification_get_value_a(const uint8_t * event){ 10337 return little_endian_read_16(event, 6); 10338 } 10339 /** 10340 * @brief Get field value_b from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_IEEE_REGULATORY_CERTIFICATION 10341 * @param event packet 10342 * @return value_b 10343 * @note: btstack_type 2 10344 */ 10345 static inline uint16_t gattservice_subevent_device_information_ieee_regulatory_certification_get_value_b(const uint8_t * event){ 10346 return little_endian_read_16(event, 8); 10347 } 10348 10349 /** 10350 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10351 * @param event packet 10352 * @return con_handle 10353 * @note: btstack_type H 10354 */ 10355 static inline hci_con_handle_t gattservice_subevent_device_information_pnp_id_get_con_handle(const uint8_t * event){ 10356 return little_endian_read_16(event, 3); 10357 } 10358 /** 10359 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10360 * @param event packet 10361 * @return att_status 10362 * @note: btstack_type 1 10363 */ 10364 static inline uint8_t gattservice_subevent_device_information_pnp_id_get_att_status(const uint8_t * event){ 10365 return event[5]; 10366 } 10367 /** 10368 * @brief Get field vendor_source_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10369 * @param event packet 10370 * @return vendor_source_id 10371 * @note: btstack_type 1 10372 */ 10373 static inline uint8_t gattservice_subevent_device_information_pnp_id_get_vendor_source_id(const uint8_t * event){ 10374 return event[6]; 10375 } 10376 /** 10377 * @brief Get field vendor_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10378 * @param event packet 10379 * @return vendor_id 10380 * @note: btstack_type 2 10381 */ 10382 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_vendor_id(const uint8_t * event){ 10383 return little_endian_read_16(event, 7); 10384 } 10385 /** 10386 * @brief Get field product_id from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10387 * @param event packet 10388 * @return product_id 10389 * @note: btstack_type 2 10390 */ 10391 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_product_id(const uint8_t * event){ 10392 return little_endian_read_16(event, 9); 10393 } 10394 /** 10395 * @brief Get field product_version from event GATTSERVICE_SUBEVENT_DEVICE_INFORMATION_PNP_ID 10396 * @param event packet 10397 * @return product_version 10398 * @note: btstack_type 2 10399 */ 10400 static inline uint16_t gattservice_subevent_device_information_pnp_id_get_product_version(const uint8_t * event){ 10401 return little_endian_read_16(event, 11); 10402 } 10403 10404 /** 10405 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_CONNECTED 10406 * @param event packet 10407 * @return con_handle 10408 * @note: btstack_type H 10409 */ 10410 static inline hci_con_handle_t gattservice_subevent_scan_parameters_service_connected_get_con_handle(const uint8_t * event){ 10411 return little_endian_read_16(event, 3); 10412 } 10413 /** 10414 * @brief Get field att_status from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_CONNECTED 10415 * @param event packet 10416 * @return att_status 10417 * @note: btstack_type 1 10418 */ 10419 static inline uint8_t gattservice_subevent_scan_parameters_service_connected_get_att_status(const uint8_t * event){ 10420 return event[5]; 10421 } 10422 10423 /** 10424 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_CONNECTED 10425 * @param event packet 10426 * @return con_handle 10427 * @note: btstack_type H 10428 */ 10429 static inline hci_con_handle_t gattservice_subevent_spp_service_connected_get_con_handle(const uint8_t * event){ 10430 return little_endian_read_16(event, 3); 10431 } 10432 10433 /** 10434 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_DISCONNECTED 10435 * @param event packet 10436 * @return con_handle 10437 * @note: btstack_type H 10438 */ 10439 static inline hci_con_handle_t gattservice_subevent_spp_service_disconnected_get_con_handle(const uint8_t * event){ 10440 return little_endian_read_16(event, 3); 10441 } 10442 10443 /** 10444 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED 10445 * @param event packet 10446 * @return hids_cid 10447 * @note: btstack_type 2 10448 */ 10449 static inline uint16_t gattservice_subevent_hid_service_connected_get_hids_cid(const uint8_t * event){ 10450 return little_endian_read_16(event, 3); 10451 } 10452 /** 10453 * @brief Get field status from event GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED 10454 * @param event packet 10455 * @return status 10456 * @note: btstack_type 1 10457 */ 10458 static inline uint8_t gattservice_subevent_hid_service_connected_get_status(const uint8_t * event){ 10459 return event[5]; 10460 } 10461 /** 10462 * @brief Get field protocol_mode from event GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED 10463 * @param event packet 10464 * @return protocol_mode 10465 * @note: btstack_type 1 10466 */ 10467 static inline uint8_t gattservice_subevent_hid_service_connected_get_protocol_mode(const uint8_t * event){ 10468 return event[6]; 10469 } 10470 /** 10471 * @brief Get field num_instances from event GATTSERVICE_SUBEVENT_HID_SERVICE_CONNECTED 10472 * @param event packet 10473 * @return num_instances 10474 * @note: btstack_type 1 10475 */ 10476 static inline uint8_t gattservice_subevent_hid_service_connected_get_num_instances(const uint8_t * event){ 10477 return event[7]; 10478 } 10479 10480 /** 10481 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_HID_REPORT 10482 * @param event packet 10483 * @return hids_cid 10484 * @note: btstack_type 2 10485 */ 10486 static inline uint16_t gattservice_subevent_hid_report_get_hids_cid(const uint8_t * event){ 10487 return little_endian_read_16(event, 3); 10488 } 10489 /** 10490 * @brief Get field service_index from event GATTSERVICE_SUBEVENT_HID_REPORT 10491 * @param event packet 10492 * @return service_index 10493 * @note: btstack_type 1 10494 */ 10495 static inline uint8_t gattservice_subevent_hid_report_get_service_index(const uint8_t * event){ 10496 return event[5]; 10497 } 10498 /** 10499 * @brief Get field report_id from event GATTSERVICE_SUBEVENT_HID_REPORT 10500 * @param event packet 10501 * @return report_id 10502 * @note: btstack_type 1 10503 */ 10504 static inline uint8_t gattservice_subevent_hid_report_get_report_id(const uint8_t * event){ 10505 return event[6]; 10506 } 10507 /** 10508 * @brief Get field report_len from event GATTSERVICE_SUBEVENT_HID_REPORT 10509 * @param event packet 10510 * @return report_len 10511 * @note: btstack_type L 10512 */ 10513 static inline uint16_t gattservice_subevent_hid_report_get_report_len(const uint8_t * event){ 10514 return little_endian_read_16(event, 7); 10515 } 10516 /** 10517 * @brief Get field report from event GATTSERVICE_SUBEVENT_HID_REPORT 10518 * @param event packet 10519 * @return report 10520 * @note: btstack_type V 10521 */ 10522 static inline const uint8_t * gattservice_subevent_hid_report_get_report(const uint8_t * event){ 10523 return &event[9]; 10524 } 10525 10526 /** 10527 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10528 * @param event packet 10529 * @return hids_cid 10530 * @note: btstack_type 2 10531 */ 10532 static inline uint16_t gattservice_subevent_hid_information_get_hids_cid(const uint8_t * event){ 10533 return little_endian_read_16(event, 3); 10534 } 10535 /** 10536 * @brief Get field service_index from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10537 * @param event packet 10538 * @return service_index 10539 * @note: btstack_type 1 10540 */ 10541 static inline uint8_t gattservice_subevent_hid_information_get_service_index(const uint8_t * event){ 10542 return event[5]; 10543 } 10544 /** 10545 * @brief Get field base_usb_hid_version from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10546 * @param event packet 10547 * @return base_usb_hid_version 10548 * @note: btstack_type 2 10549 */ 10550 static inline uint16_t gattservice_subevent_hid_information_get_base_usb_hid_version(const uint8_t * event){ 10551 return little_endian_read_16(event, 6); 10552 } 10553 /** 10554 * @brief Get field country_code from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10555 * @param event packet 10556 * @return country_code 10557 * @note: btstack_type 1 10558 */ 10559 static inline uint8_t gattservice_subevent_hid_information_get_country_code(const uint8_t * event){ 10560 return event[8]; 10561 } 10562 /** 10563 * @brief Get field remote_wake from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10564 * @param event packet 10565 * @return remote_wake 10566 * @note: btstack_type 1 10567 */ 10568 static inline uint8_t gattservice_subevent_hid_information_get_remote_wake(const uint8_t * event){ 10569 return event[9]; 10570 } 10571 /** 10572 * @brief Get field normally_connectable from event GATTSERVICE_SUBEVENT_HID_INFORMATION 10573 * @param event packet 10574 * @return normally_connectable 10575 * @note: btstack_type 1 10576 */ 10577 static inline uint8_t gattservice_subevent_hid_information_get_normally_connectable(const uint8_t * event){ 10578 return event[10]; 10579 } 10580 10581 /** 10582 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_HID_PROTOCOL_MODE 10583 * @param event packet 10584 * @return hids_cid 10585 * @note: btstack_type 2 10586 */ 10587 static inline uint16_t gattservice_subevent_hid_protocol_mode_get_hids_cid(const uint8_t * event){ 10588 return little_endian_read_16(event, 3); 10589 } 10590 /** 10591 * @brief Get field service_index from event GATTSERVICE_SUBEVENT_HID_PROTOCOL_MODE 10592 * @param event packet 10593 * @return service_index 10594 * @note: btstack_type 1 10595 */ 10596 static inline uint8_t gattservice_subevent_hid_protocol_mode_get_service_index(const uint8_t * event){ 10597 return event[5]; 10598 } 10599 /** 10600 * @brief Get field protocol_mode from event GATTSERVICE_SUBEVENT_HID_PROTOCOL_MODE 10601 * @param event packet 10602 * @return protocol_mode 10603 * @note: btstack_type 1 10604 */ 10605 static inline uint8_t gattservice_subevent_hid_protocol_mode_get_protocol_mode(const uint8_t * event){ 10606 return event[6]; 10607 } 10608 10609 /** 10610 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_HID_SERVICE_REPORTS_NOTIFICATION 10611 * @param event packet 10612 * @return hids_cid 10613 * @note: btstack_type 2 10614 */ 10615 static inline uint16_t gattservice_subevent_hid_service_reports_notification_get_hids_cid(const uint8_t * event){ 10616 return little_endian_read_16(event, 3); 10617 } 10618 /** 10619 * @brief Get field configuration from event GATTSERVICE_SUBEVENT_HID_SERVICE_REPORTS_NOTIFICATION 10620 * @param event packet 10621 * @return configuration 10622 * @note: btstack_type 1 10623 */ 10624 static inline uint8_t gattservice_subevent_hid_service_reports_notification_get_configuration(const uint8_t * event){ 10625 return event[5]; 10626 } 10627 10628 /** 10629 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_SCAN_INTERVAL_UPDATE 10630 * @param event packet 10631 * @return con_handle 10632 * @note: btstack_type H 10633 */ 10634 static inline hci_con_handle_t gattservice_subevent_scan_parameters_service_scan_interval_update_get_con_handle(const uint8_t * event){ 10635 return little_endian_read_16(event, 3); 10636 } 10637 /** 10638 * @brief Get field max_scan_interval from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_SCAN_INTERVAL_UPDATE 10639 * @param event packet 10640 * @return max_scan_interval 10641 * @note: btstack_type 2 10642 */ 10643 static inline uint16_t gattservice_subevent_scan_parameters_service_scan_interval_update_get_max_scan_interval(const uint8_t * event){ 10644 return little_endian_read_16(event, 5); 10645 } 10646 /** 10647 * @brief Get field min_scan_window from event GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_SCAN_INTERVAL_UPDATE 10648 * @param event packet 10649 * @return min_scan_window 10650 * @note: btstack_type 2 10651 */ 10652 static inline uint16_t gattservice_subevent_scan_parameters_service_scan_interval_update_get_min_scan_window(const uint8_t * event){ 10653 return little_endian_read_16(event, 7); 10654 } 10655 10656 /** 10657 * @brief Get field hids_cid from event GATTSERVICE_SUBEVENT_MICROPHONE_CONTROL_SERVICE_CONNECTED 10658 * @param event packet 10659 * @return hids_cid 10660 * @note: btstack_type 2 10661 */ 10662 static inline uint16_t gattservice_subevent_microphone_control_service_connected_get_hids_cid(const uint8_t * event){ 10663 return little_endian_read_16(event, 3); 10664 } 10665 /** 10666 * @brief Get field status from event GATTSERVICE_SUBEVENT_MICROPHONE_CONTROL_SERVICE_CONNECTED 10667 * @param event packet 10668 * @return status 10669 * @note: btstack_type 1 10670 */ 10671 static inline uint8_t gattservice_subevent_microphone_control_service_connected_get_status(const uint8_t * event){ 10672 return event[5]; 10673 } 10674 10675 /** 10676 * @brief Get field mics_cid from event GATTSERVICE_SUBEVENT_MICROPHONE_CONTROL_SERVICE_MUTE 10677 * @param event packet 10678 * @return mics_cid 10679 * @note: btstack_type 2 10680 */ 10681 static inline uint16_t gattservice_subevent_microphone_control_service_mute_get_mics_cid(const uint8_t * event){ 10682 return little_endian_read_16(event, 3); 10683 } 10684 /** 10685 * @brief Get field status from event GATTSERVICE_SUBEVENT_MICROPHONE_CONTROL_SERVICE_MUTE 10686 * @param event packet 10687 * @return status 10688 * @note: btstack_type 1 10689 */ 10690 static inline uint8_t gattservice_subevent_microphone_control_service_mute_get_status(const uint8_t * event){ 10691 return event[5]; 10692 } 10693 /** 10694 * @brief Get field mute_value from event GATTSERVICE_SUBEVENT_MICROPHONE_CONTROL_SERVICE_MUTE 10695 * @param event packet 10696 * @return mute_value 10697 * @note: btstack_type 1 10698 */ 10699 static inline uint8_t gattservice_subevent_microphone_control_service_mute_get_mute_value(const uint8_t * event){ 10700 return event[6]; 10701 } 10702 10703 /** 10704 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_OPENED 10705 * @param event packet 10706 * @return map_cid 10707 * @note: btstack_type 2 10708 */ 10709 static inline uint16_t map_subevent_connection_opened_get_map_cid(const uint8_t * event){ 10710 return little_endian_read_16(event, 3); 10711 } 10712 /** 10713 * @brief Get field status from event MAP_SUBEVENT_CONNECTION_OPENED 10714 * @param event packet 10715 * @return status 10716 * @note: btstack_type 1 10717 */ 10718 static inline uint8_t map_subevent_connection_opened_get_status(const uint8_t * event){ 10719 return event[5]; 10720 } 10721 /** 10722 * @brief Get field bd_addr from event MAP_SUBEVENT_CONNECTION_OPENED 10723 * @param event packet 10724 * @param Pointer to storage for bd_addr 10725 * @note: btstack_type B 10726 */ 10727 static inline void map_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 10728 reverse_bytes(&event[6], bd_addr, 6); 10729 } 10730 /** 10731 * @brief Get field con_handle from event MAP_SUBEVENT_CONNECTION_OPENED 10732 * @param event packet 10733 * @return con_handle 10734 * @note: btstack_type H 10735 */ 10736 static inline hci_con_handle_t map_subevent_connection_opened_get_con_handle(const uint8_t * event){ 10737 return little_endian_read_16(event, 12); 10738 } 10739 /** 10740 * @brief Get field incoming from event MAP_SUBEVENT_CONNECTION_OPENED 10741 * @param event packet 10742 * @return incoming 10743 * @note: btstack_type 1 10744 */ 10745 static inline uint8_t map_subevent_connection_opened_get_incoming(const uint8_t * event){ 10746 return event[14]; 10747 } 10748 10749 /** 10750 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_CLOSED 10751 * @param event packet 10752 * @return map_cid 10753 * @note: btstack_type 2 10754 */ 10755 static inline uint16_t map_subevent_connection_closed_get_map_cid(const uint8_t * event){ 10756 return little_endian_read_16(event, 3); 10757 } 10758 10759 /** 10760 * @brief Get field map_cid from event MAP_SUBEVENT_OPERATION_COMPLETED 10761 * @param event packet 10762 * @return map_cid 10763 * @note: btstack_type 2 10764 */ 10765 static inline uint16_t map_subevent_operation_completed_get_map_cid(const uint8_t * event){ 10766 return little_endian_read_16(event, 3); 10767 } 10768 /** 10769 * @brief Get field status from event MAP_SUBEVENT_OPERATION_COMPLETED 10770 * @param event packet 10771 * @return status 10772 * @note: btstack_type 1 10773 */ 10774 static inline uint8_t map_subevent_operation_completed_get_status(const uint8_t * event){ 10775 return event[5]; 10776 } 10777 10778 /** 10779 * @brief Get field map_cid from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 10780 * @param event packet 10781 * @return map_cid 10782 * @note: btstack_type 2 10783 */ 10784 static inline uint16_t map_subevent_folder_listing_item_get_map_cid(const uint8_t * event){ 10785 return little_endian_read_16(event, 3); 10786 } 10787 /** 10788 * @brief Get field name_len from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 10789 * @param event packet 10790 * @return name_len 10791 * @note: btstack_type L 10792 */ 10793 static inline uint16_t map_subevent_folder_listing_item_get_name_len(const uint8_t * event){ 10794 return little_endian_read_16(event, 5); 10795 } 10796 /** 10797 * @brief Get field name from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 10798 * @param event packet 10799 * @return name 10800 * @note: btstack_type V 10801 */ 10802 static inline const uint8_t * map_subevent_folder_listing_item_get_name(const uint8_t * event){ 10803 return &event[7]; 10804 } 10805 10806 /** 10807 * @brief Get field map_cid from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 10808 * @param event packet 10809 * @return map_cid 10810 * @note: btstack_type 2 10811 */ 10812 static inline uint16_t map_subevent_message_listing_item_get_map_cid(const uint8_t * event){ 10813 return little_endian_read_16(event, 3); 10814 } 10815 /** 10816 * @brief Get field handle from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 10817 * @param event packet 10818 * @return handle 10819 * @note: btstack_type D 10820 */ 10821 static inline const uint8_t * map_subevent_message_listing_item_get_handle(const uint8_t * event){ 10822 return (const uint8_t *) &event[5]; 10823 } 10824 10825 /** 10826 * @brief Get field map_cid from event MAP_SUBEVENT_PARSING_DONE 10827 * @param event packet 10828 * @return map_cid 10829 * @note: btstack_type 2 10830 */ 10831 static inline uint16_t map_subevent_parsing_done_get_map_cid(const uint8_t * event){ 10832 return little_endian_read_16(event, 3); 10833 } 10834 10835 10836 /** 10837 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT 10838 * @param event packet 10839 * @return status 10840 * @note: btstack_type 1 10841 */ 10842 static inline uint8_t mesh_subevent_pb_transport_pdu_sent_get_status(const uint8_t * event){ 10843 return event[3]; 10844 } 10845 10846 /** 10847 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 10848 * @param event packet 10849 * @return status 10850 * @note: btstack_type 1 10851 */ 10852 static inline uint8_t mesh_subevent_pb_transport_link_open_get_status(const uint8_t * event){ 10853 return event[3]; 10854 } 10855 /** 10856 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 10857 * @param event packet 10858 * @return pb_transport_cid 10859 * @note: btstack_type 2 10860 */ 10861 static inline uint16_t mesh_subevent_pb_transport_link_open_get_pb_transport_cid(const uint8_t * event){ 10862 return little_endian_read_16(event, 4); 10863 } 10864 /** 10865 * @brief Get field pb_type from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 10866 * @param event packet 10867 * @return pb_type 10868 * @note: btstack_type 1 10869 */ 10870 static inline uint8_t mesh_subevent_pb_transport_link_open_get_pb_type(const uint8_t * event){ 10871 return event[6]; 10872 } 10873 10874 /** 10875 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 10876 * @param event packet 10877 * @return pb_transport_cid 10878 * @note: btstack_type 1 10879 */ 10880 static inline uint8_t mesh_subevent_pb_transport_link_closed_get_pb_transport_cid(const uint8_t * event){ 10881 return event[3]; 10882 } 10883 /** 10884 * @brief Get field reason from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 10885 * @param event packet 10886 * @return reason 10887 * @note: btstack_type 2 10888 */ 10889 static inline uint16_t mesh_subevent_pb_transport_link_closed_get_reason(const uint8_t * event){ 10890 return little_endian_read_16(event, 4); 10891 } 10892 10893 /** 10894 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 10895 * @param event packet 10896 * @return pb_transport_cid 10897 * @note: btstack_type 2 10898 */ 10899 static inline uint16_t mesh_subevent_pb_prov_attention_timer_get_pb_transport_cid(const uint8_t * event){ 10900 return little_endian_read_16(event, 3); 10901 } 10902 /** 10903 * @brief Get field attention_time from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 10904 * @param event packet 10905 * @return attention_time 10906 * @note: btstack_type 1 10907 */ 10908 static inline uint8_t mesh_subevent_pb_prov_attention_timer_get_attention_time(const uint8_t * event){ 10909 return event[5]; 10910 } 10911 10912 /** 10913 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_PUBLIC_KEY_OOB 10914 * @param event packet 10915 * @return pb_transport_cid 10916 * @note: btstack_type 2 10917 */ 10918 static inline uint16_t mesh_subevent_pb_prov_start_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 10919 return little_endian_read_16(event, 3); 10920 } 10921 10922 /** 10923 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB 10924 * @param event packet 10925 * @return pb_transport_cid 10926 * @note: btstack_type 2 10927 */ 10928 static inline uint16_t mesh_subevent_pb_prov_stop_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 10929 return little_endian_read_16(event, 3); 10930 } 10931 10932 /** 10933 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_INPUT_OOB_REQUEST 10934 * @param event packet 10935 * @return pb_transport_cid 10936 * @note: btstack_type 2 10937 */ 10938 static inline uint16_t mesh_subevent_pb_prov_input_oob_request_get_pb_transport_cid(const uint8_t * event){ 10939 return little_endian_read_16(event, 3); 10940 } 10941 10942 /** 10943 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 10944 * @param event packet 10945 * @return pb_transport_cid 10946 * @note: btstack_type 2 10947 */ 10948 static inline uint16_t mesh_subevent_pb_prov_start_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 10949 return little_endian_read_16(event, 3); 10950 } 10951 /** 10952 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 10953 * @param event packet 10954 * @return output_oob 10955 * @note: btstack_type 4 10956 */ 10957 static inline uint32_t mesh_subevent_pb_prov_start_emit_output_oob_get_output_oob(const uint8_t * event){ 10958 return little_endian_read_32(event, 5); 10959 } 10960 10961 /** 10962 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_OUTPUT_OOB 10963 * @param event packet 10964 * @return pb_transport_cid 10965 * @note: btstack_type 2 10966 */ 10967 static inline uint16_t mesh_subevent_pb_prov_stop_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 10968 return little_endian_read_16(event, 3); 10969 } 10970 10971 /** 10972 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB 10973 * @param event packet 10974 * @return pb_transport_cid 10975 * @note: btstack_type 2 10976 */ 10977 static inline uint16_t mesh_subevent_pb_prov_start_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 10978 return little_endian_read_16(event, 3); 10979 } 10980 10981 /** 10982 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB 10983 * @param event packet 10984 * @return pb_transport_cid 10985 * @note: btstack_type 2 10986 */ 10987 static inline uint16_t mesh_subevent_pb_prov_stop_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 10988 return little_endian_read_16(event, 3); 10989 } 10990 10991 /** 10992 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_OUTPUT_OOB_REQUEST 10993 * @param event packet 10994 * @return pb_transport_cid 10995 * @note: btstack_type 2 10996 */ 10997 static inline uint16_t mesh_subevent_pb_prov_output_oob_request_get_pb_transport_cid(const uint8_t * event){ 10998 return little_endian_read_16(event, 3); 10999 } 11000 11001 /** 11002 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 11003 * @param event packet 11004 * @return pb_transport_cid 11005 * @note: btstack_type 2 11006 */ 11007 static inline uint16_t mesh_subevent_pb_prov_start_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 11008 return little_endian_read_16(event, 3); 11009 } 11010 /** 11011 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 11012 * @param event packet 11013 * @return output_oob 11014 * @note: btstack_type 4 11015 */ 11016 static inline uint32_t mesh_subevent_pb_prov_start_emit_input_oob_get_output_oob(const uint8_t * event){ 11017 return little_endian_read_32(event, 5); 11018 } 11019 11020 /** 11021 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_INPUT_OOB 11022 * @param event packet 11023 * @return pb_transport_cid 11024 * @note: btstack_type 2 11025 */ 11026 static inline uint16_t mesh_subevent_pb_prov_stop_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 11027 return little_endian_read_16(event, 3); 11028 } 11029 11030 /** 11031 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11032 * @param event packet 11033 * @return pb_transport_cid 11034 * @note: btstack_type 2 11035 */ 11036 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_pb_transport_cid(const uint8_t * event){ 11037 return little_endian_read_16(event, 3); 11038 } 11039 /** 11040 * @brief Get field num_elements from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11041 * @param event packet 11042 * @return num_elements 11043 * @note: btstack_type 1 11044 */ 11045 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_num_elements(const uint8_t * event){ 11046 return event[5]; 11047 } 11048 /** 11049 * @brief Get field algorithms from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11050 * @param event packet 11051 * @return algorithms 11052 * @note: btstack_type 2 11053 */ 11054 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_algorithms(const uint8_t * event){ 11055 return little_endian_read_16(event, 6); 11056 } 11057 /** 11058 * @brief Get field public_key from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11059 * @param event packet 11060 * @return public_key 11061 * @note: btstack_type 1 11062 */ 11063 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_public_key(const uint8_t * event){ 11064 return event[8]; 11065 } 11066 /** 11067 * @brief Get field static_oob_type from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11068 * @param event packet 11069 * @return static_oob_type 11070 * @note: btstack_type 1 11071 */ 11072 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_static_oob_type(const uint8_t * event){ 11073 return event[9]; 11074 } 11075 /** 11076 * @brief Get field output_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11077 * @param event packet 11078 * @return output_oob_size 11079 * @note: btstack_type 1 11080 */ 11081 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_output_oob_size(const uint8_t * event){ 11082 return event[10]; 11083 } 11084 /** 11085 * @brief Get field output_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11086 * @param event packet 11087 * @return output_oob_action 11088 * @note: btstack_type 2 11089 */ 11090 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_output_oob_action(const uint8_t * event){ 11091 return little_endian_read_16(event, 11); 11092 } 11093 /** 11094 * @brief Get field input_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11095 * @param event packet 11096 * @return input_oob_size 11097 * @note: btstack_type 1 11098 */ 11099 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_input_oob_size(const uint8_t * event){ 11100 return event[13]; 11101 } 11102 /** 11103 * @brief Get field input_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 11104 * @param event packet 11105 * @return input_oob_action 11106 * @note: btstack_type 2 11107 */ 11108 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_input_oob_action(const uint8_t * event){ 11109 return little_endian_read_16(event, 14); 11110 } 11111 11112 /** 11113 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_COMPLETE 11114 * @param event packet 11115 * @return pb_transport_cid 11116 * @note: btstack_type 2 11117 */ 11118 static inline uint16_t mesh_subevent_pb_prov_complete_get_pb_transport_cid(const uint8_t * event){ 11119 return little_endian_read_16(event, 3); 11120 } 11121 11122 /** 11123 * @brief Get field attention_time from event MESH_SUBEVENT_ATTENTION_TIMER 11124 * @param event packet 11125 * @return attention_time 11126 * @note: btstack_type 1 11127 */ 11128 static inline uint8_t mesh_subevent_attention_timer_get_attention_time(const uint8_t * event){ 11129 return event[3]; 11130 } 11131 11132 /** 11133 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_CONNECTED 11134 * @param event packet 11135 * @return con_handle 11136 * @note: btstack_type H 11137 */ 11138 static inline hci_con_handle_t mesh_subevent_proxy_connected_get_con_handle(const uint8_t * event){ 11139 return little_endian_read_16(event, 3); 11140 } 11141 11142 /** 11143 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_PDU_SENT 11144 * @param event packet 11145 * @return con_handle 11146 * @note: btstack_type H 11147 */ 11148 static inline hci_con_handle_t mesh_subevent_proxy_pdu_sent_get_con_handle(const uint8_t * event){ 11149 return little_endian_read_16(event, 3); 11150 } 11151 11152 /** 11153 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_DISCONNECTED 11154 * @param event packet 11155 * @return con_handle 11156 * @note: btstack_type H 11157 */ 11158 static inline hci_con_handle_t mesh_subevent_proxy_disconnected_get_con_handle(const uint8_t * event){ 11159 return little_endian_read_16(event, 3); 11160 } 11161 11162 /** 11163 * @brief Get field con_handle from event MESH_SUBEVENT_MESSAGE_SENT 11164 * @param event packet 11165 * @return con_handle 11166 * @note: btstack_type H 11167 */ 11168 static inline hci_con_handle_t mesh_subevent_message_sent_get_con_handle(const uint8_t * event){ 11169 return little_endian_read_16(event, 3); 11170 } 11171 11172 /** 11173 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_BOOL 11174 * @param event packet 11175 * @return element_index 11176 * @note: btstack_type 1 11177 */ 11178 static inline uint8_t mesh_subevent_state_update_bool_get_element_index(const uint8_t * event){ 11179 return event[3]; 11180 } 11181 /** 11182 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 11183 * @param event packet 11184 * @return model_identifier 11185 * @note: btstack_type 4 11186 */ 11187 static inline uint32_t mesh_subevent_state_update_bool_get_model_identifier(const uint8_t * event){ 11188 return little_endian_read_32(event, 4); 11189 } 11190 /** 11191 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 11192 * @param event packet 11193 * @return state_identifier 11194 * @note: btstack_type 4 11195 */ 11196 static inline uint32_t mesh_subevent_state_update_bool_get_state_identifier(const uint8_t * event){ 11197 return little_endian_read_32(event, 8); 11198 } 11199 /** 11200 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_BOOL 11201 * @param event packet 11202 * @return reason 11203 * @note: btstack_type 1 11204 */ 11205 static inline uint8_t mesh_subevent_state_update_bool_get_reason(const uint8_t * event){ 11206 return event[12]; 11207 } 11208 /** 11209 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_BOOL 11210 * @param event packet 11211 * @return value 11212 * @note: btstack_type 1 11213 */ 11214 static inline uint8_t mesh_subevent_state_update_bool_get_value(const uint8_t * event){ 11215 return event[13]; 11216 } 11217 11218 /** 11219 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_INT16 11220 * @param event packet 11221 * @return element_index 11222 * @note: btstack_type 1 11223 */ 11224 static inline uint8_t mesh_subevent_state_update_int16_get_element_index(const uint8_t * event){ 11225 return event[3]; 11226 } 11227 /** 11228 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 11229 * @param event packet 11230 * @return model_identifier 11231 * @note: btstack_type 4 11232 */ 11233 static inline uint32_t mesh_subevent_state_update_int16_get_model_identifier(const uint8_t * event){ 11234 return little_endian_read_32(event, 4); 11235 } 11236 /** 11237 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 11238 * @param event packet 11239 * @return state_identifier 11240 * @note: btstack_type 4 11241 */ 11242 static inline uint32_t mesh_subevent_state_update_int16_get_state_identifier(const uint8_t * event){ 11243 return little_endian_read_32(event, 8); 11244 } 11245 /** 11246 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_INT16 11247 * @param event packet 11248 * @return reason 11249 * @note: btstack_type 1 11250 */ 11251 static inline uint8_t mesh_subevent_state_update_int16_get_reason(const uint8_t * event){ 11252 return event[12]; 11253 } 11254 /** 11255 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_INT16 11256 * @param event packet 11257 * @return value 11258 * @note: btstack_type 2 11259 */ 11260 static inline uint16_t mesh_subevent_state_update_int16_get_value(const uint8_t * event){ 11261 return little_endian_read_16(event, 13); 11262 } 11263 11264 /** 11265 * @brief Get field element_index from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 11266 * @param event packet 11267 * @return element_index 11268 * @note: btstack_type 1 11269 */ 11270 static inline uint8_t mesh_subevent_message_not_acknowledged_get_element_index(const uint8_t * event){ 11271 return event[3]; 11272 } 11273 /** 11274 * @brief Get field model_identifier from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 11275 * @param event packet 11276 * @return model_identifier 11277 * @note: btstack_type 4 11278 */ 11279 static inline uint32_t mesh_subevent_message_not_acknowledged_get_model_identifier(const uint8_t * event){ 11280 return little_endian_read_32(event, 4); 11281 } 11282 /** 11283 * @brief Get field opcode from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 11284 * @param event packet 11285 * @return opcode 11286 * @note: btstack_type 4 11287 */ 11288 static inline uint32_t mesh_subevent_message_not_acknowledged_get_opcode(const uint8_t * event){ 11289 return little_endian_read_32(event, 8); 11290 } 11291 /** 11292 * @brief Get field dest from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 11293 * @param event packet 11294 * @return dest 11295 * @note: btstack_type 2 11296 */ 11297 static inline uint16_t mesh_subevent_message_not_acknowledged_get_dest(const uint8_t * event){ 11298 return little_endian_read_16(event, 12); 11299 } 11300 11301 /** 11302 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_ON_OFF 11303 * @param event packet 11304 * @return dest 11305 * @note: btstack_type 2 11306 */ 11307 static inline uint16_t mesh_subevent_generic_on_off_get_dest(const uint8_t * event){ 11308 return little_endian_read_16(event, 3); 11309 } 11310 /** 11311 * @brief Get field status from event MESH_SUBEVENT_GENERIC_ON_OFF 11312 * @param event packet 11313 * @return status 11314 * @note: btstack_type 1 11315 */ 11316 static inline uint8_t mesh_subevent_generic_on_off_get_status(const uint8_t * event){ 11317 return event[5]; 11318 } 11319 /** 11320 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_ON_OFF 11321 * @param event packet 11322 * @return present_value 11323 * @note: btstack_type 1 11324 */ 11325 static inline uint8_t mesh_subevent_generic_on_off_get_present_value(const uint8_t * event){ 11326 return event[6]; 11327 } 11328 /** 11329 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_ON_OFF 11330 * @param event packet 11331 * @return target_value 11332 * @note: btstack_type 1 11333 */ 11334 static inline uint8_t mesh_subevent_generic_on_off_get_target_value(const uint8_t * event){ 11335 return event[7]; 11336 } 11337 /** 11338 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_ON_OFF 11339 * @param event packet 11340 * @return remaining_time_ms 11341 * @note: btstack_type 4 11342 */ 11343 static inline uint32_t mesh_subevent_generic_on_off_get_remaining_time_ms(const uint8_t * event){ 11344 return little_endian_read_32(event, 8); 11345 } 11346 11347 /** 11348 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_LEVEL 11349 * @param event packet 11350 * @return dest 11351 * @note: btstack_type 2 11352 */ 11353 static inline uint16_t mesh_subevent_generic_level_get_dest(const uint8_t * event){ 11354 return little_endian_read_16(event, 3); 11355 } 11356 /** 11357 * @brief Get field status from event MESH_SUBEVENT_GENERIC_LEVEL 11358 * @param event packet 11359 * @return status 11360 * @note: btstack_type 1 11361 */ 11362 static inline uint8_t mesh_subevent_generic_level_get_status(const uint8_t * event){ 11363 return event[5]; 11364 } 11365 /** 11366 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_LEVEL 11367 * @param event packet 11368 * @return present_value 11369 * @note: btstack_type 2 11370 */ 11371 static inline uint16_t mesh_subevent_generic_level_get_present_value(const uint8_t * event){ 11372 return little_endian_read_16(event, 6); 11373 } 11374 /** 11375 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_LEVEL 11376 * @param event packet 11377 * @return target_value 11378 * @note: btstack_type 2 11379 */ 11380 static inline uint16_t mesh_subevent_generic_level_get_target_value(const uint8_t * event){ 11381 return little_endian_read_16(event, 8); 11382 } 11383 /** 11384 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_LEVEL 11385 * @param event packet 11386 * @return remaining_time_ms 11387 * @note: btstack_type 4 11388 */ 11389 static inline uint32_t mesh_subevent_generic_level_get_remaining_time_ms(const uint8_t * event){ 11390 return little_endian_read_32(event, 10); 11391 } 11392 11393 /** 11394 * @brief Get field dest from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11395 * @param event packet 11396 * @return dest 11397 * @note: btstack_type 2 11398 */ 11399 static inline uint16_t mesh_subevent_health_perform_test_get_dest(const uint8_t * event){ 11400 return little_endian_read_16(event, 3); 11401 } 11402 /** 11403 * @brief Get field netkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11404 * @param event packet 11405 * @return netkey_index 11406 * @note: btstack_type 2 11407 */ 11408 static inline uint16_t mesh_subevent_health_perform_test_get_netkey_index(const uint8_t * event){ 11409 return little_endian_read_16(event, 5); 11410 } 11411 /** 11412 * @brief Get field appkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11413 * @param event packet 11414 * @return appkey_index 11415 * @note: btstack_type 2 11416 */ 11417 static inline uint16_t mesh_subevent_health_perform_test_get_appkey_index(const uint8_t * event){ 11418 return little_endian_read_16(event, 7); 11419 } 11420 /** 11421 * @brief Get field company_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11422 * @param event packet 11423 * @return company_id 11424 * @note: btstack_type 2 11425 */ 11426 static inline uint16_t mesh_subevent_health_perform_test_get_company_id(const uint8_t * event){ 11427 return little_endian_read_16(event, 9); 11428 } 11429 /** 11430 * @brief Get field test_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11431 * @param event packet 11432 * @return test_id 11433 * @note: btstack_type 1 11434 */ 11435 static inline uint8_t mesh_subevent_health_perform_test_get_test_id(const uint8_t * event){ 11436 return event[11]; 11437 } 11438 /** 11439 * @brief Get field acknowledged from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 11440 * @param event packet 11441 * @return acknowledged 11442 * @note: btstack_type 1 11443 */ 11444 static inline uint8_t mesh_subevent_health_perform_test_get_acknowledged(const uint8_t * event){ 11445 return event[12]; 11446 } 11447 11448 /** 11449 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_ATTENTION_TIMER_CHANGED 11450 * @param event packet 11451 * @return element_index 11452 * @note: btstack_type 1 11453 */ 11454 static inline uint8_t mesh_subevent_health_attention_timer_changed_get_element_index(const uint8_t * event){ 11455 return event[3]; 11456 } 11457 11458 /** 11459 * @brief Get field dest from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 11460 * @param event packet 11461 * @return dest 11462 * @note: btstack_type 2 11463 */ 11464 static inline uint16_t mesh_subevent_generic_default_transition_time_get_dest(const uint8_t * event){ 11465 return little_endian_read_16(event, 3); 11466 } 11467 /** 11468 * @brief Get field status from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 11469 * @param event packet 11470 * @return status 11471 * @note: btstack_type 1 11472 */ 11473 static inline uint8_t mesh_subevent_generic_default_transition_time_get_status(const uint8_t * event){ 11474 return event[5]; 11475 } 11476 /** 11477 * @brief Get field transition_time_gdtt from event MESH_SUBEVENT_GENERIC_DEFAULT_TRANSITION_TIME 11478 * @param event packet 11479 * @return transition_time_gdtt 11480 * @note: btstack_type 1 11481 */ 11482 static inline uint8_t mesh_subevent_generic_default_transition_time_get_transition_time_gdtt(const uint8_t * event){ 11483 return event[6]; 11484 } 11485 11486 /** 11487 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_BEACON 11488 * @param event packet 11489 * @return dest 11490 * @note: btstack_type 2 11491 */ 11492 static inline uint16_t mesh_subevent_configuration_beacon_get_dest(const uint8_t * event){ 11493 return little_endian_read_16(event, 3); 11494 } 11495 /** 11496 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_BEACON 11497 * @param event packet 11498 * @return foundation_status 11499 * @note: btstack_type 1 11500 */ 11501 static inline uint8_t mesh_subevent_configuration_beacon_get_foundation_status(const uint8_t * event){ 11502 return event[5]; 11503 } 11504 /** 11505 * @brief Get field secure_network_beacon_state from event MESH_SUBEVENT_CONFIGURATION_BEACON 11506 * @param event packet 11507 * @return secure_network_beacon_state 11508 * @note: btstack_type 1 11509 */ 11510 static inline uint8_t mesh_subevent_configuration_beacon_get_secure_network_beacon_state(const uint8_t * event){ 11511 return event[6]; 11512 } 11513 11514 /** 11515 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 11516 * @param event packet 11517 * @return dest 11518 * @note: btstack_type 2 11519 */ 11520 static inline uint16_t mesh_subevent_configuration_default_ttl_get_dest(const uint8_t * event){ 11521 return little_endian_read_16(event, 3); 11522 } 11523 /** 11524 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 11525 * @param event packet 11526 * @return foundation_status 11527 * @note: btstack_type 1 11528 */ 11529 static inline uint8_t mesh_subevent_configuration_default_ttl_get_foundation_status(const uint8_t * event){ 11530 return event[5]; 11531 } 11532 /** 11533 * @brief Get field default_ttl from event MESH_SUBEVENT_CONFIGURATION_DEFAULT_TTL 11534 * @param event packet 11535 * @return default_ttl 11536 * @note: btstack_type 1 11537 */ 11538 static inline uint8_t mesh_subevent_configuration_default_ttl_get_default_ttl(const uint8_t * event){ 11539 return event[6]; 11540 } 11541 11542 /** 11543 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 11544 * @param event packet 11545 * @return dest 11546 * @note: btstack_type 2 11547 */ 11548 static inline uint16_t mesh_subevent_configuration_gatt_proxy_get_dest(const uint8_t * event){ 11549 return little_endian_read_16(event, 3); 11550 } 11551 /** 11552 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 11553 * @param event packet 11554 * @return foundation_status 11555 * @note: btstack_type 1 11556 */ 11557 static inline uint8_t mesh_subevent_configuration_gatt_proxy_get_foundation_status(const uint8_t * event){ 11558 return event[5]; 11559 } 11560 /** 11561 * @brief Get field gatt_proxy_state from event MESH_SUBEVENT_CONFIGURATION_GATT_PROXY 11562 * @param event packet 11563 * @return gatt_proxy_state 11564 * @note: btstack_type 1 11565 */ 11566 static inline uint8_t mesh_subevent_configuration_gatt_proxy_get_gatt_proxy_state(const uint8_t * event){ 11567 return event[6]; 11568 } 11569 11570 /** 11571 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_RELAY 11572 * @param event packet 11573 * @return dest 11574 * @note: btstack_type 2 11575 */ 11576 static inline uint16_t mesh_subevent_configuration_relay_get_dest(const uint8_t * event){ 11577 return little_endian_read_16(event, 3); 11578 } 11579 /** 11580 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_RELAY 11581 * @param event packet 11582 * @return foundation_status 11583 * @note: btstack_type 1 11584 */ 11585 static inline uint8_t mesh_subevent_configuration_relay_get_foundation_status(const uint8_t * event){ 11586 return event[5]; 11587 } 11588 /** 11589 * @brief Get field relay from event MESH_SUBEVENT_CONFIGURATION_RELAY 11590 * @param event packet 11591 * @return relay 11592 * @note: btstack_type 1 11593 */ 11594 static inline uint8_t mesh_subevent_configuration_relay_get_relay(const uint8_t * event){ 11595 return event[6]; 11596 } 11597 /** 11598 * @brief Get field retransmit_count from event MESH_SUBEVENT_CONFIGURATION_RELAY 11599 * @param event packet 11600 * @return retransmit_count 11601 * @note: btstack_type 1 11602 */ 11603 static inline uint8_t mesh_subevent_configuration_relay_get_retransmit_count(const uint8_t * event){ 11604 return event[7]; 11605 } 11606 /** 11607 * @brief Get field retransmit_interval_ms from event MESH_SUBEVENT_CONFIGURATION_RELAY 11608 * @param event packet 11609 * @return retransmit_interval_ms 11610 * @note: btstack_type 1 11611 */ 11612 static inline uint8_t mesh_subevent_configuration_relay_get_retransmit_interval_ms(const uint8_t * event){ 11613 return event[8]; 11614 } 11615 11616 /** 11617 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11618 * @param event packet 11619 * @return dest 11620 * @note: btstack_type 2 11621 */ 11622 static inline uint16_t mesh_subevent_configuration_model_publication_get_dest(const uint8_t * event){ 11623 return little_endian_read_16(event, 3); 11624 } 11625 /** 11626 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11627 * @param event packet 11628 * @return foundation_status 11629 * @note: btstack_type 1 11630 */ 11631 static inline uint8_t mesh_subevent_configuration_model_publication_get_foundation_status(const uint8_t * event){ 11632 return event[5]; 11633 } 11634 /** 11635 * @brief Get field publish_address from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11636 * @param event packet 11637 * @return publish_address 11638 * @note: btstack_type 2 11639 */ 11640 static inline uint16_t mesh_subevent_configuration_model_publication_get_publish_address(const uint8_t * event){ 11641 return little_endian_read_16(event, 6); 11642 } 11643 /** 11644 * @brief Get field appkey_index from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11645 * @param event packet 11646 * @return appkey_index 11647 * @note: btstack_type 2 11648 */ 11649 static inline uint16_t mesh_subevent_configuration_model_publication_get_appkey_index(const uint8_t * event){ 11650 return little_endian_read_16(event, 8); 11651 } 11652 /** 11653 * @brief Get field credential_flag from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11654 * @param event packet 11655 * @return credential_flag 11656 * @note: btstack_type 1 11657 */ 11658 static inline uint8_t mesh_subevent_configuration_model_publication_get_credential_flag(const uint8_t * event){ 11659 return event[10]; 11660 } 11661 /** 11662 * @brief Get field publish_ttl from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11663 * @param event packet 11664 * @return publish_ttl 11665 * @note: btstack_type 1 11666 */ 11667 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_ttl(const uint8_t * event){ 11668 return event[11]; 11669 } 11670 /** 11671 * @brief Get field publish_period from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11672 * @param event packet 11673 * @return publish_period 11674 * @note: btstack_type 1 11675 */ 11676 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_period(const uint8_t * event){ 11677 return event[12]; 11678 } 11679 /** 11680 * @brief Get field publish_retransmit_count from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11681 * @param event packet 11682 * @return publish_retransmit_count 11683 * @note: btstack_type 1 11684 */ 11685 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_retransmit_count(const uint8_t * event){ 11686 return event[13]; 11687 } 11688 /** 11689 * @brief Get field publish_retransmit_interval_steps from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11690 * @param event packet 11691 * @return publish_retransmit_interval_steps 11692 * @note: btstack_type 1 11693 */ 11694 static inline uint8_t mesh_subevent_configuration_model_publication_get_publish_retransmit_interval_steps(const uint8_t * event){ 11695 return event[14]; 11696 } 11697 /** 11698 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_PUBLICATION 11699 * @param event packet 11700 * @return model_identifier 11701 * @note: btstack_type 4 11702 */ 11703 static inline uint32_t mesh_subevent_configuration_model_publication_get_model_identifier(const uint8_t * event){ 11704 return little_endian_read_32(event, 15); 11705 } 11706 11707 /** 11708 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 11709 * @param event packet 11710 * @return dest 11711 * @note: btstack_type 2 11712 */ 11713 static inline uint16_t mesh_subevent_configuration_model_subscription_get_dest(const uint8_t * event){ 11714 return little_endian_read_16(event, 3); 11715 } 11716 /** 11717 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 11718 * @param event packet 11719 * @return foundation_status 11720 * @note: btstack_type 1 11721 */ 11722 static inline uint8_t mesh_subevent_configuration_model_subscription_get_foundation_status(const uint8_t * event){ 11723 return event[5]; 11724 } 11725 /** 11726 * @brief Get field address from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 11727 * @param event packet 11728 * @return address 11729 * @note: btstack_type 2 11730 */ 11731 static inline uint16_t mesh_subevent_configuration_model_subscription_get_address(const uint8_t * event){ 11732 return little_endian_read_16(event, 6); 11733 } 11734 /** 11735 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION 11736 * @param event packet 11737 * @return model_identifier 11738 * @note: btstack_type 4 11739 */ 11740 static inline uint32_t mesh_subevent_configuration_model_subscription_get_model_identifier(const uint8_t * event){ 11741 return little_endian_read_32(event, 8); 11742 } 11743 11744 /** 11745 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11746 * @param event packet 11747 * @return dest 11748 * @note: btstack_type 2 11749 */ 11750 static inline uint16_t mesh_subevent_configuration_model_subscription_list_item_get_dest(const uint8_t * event){ 11751 return little_endian_read_16(event, 3); 11752 } 11753 /** 11754 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11755 * @param event packet 11756 * @return foundation_status 11757 * @note: btstack_type 1 11758 */ 11759 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_foundation_status(const uint8_t * event){ 11760 return event[5]; 11761 } 11762 /** 11763 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11764 * @param event packet 11765 * @return model_identifier 11766 * @note: btstack_type 4 11767 */ 11768 static inline uint32_t mesh_subevent_configuration_model_subscription_list_item_get_model_identifier(const uint8_t * event){ 11769 return little_endian_read_32(event, 6); 11770 } 11771 /** 11772 * @brief Get field num_subscription_addresses from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11773 * @param event packet 11774 * @return num_subscription_addresses 11775 * @note: btstack_type 1 11776 */ 11777 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_num_subscription_addresses(const uint8_t * event){ 11778 return event[10]; 11779 } 11780 /** 11781 * @brief Get field subscription_address_pos from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11782 * @param event packet 11783 * @return subscription_address_pos 11784 * @note: btstack_type 1 11785 */ 11786 static inline uint8_t mesh_subevent_configuration_model_subscription_list_item_get_subscription_address_pos(const uint8_t * event){ 11787 return event[11]; 11788 } 11789 /** 11790 * @brief Get field subscription_address_item from event MESH_SUBEVENT_CONFIGURATION_MODEL_SUBSCRIPTION_LIST_ITEM 11791 * @param event packet 11792 * @return subscription_address_item 11793 * @note: btstack_type 2 11794 */ 11795 static inline uint16_t mesh_subevent_configuration_model_subscription_list_item_get_subscription_address_item(const uint8_t * event){ 11796 return little_endian_read_16(event, 12); 11797 } 11798 11799 /** 11800 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX 11801 * @param event packet 11802 * @return dest 11803 * @note: btstack_type 2 11804 */ 11805 static inline uint16_t mesh_subevent_configuration_netkey_index_get_dest(const uint8_t * event){ 11806 return little_endian_read_16(event, 3); 11807 } 11808 /** 11809 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX 11810 * @param event packet 11811 * @return foundation_status 11812 * @note: btstack_type 1 11813 */ 11814 static inline uint8_t mesh_subevent_configuration_netkey_index_get_foundation_status(const uint8_t * event){ 11815 return event[5]; 11816 } 11817 11818 /** 11819 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 11820 * @param event packet 11821 * @return dest 11822 * @note: btstack_type 2 11823 */ 11824 static inline uint16_t mesh_subevent_configuration_netkey_index_list_item_get_dest(const uint8_t * event){ 11825 return little_endian_read_16(event, 3); 11826 } 11827 /** 11828 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 11829 * @param event packet 11830 * @return foundation_status 11831 * @note: btstack_type 1 11832 */ 11833 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_foundation_status(const uint8_t * event){ 11834 return event[5]; 11835 } 11836 /** 11837 * @brief Get field num_netkey_indexes from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 11838 * @param event packet 11839 * @return num_netkey_indexes 11840 * @note: btstack_type 1 11841 */ 11842 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_num_netkey_indexes(const uint8_t * event){ 11843 return event[6]; 11844 } 11845 /** 11846 * @brief Get field netkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 11847 * @param event packet 11848 * @return netkey_index_pos 11849 * @note: btstack_type 1 11850 */ 11851 static inline uint8_t mesh_subevent_configuration_netkey_index_list_item_get_netkey_index_pos(const uint8_t * event){ 11852 return event[7]; 11853 } 11854 /** 11855 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_NETKEY_INDEX_LIST_ITEM 11856 * @param event packet 11857 * @return netkey_index_item 11858 * @note: btstack_type 2 11859 */ 11860 static inline uint16_t mesh_subevent_configuration_netkey_index_list_item_get_netkey_index_item(const uint8_t * event){ 11861 return little_endian_read_16(event, 8); 11862 } 11863 11864 /** 11865 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 11866 * @param event packet 11867 * @return dest 11868 * @note: btstack_type 2 11869 */ 11870 static inline uint16_t mesh_subevent_configuration_appkey_index_get_dest(const uint8_t * event){ 11871 return little_endian_read_16(event, 3); 11872 } 11873 /** 11874 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 11875 * @param event packet 11876 * @return foundation_status 11877 * @note: btstack_type 1 11878 */ 11879 static inline uint8_t mesh_subevent_configuration_appkey_index_get_foundation_status(const uint8_t * event){ 11880 return event[5]; 11881 } 11882 /** 11883 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 11884 * @param event packet 11885 * @return netkey_index_item 11886 * @note: btstack_type 2 11887 */ 11888 static inline uint16_t mesh_subevent_configuration_appkey_index_get_netkey_index_item(const uint8_t * event){ 11889 return little_endian_read_16(event, 6); 11890 } 11891 /** 11892 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX 11893 * @param event packet 11894 * @return appkey_index_item 11895 * @note: btstack_type 2 11896 */ 11897 static inline uint16_t mesh_subevent_configuration_appkey_index_get_appkey_index_item(const uint8_t * event){ 11898 return little_endian_read_16(event, 8); 11899 } 11900 11901 /** 11902 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11903 * @param event packet 11904 * @return dest 11905 * @note: btstack_type 2 11906 */ 11907 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_dest(const uint8_t * event){ 11908 return little_endian_read_16(event, 3); 11909 } 11910 /** 11911 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11912 * @param event packet 11913 * @return foundation_status 11914 * @note: btstack_type 1 11915 */ 11916 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_foundation_status(const uint8_t * event){ 11917 return event[5]; 11918 } 11919 /** 11920 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11921 * @param event packet 11922 * @return netkey_index 11923 * @note: btstack_type 2 11924 */ 11925 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_netkey_index(const uint8_t * event){ 11926 return little_endian_read_16(event, 6); 11927 } 11928 /** 11929 * @brief Get field num_appkey_indexes from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11930 * @param event packet 11931 * @return num_appkey_indexes 11932 * @note: btstack_type 1 11933 */ 11934 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_num_appkey_indexes(const uint8_t * event){ 11935 return event[8]; 11936 } 11937 /** 11938 * @brief Get field appkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11939 * @param event packet 11940 * @return appkey_index_pos 11941 * @note: btstack_type 1 11942 */ 11943 static inline uint8_t mesh_subevent_configuration_appkey_index_list_item_get_appkey_index_pos(const uint8_t * event){ 11944 return event[9]; 11945 } 11946 /** 11947 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11948 * @param event packet 11949 * @return netkey_index_item 11950 * @note: btstack_type 2 11951 */ 11952 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_netkey_index_item(const uint8_t * event){ 11953 return little_endian_read_16(event, 10); 11954 } 11955 /** 11956 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_APPKEY_INDEX_LIST_ITEM 11957 * @param event packet 11958 * @return appkey_index_item 11959 * @note: btstack_type 2 11960 */ 11961 static inline uint16_t mesh_subevent_configuration_appkey_index_list_item_get_appkey_index_item(const uint8_t * event){ 11962 return little_endian_read_16(event, 12); 11963 } 11964 11965 /** 11966 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 11967 * @param event packet 11968 * @return dest 11969 * @note: btstack_type 2 11970 */ 11971 static inline uint16_t mesh_subevent_configuration_node_identity_get_dest(const uint8_t * event){ 11972 return little_endian_read_16(event, 3); 11973 } 11974 /** 11975 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 11976 * @param event packet 11977 * @return foundation_status 11978 * @note: btstack_type 1 11979 */ 11980 static inline uint8_t mesh_subevent_configuration_node_identity_get_foundation_status(const uint8_t * event){ 11981 return event[5]; 11982 } 11983 /** 11984 * @brief Get field netkey_index_item from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 11985 * @param event packet 11986 * @return netkey_index_item 11987 * @note: btstack_type 2 11988 */ 11989 static inline uint16_t mesh_subevent_configuration_node_identity_get_netkey_index_item(const uint8_t * event){ 11990 return little_endian_read_16(event, 6); 11991 } 11992 /** 11993 * @brief Get field identity_status from event MESH_SUBEVENT_CONFIGURATION_NODE_IDENTITY 11994 * @param event packet 11995 * @return identity_status 11996 * @note: btstack_type 1 11997 */ 11998 static inline uint8_t mesh_subevent_configuration_node_identity_get_identity_status(const uint8_t * event){ 11999 return event[8]; 12000 } 12001 12002 /** 12003 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 12004 * @param event packet 12005 * @return dest 12006 * @note: btstack_type 2 12007 */ 12008 static inline uint16_t mesh_subevent_configuration_model_app_get_dest(const uint8_t * event){ 12009 return little_endian_read_16(event, 3); 12010 } 12011 /** 12012 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 12013 * @param event packet 12014 * @return foundation_status 12015 * @note: btstack_type 1 12016 */ 12017 static inline uint8_t mesh_subevent_configuration_model_app_get_foundation_status(const uint8_t * event){ 12018 return event[5]; 12019 } 12020 /** 12021 * @brief Get field appkey_index from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 12022 * @param event packet 12023 * @return appkey_index 12024 * @note: btstack_type 2 12025 */ 12026 static inline uint16_t mesh_subevent_configuration_model_app_get_appkey_index(const uint8_t * event){ 12027 return little_endian_read_16(event, 6); 12028 } 12029 /** 12030 * @brief Get field model_identifier from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP 12031 * @param event packet 12032 * @return model_identifier 12033 * @note: btstack_type 4 12034 */ 12035 static inline uint32_t mesh_subevent_configuration_model_app_get_model_identifier(const uint8_t * event){ 12036 return little_endian_read_32(event, 8); 12037 } 12038 12039 /** 12040 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12041 * @param event packet 12042 * @return dest 12043 * @note: btstack_type 2 12044 */ 12045 static inline uint16_t mesh_subevent_configuration_model_app_list_item_get_dest(const uint8_t * event){ 12046 return little_endian_read_16(event, 3); 12047 } 12048 /** 12049 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12050 * @param event packet 12051 * @return foundation_status 12052 * @note: btstack_type 1 12053 */ 12054 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_foundation_status(const uint8_t * event){ 12055 return event[5]; 12056 } 12057 /** 12058 * @brief Get field model_id from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12059 * @param event packet 12060 * @return model_id 12061 * @note: btstack_type 4 12062 */ 12063 static inline uint32_t mesh_subevent_configuration_model_app_list_item_get_model_id(const uint8_t * event){ 12064 return little_endian_read_32(event, 6); 12065 } 12066 /** 12067 * @brief Get field num_appkey_indexes from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12068 * @param event packet 12069 * @return num_appkey_indexes 12070 * @note: btstack_type 1 12071 */ 12072 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_num_appkey_indexes(const uint8_t * event){ 12073 return event[10]; 12074 } 12075 /** 12076 * @brief Get field appkey_index_pos from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12077 * @param event packet 12078 * @return appkey_index_pos 12079 * @note: btstack_type 1 12080 */ 12081 static inline uint8_t mesh_subevent_configuration_model_app_list_item_get_appkey_index_pos(const uint8_t * event){ 12082 return event[11]; 12083 } 12084 /** 12085 * @brief Get field appkey_index_item from event MESH_SUBEVENT_CONFIGURATION_MODEL_APP_LIST_ITEM 12086 * @param event packet 12087 * @return appkey_index_item 12088 * @note: btstack_type 2 12089 */ 12090 static inline uint16_t mesh_subevent_configuration_model_app_list_item_get_appkey_index_item(const uint8_t * event){ 12091 return little_endian_read_16(event, 12); 12092 } 12093 12094 /** 12095 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NODE_RESET 12096 * @param event packet 12097 * @return dest 12098 * @note: btstack_type 2 12099 */ 12100 static inline uint16_t mesh_subevent_configuration_node_reset_get_dest(const uint8_t * event){ 12101 return little_endian_read_16(event, 3); 12102 } 12103 /** 12104 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NODE_RESET 12105 * @param event packet 12106 * @return foundation_status 12107 * @note: btstack_type 1 12108 */ 12109 static inline uint8_t mesh_subevent_configuration_node_reset_get_foundation_status(const uint8_t * event){ 12110 return event[5]; 12111 } 12112 12113 /** 12114 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_FRIEND 12115 * @param event packet 12116 * @return dest 12117 * @note: btstack_type 2 12118 */ 12119 static inline uint16_t mesh_subevent_configuration_friend_get_dest(const uint8_t * event){ 12120 return little_endian_read_16(event, 3); 12121 } 12122 /** 12123 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_FRIEND 12124 * @param event packet 12125 * @return foundation_status 12126 * @note: btstack_type 1 12127 */ 12128 static inline uint8_t mesh_subevent_configuration_friend_get_foundation_status(const uint8_t * event){ 12129 return event[5]; 12130 } 12131 /** 12132 * @brief Get field friend_state from event MESH_SUBEVENT_CONFIGURATION_FRIEND 12133 * @param event packet 12134 * @return friend_state 12135 * @note: btstack_type 1 12136 */ 12137 static inline uint8_t mesh_subevent_configuration_friend_get_friend_state(const uint8_t * event){ 12138 return event[6]; 12139 } 12140 12141 /** 12142 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 12143 * @param event packet 12144 * @return dest 12145 * @note: btstack_type 2 12146 */ 12147 static inline uint16_t mesh_subevent_configuration_key_refresh_phase_get_dest(const uint8_t * event){ 12148 return little_endian_read_16(event, 3); 12149 } 12150 /** 12151 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 12152 * @param event packet 12153 * @return foundation_status 12154 * @note: btstack_type 1 12155 */ 12156 static inline uint8_t mesh_subevent_configuration_key_refresh_phase_get_foundation_status(const uint8_t * event){ 12157 return event[5]; 12158 } 12159 /** 12160 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 12161 * @param event packet 12162 * @return netkey_index 12163 * @note: btstack_type 2 12164 */ 12165 static inline uint16_t mesh_subevent_configuration_key_refresh_phase_get_netkey_index(const uint8_t * event){ 12166 return little_endian_read_16(event, 6); 12167 } 12168 /** 12169 * @brief Get field phase from event MESH_SUBEVENT_CONFIGURATION_KEY_REFRESH_PHASE 12170 * @param event packet 12171 * @return phase 12172 * @note: btstack_type 1 12173 */ 12174 static inline uint8_t mesh_subevent_configuration_key_refresh_phase_get_phase(const uint8_t * event){ 12175 return event[8]; 12176 } 12177 12178 /** 12179 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12180 * @param event packet 12181 * @return dest 12182 * @note: btstack_type 2 12183 */ 12184 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_dest(const uint8_t * event){ 12185 return little_endian_read_16(event, 3); 12186 } 12187 /** 12188 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12189 * @param event packet 12190 * @return foundation_status 12191 * @note: btstack_type 1 12192 */ 12193 static inline uint8_t mesh_subevent_configuration_heartbeat_publication_get_foundation_status(const uint8_t * event){ 12194 return event[5]; 12195 } 12196 /** 12197 * @brief Get field heartbeat_destination from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12198 * @param event packet 12199 * @return heartbeat_destination 12200 * @note: btstack_type 2 12201 */ 12202 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_heartbeat_destination(const uint8_t * event){ 12203 return little_endian_read_16(event, 6); 12204 } 12205 /** 12206 * @brief Get field count_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12207 * @param event packet 12208 * @return count_S 12209 * @note: btstack_type 2 12210 */ 12211 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_count_S(const uint8_t * event){ 12212 return little_endian_read_16(event, 8); 12213 } 12214 /** 12215 * @brief Get field period_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12216 * @param event packet 12217 * @return period_S 12218 * @note: btstack_type 2 12219 */ 12220 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_period_S(const uint8_t * event){ 12221 return little_endian_read_16(event, 10); 12222 } 12223 /** 12224 * @brief Get field ttl from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12225 * @param event packet 12226 * @return ttl 12227 * @note: btstack_type 1 12228 */ 12229 static inline uint8_t mesh_subevent_configuration_heartbeat_publication_get_ttl(const uint8_t * event){ 12230 return event[12]; 12231 } 12232 /** 12233 * @brief Get field features from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12234 * @param event packet 12235 * @return features 12236 * @note: btstack_type 2 12237 */ 12238 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_features(const uint8_t * event){ 12239 return little_endian_read_16(event, 13); 12240 } 12241 /** 12242 * @brief Get field netkey_index from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_PUBLICATION 12243 * @param event packet 12244 * @return netkey_index 12245 * @note: btstack_type 2 12246 */ 12247 static inline uint16_t mesh_subevent_configuration_heartbeat_publication_get_netkey_index(const uint8_t * event){ 12248 return little_endian_read_16(event, 15); 12249 } 12250 12251 /** 12252 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12253 * @param event packet 12254 * @return dest 12255 * @note: btstack_type 2 12256 */ 12257 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_dest(const uint8_t * event){ 12258 return little_endian_read_16(event, 3); 12259 } 12260 /** 12261 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12262 * @param event packet 12263 * @return foundation_status 12264 * @note: btstack_type 1 12265 */ 12266 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_foundation_status(const uint8_t * event){ 12267 return event[5]; 12268 } 12269 /** 12270 * @brief Get field heartbeat_destination from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12271 * @param event packet 12272 * @return heartbeat_destination 12273 * @note: btstack_type 2 12274 */ 12275 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_heartbeat_destination(const uint8_t * event){ 12276 return little_endian_read_16(event, 6); 12277 } 12278 /** 12279 * @brief Get field heartbeat_source from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12280 * @param event packet 12281 * @return heartbeat_source 12282 * @note: btstack_type 2 12283 */ 12284 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_heartbeat_source(const uint8_t * event){ 12285 return little_endian_read_16(event, 8); 12286 } 12287 /** 12288 * @brief Get field count_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12289 * @param event packet 12290 * @return count_S 12291 * @note: btstack_type 2 12292 */ 12293 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_count_S(const uint8_t * event){ 12294 return little_endian_read_16(event, 10); 12295 } 12296 /** 12297 * @brief Get field period_S from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12298 * @param event packet 12299 * @return period_S 12300 * @note: btstack_type 2 12301 */ 12302 static inline uint16_t mesh_subevent_configuration_heartbeat_subscription_get_period_S(const uint8_t * event){ 12303 return little_endian_read_16(event, 12); 12304 } 12305 /** 12306 * @brief Get field min_hops from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12307 * @param event packet 12308 * @return min_hops 12309 * @note: btstack_type 1 12310 */ 12311 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_min_hops(const uint8_t * event){ 12312 return event[14]; 12313 } 12314 /** 12315 * @brief Get field max_hops from event MESH_SUBEVENT_CONFIGURATION_HEARTBEAT_SUBSCRIPTION 12316 * @param event packet 12317 * @return max_hops 12318 * @note: btstack_type 1 12319 */ 12320 static inline uint8_t mesh_subevent_configuration_heartbeat_subscription_get_max_hops(const uint8_t * event){ 12321 return event[15]; 12322 } 12323 12324 /** 12325 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 12326 * @param event packet 12327 * @return dest 12328 * @note: btstack_type 2 12329 */ 12330 static inline uint16_t mesh_subevent_configuration_low_power_node_poll_timeout_get_dest(const uint8_t * event){ 12331 return little_endian_read_16(event, 3); 12332 } 12333 /** 12334 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 12335 * @param event packet 12336 * @return foundation_status 12337 * @note: btstack_type 1 12338 */ 12339 static inline uint8_t mesh_subevent_configuration_low_power_node_poll_timeout_get_foundation_status(const uint8_t * event){ 12340 return event[5]; 12341 } 12342 /** 12343 * @brief Get field lpn_address from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 12344 * @param event packet 12345 * @return lpn_address 12346 * @note: btstack_type 2 12347 */ 12348 static inline uint16_t mesh_subevent_configuration_low_power_node_poll_timeout_get_lpn_address(const uint8_t * event){ 12349 return little_endian_read_16(event, 6); 12350 } 12351 /** 12352 * @brief Get field poll_timeout from event MESH_SUBEVENT_CONFIGURATION_LOW_POWER_NODE_POLL_TIMEOUT 12353 * @param event packet 12354 * @return poll_timeout 12355 * @note: btstack_type 3 12356 */ 12357 static inline uint32_t mesh_subevent_configuration_low_power_node_poll_timeout_get_poll_timeout(const uint8_t * event){ 12358 return little_endian_read_24(event, 8); 12359 } 12360 12361 /** 12362 * @brief Get field dest from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 12363 * @param event packet 12364 * @return dest 12365 * @note: btstack_type 2 12366 */ 12367 static inline uint16_t mesh_subevent_configuration_network_transmit_get_dest(const uint8_t * event){ 12368 return little_endian_read_16(event, 3); 12369 } 12370 /** 12371 * @brief Get field foundation_status from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 12372 * @param event packet 12373 * @return foundation_status 12374 * @note: btstack_type 1 12375 */ 12376 static inline uint8_t mesh_subevent_configuration_network_transmit_get_foundation_status(const uint8_t * event){ 12377 return event[5]; 12378 } 12379 /** 12380 * @brief Get field transmit_count from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 12381 * @param event packet 12382 * @return transmit_count 12383 * @note: btstack_type 1 12384 */ 12385 static inline uint8_t mesh_subevent_configuration_network_transmit_get_transmit_count(const uint8_t * event){ 12386 return event[6]; 12387 } 12388 /** 12389 * @brief Get field transmit_interval_steps_ms from event MESH_SUBEVENT_CONFIGURATION_NETWORK_TRANSMIT 12390 * @param event packet 12391 * @return transmit_interval_steps_ms 12392 * @note: btstack_type 2 12393 */ 12394 static inline uint16_t mesh_subevent_configuration_network_transmit_get_transmit_interval_steps_ms(const uint8_t * event){ 12395 return little_endian_read_16(event, 7); 12396 } 12397 12398 12399 12400 /* API_END */ 12401 12402 #if defined __cplusplus 12403 } 12404 #endif 12405 12406 #endif // BTSTACK_EVENT_H 12407