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