1 /* 2 * Copyright (C) 2016 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the copyright holders nor the names of 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 4. Any redistribution, use, or modification is done solely for 17 * personal benefit and not for any commercial purpose or for 18 * monetary gain. 19 * 20 * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * Please inquire about commercial licensing options at 34 * [email protected] 35 * 36 */ 37 38 39 /* 40 * btstack_event.h 41 * 42 * @brief BTstack event getter/setter 43 * @note Don't edit - generated by tool/btstack_event_generator.py 44 * 45 */ 46 47 #ifndef BTSTACK_EVENT_H 48 #define BTSTACK_EVENT_H 49 50 #if defined __cplusplus 51 extern "C" { 52 #endif 53 54 #include "btstack_util.h" 55 #include <stdint.h> 56 57 #ifdef ENABLE_BLE 58 #include "ble/gatt_client.h" 59 #endif 60 61 /* API_START */ 62 63 /** 64 * @brief Get event type 65 * @param event 66 * @return type of event 67 */ 68 static inline uint8_t hci_event_packet_get_type(const uint8_t * event){ 69 return event[0]; 70 } 71 72 /*** 73 * @brief Get subevent code for a2dp event 74 * @param event packet 75 * @return subevent_code 76 */ 77 static inline uint8_t hci_event_a2dp_meta_get_subevent_code(const uint8_t * event){ 78 return event[2]; 79 } 80 /*** 81 * @brief Get subevent code for ancs event 82 * @param event packet 83 * @return subevent_code 84 */ 85 static inline uint8_t hci_event_ancs_meta_get_subevent_code(const uint8_t * event){ 86 return event[2]; 87 } 88 /*** 89 * @brief Get subevent code for avdtp event 90 * @param event packet 91 * @return subevent_code 92 */ 93 static inline uint8_t hci_event_avdtp_meta_get_subevent_code(const uint8_t * event){ 94 return event[2]; 95 } 96 /*** 97 * @brief Get subevent code for avrcp event 98 * @param event packet 99 * @return subevent_code 100 */ 101 static inline uint8_t hci_event_avrcp_meta_get_subevent_code(const uint8_t * event){ 102 return event[2]; 103 } 104 /*** 105 * @brief Get subevent code for gattservice event 106 * @param event packet 107 * @return subevent_code 108 */ 109 static inline uint8_t hci_event_gattservice_meta_get_subevent_code(const uint8_t * event){ 110 return event[2]; 111 } 112 /*** 113 * @brief Get subevent code for goep event 114 * @param event packet 115 * @return subevent_code 116 */ 117 static inline uint8_t hci_event_goep_meta_get_subevent_code(const uint8_t * event){ 118 return event[2]; 119 } 120 /*** 121 * @brief Get subevent code for hfp event 122 * @param event packet 123 * @return subevent_code 124 */ 125 static inline uint8_t hci_event_hfp_meta_get_subevent_code(const uint8_t * event){ 126 return event[2]; 127 } 128 /*** 129 * @brief Get subevent code for hid event 130 * @param event packet 131 * @return subevent_code 132 */ 133 static inline uint8_t hci_event_hid_meta_get_subevent_code(const uint8_t * event){ 134 return event[2]; 135 } 136 /*** 137 * @brief Get subevent code for hids event 138 * @param event packet 139 * @return subevent_code 140 */ 141 static inline uint8_t hci_event_hids_meta_get_subevent_code(const uint8_t * event){ 142 return event[2]; 143 } 144 /*** 145 * @brief Get subevent code for hsp event 146 * @param event packet 147 * @return subevent_code 148 */ 149 static inline uint8_t hci_event_hsp_meta_get_subevent_code(const uint8_t * event){ 150 return event[2]; 151 } 152 /*** 153 * @brief Get subevent code for le event 154 * @param event packet 155 * @return subevent_code 156 */ 157 static inline uint8_t hci_event_le_meta_get_subevent_code(const uint8_t * event){ 158 return event[2]; 159 } 160 /*** 161 * @brief Get subevent code for map event 162 * @param event packet 163 * @return subevent_code 164 */ 165 static inline uint8_t hci_event_map_meta_get_subevent_code(const uint8_t * event){ 166 return event[2]; 167 } 168 /*** 169 * @brief Get subevent code for mesh event 170 * @param event packet 171 * @return subevent_code 172 */ 173 static inline uint8_t hci_event_mesh_meta_get_subevent_code(const uint8_t * event){ 174 return event[2]; 175 } 176 /*** 177 * @brief Get subevent code for pbap event 178 * @param event packet 179 * @return subevent_code 180 */ 181 static inline uint8_t hci_event_pbap_meta_get_subevent_code(const uint8_t * event){ 182 return event[2]; 183 } 184 /** 185 * @brief Get field status from event HCI_EVENT_INQUIRY_COMPLETE 186 * @param event packet 187 * @return status 188 * @note: btstack_type 1 189 */ 190 static inline uint8_t hci_event_inquiry_complete_get_status(const uint8_t * event){ 191 return event[2]; 192 } 193 194 /** 195 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT 196 * @param event packet 197 * @return num_responses 198 * @note: btstack_type 1 199 */ 200 static inline uint8_t hci_event_inquiry_result_get_num_responses(const uint8_t * event){ 201 return event[2]; 202 } 203 /** 204 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT 205 * @param event packet 206 * @param Pointer to storage for bd_addr 207 * @note: btstack_type B 208 */ 209 static inline void hci_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 210 reverse_bytes(&event[3], bd_addr, 6); 211 } 212 /** 213 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT 214 * @param event packet 215 * @return page_scan_repetition_mode 216 * @note: btstack_type 1 217 */ 218 static inline uint8_t hci_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 219 return event[9]; 220 } 221 /** 222 * @brief Get field reserved1 from event HCI_EVENT_INQUIRY_RESULT 223 * @param event packet 224 * @return reserved1 225 * @note: btstack_type 1 226 */ 227 static inline uint8_t hci_event_inquiry_result_get_reserved1(const uint8_t * event){ 228 return event[10]; 229 } 230 /** 231 * @brief Get field reserved2 from event HCI_EVENT_INQUIRY_RESULT 232 * @param event packet 233 * @return reserved2 234 * @note: btstack_type 1 235 */ 236 static inline uint8_t hci_event_inquiry_result_get_reserved2(const uint8_t * event){ 237 return event[11]; 238 } 239 /** 240 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT 241 * @param event packet 242 * @return class_of_device 243 * @note: btstack_type 3 244 */ 245 static inline uint32_t hci_event_inquiry_result_get_class_of_device(const uint8_t * event){ 246 return little_endian_read_24(event, 12); 247 } 248 /** 249 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT 250 * @param event packet 251 * @return clock_offset 252 * @note: btstack_type 2 253 */ 254 static inline uint16_t hci_event_inquiry_result_get_clock_offset(const uint8_t * event){ 255 return little_endian_read_16(event, 15); 256 } 257 258 /** 259 * @brief Get field status from event HCI_EVENT_CONNECTION_COMPLETE 260 * @param event packet 261 * @return status 262 * @note: btstack_type 1 263 */ 264 static inline uint8_t hci_event_connection_complete_get_status(const uint8_t * event){ 265 return event[2]; 266 } 267 /** 268 * @brief Get field connection_handle from event HCI_EVENT_CONNECTION_COMPLETE 269 * @param event packet 270 * @return connection_handle 271 * @note: btstack_type 2 272 */ 273 static inline uint16_t hci_event_connection_complete_get_connection_handle(const uint8_t * event){ 274 return little_endian_read_16(event, 3); 275 } 276 /** 277 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_COMPLETE 278 * @param event packet 279 * @param Pointer to storage for bd_addr 280 * @note: btstack_type B 281 */ 282 static inline void hci_event_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 283 reverse_bytes(&event[5], bd_addr, 6); 284 } 285 /** 286 * @brief Get field link_type from event HCI_EVENT_CONNECTION_COMPLETE 287 * @param event packet 288 * @return link_type 289 * @note: btstack_type 1 290 */ 291 static inline uint8_t hci_event_connection_complete_get_link_type(const uint8_t * event){ 292 return event[11]; 293 } 294 /** 295 * @brief Get field encryption_enabled from event HCI_EVENT_CONNECTION_COMPLETE 296 * @param event packet 297 * @return encryption_enabled 298 * @note: btstack_type 1 299 */ 300 static inline uint8_t hci_event_connection_complete_get_encryption_enabled(const uint8_t * event){ 301 return event[12]; 302 } 303 304 /** 305 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_REQUEST 306 * @param event packet 307 * @param Pointer to storage for bd_addr 308 * @note: btstack_type B 309 */ 310 static inline void hci_event_connection_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 311 reverse_bytes(&event[2], bd_addr, 6); 312 } 313 /** 314 * @brief Get field class_of_device from event HCI_EVENT_CONNECTION_REQUEST 315 * @param event packet 316 * @return class_of_device 317 * @note: btstack_type 3 318 */ 319 static inline uint32_t hci_event_connection_request_get_class_of_device(const uint8_t * event){ 320 return little_endian_read_24(event, 8); 321 } 322 /** 323 * @brief Get field link_type from event HCI_EVENT_CONNECTION_REQUEST 324 * @param event packet 325 * @return link_type 326 * @note: btstack_type 1 327 */ 328 static inline uint8_t hci_event_connection_request_get_link_type(const uint8_t * event){ 329 return event[11]; 330 } 331 332 /** 333 * @brief Get field status from event HCI_EVENT_DISCONNECTION_COMPLETE 334 * @param event packet 335 * @return status 336 * @note: btstack_type 1 337 */ 338 static inline uint8_t hci_event_disconnection_complete_get_status(const uint8_t * event){ 339 return event[2]; 340 } 341 /** 342 * @brief Get field connection_handle from event HCI_EVENT_DISCONNECTION_COMPLETE 343 * @param event packet 344 * @return connection_handle 345 * @note: btstack_type 2 346 */ 347 static inline uint16_t hci_event_disconnection_complete_get_connection_handle(const uint8_t * event){ 348 return little_endian_read_16(event, 3); 349 } 350 /** 351 * @brief Get field reason from event HCI_EVENT_DISCONNECTION_COMPLETE 352 * @param event packet 353 * @return reason 354 * @note: btstack_type 1 355 */ 356 static inline uint8_t hci_event_disconnection_complete_get_reason(const uint8_t * event){ 357 return event[5]; 358 } 359 360 /** 361 * @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE 362 * @param event packet 363 * @return status 364 * @note: btstack_type 1 365 */ 366 static inline uint8_t hci_event_authentication_complete_get_status(const uint8_t * event){ 367 return event[2]; 368 } 369 /** 370 * @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE 371 * @param event packet 372 * @return connection_handle 373 * @note: btstack_type 2 374 */ 375 static inline uint16_t hci_event_authentication_complete_get_connection_handle(const uint8_t * event){ 376 return little_endian_read_16(event, 3); 377 } 378 379 /** 380 * @brief Get field status from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 381 * @param event packet 382 * @return status 383 * @note: btstack_type 1 384 */ 385 static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){ 386 return event[2]; 387 } 388 /** 389 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 390 * @param event packet 391 * @param Pointer to storage for bd_addr 392 * @note: btstack_type B 393 */ 394 static inline void hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 395 reverse_bytes(&event[3], bd_addr, 6); 396 } 397 /** 398 * @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 399 * @param event packet 400 * @return remote_name 401 * @note: btstack_type N 402 */ 403 static inline const char * hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){ 404 return (const char *) &event[9]; 405 } 406 407 /** 408 * @brief Get field status from event HCI_EVENT_ENCRYPTION_CHANGE 409 * @param event packet 410 * @return status 411 * @note: btstack_type 1 412 */ 413 static inline uint8_t hci_event_encryption_change_get_status(const uint8_t * event){ 414 return event[2]; 415 } 416 /** 417 * @brief Get field connection_handle from event HCI_EVENT_ENCRYPTION_CHANGE 418 * @param event packet 419 * @return connection_handle 420 * @note: btstack_type 2 421 */ 422 static inline uint16_t hci_event_encryption_change_get_connection_handle(const uint8_t * event){ 423 return little_endian_read_16(event, 3); 424 } 425 /** 426 * @brief Get field encryption_enabled from event HCI_EVENT_ENCRYPTION_CHANGE 427 * @param event packet 428 * @return encryption_enabled 429 * @note: btstack_type 1 430 */ 431 static inline uint8_t hci_event_encryption_change_get_encryption_enabled(const uint8_t * event){ 432 return event[5]; 433 } 434 435 /** 436 * @brief Get field status from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 437 * @param event packet 438 * @return status 439 * @note: btstack_type 1 440 */ 441 static inline uint8_t hci_event_change_connection_link_key_complete_get_status(const uint8_t * event){ 442 return event[2]; 443 } 444 /** 445 * @brief Get field connection_handle from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 446 * @param event packet 447 * @return connection_handle 448 * @note: btstack_type 2 449 */ 450 static inline uint16_t hci_event_change_connection_link_key_complete_get_connection_handle(const uint8_t * event){ 451 return little_endian_read_16(event, 3); 452 } 453 454 /** 455 * @brief Get field status from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 456 * @param event packet 457 * @return status 458 * @note: btstack_type 1 459 */ 460 static inline uint8_t hci_event_master_link_key_complete_get_status(const uint8_t * event){ 461 return event[2]; 462 } 463 /** 464 * @brief Get field connection_handle from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 465 * @param event packet 466 * @return connection_handle 467 * @note: btstack_type 2 468 */ 469 static inline uint16_t hci_event_master_link_key_complete_get_connection_handle(const uint8_t * event){ 470 return little_endian_read_16(event, 3); 471 } 472 /** 473 * @brief Get field key_flag from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 474 * @param event packet 475 * @return key_flag 476 * @note: btstack_type 1 477 */ 478 static inline uint8_t hci_event_master_link_key_complete_get_key_flag(const uint8_t * event){ 479 return event[5]; 480 } 481 482 /** 483 * @brief Get field status from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 484 * @param event packet 485 * @return status 486 * @note: btstack_type 1 487 */ 488 static inline uint8_t hci_event_read_remote_version_information_complete_get_status(const uint8_t * event){ 489 return event[2]; 490 } 491 /** 492 * @brief Get field connection_handle from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 493 * @param event packet 494 * @return connection_handle 495 * @note: btstack_type 2 496 */ 497 static inline uint16_t hci_event_read_remote_version_information_complete_get_connection_handle(const uint8_t * event){ 498 return little_endian_read_16(event, 3); 499 } 500 /** 501 * @brief Get field version from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 502 * @param event packet 503 * @return version 504 * @note: btstack_type 1 505 */ 506 static inline uint8_t hci_event_read_remote_version_information_complete_get_version(const uint8_t * event){ 507 return event[5]; 508 } 509 /** 510 * @brief Get field manufacturer_name from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 511 * @param event packet 512 * @return manufacturer_name 513 * @note: btstack_type 2 514 */ 515 static inline uint16_t hci_event_read_remote_version_information_complete_get_manufacturer_name(const uint8_t * event){ 516 return little_endian_read_16(event, 6); 517 } 518 /** 519 * @brief Get field subversion from event HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 520 * @param event packet 521 * @return subversion 522 * @note: btstack_type 2 523 */ 524 static inline uint16_t hci_event_read_remote_version_information_complete_get_subversion(const uint8_t * event){ 525 return little_endian_read_16(event, 8); 526 } 527 528 /** 529 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_COMPLETE 530 * @param event packet 531 * @return num_hci_command_packets 532 * @note: btstack_type 1 533 */ 534 static inline uint8_t hci_event_command_complete_get_num_hci_command_packets(const uint8_t * event){ 535 return event[2]; 536 } 537 /** 538 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_COMPLETE 539 * @param event packet 540 * @return command_opcode 541 * @note: btstack_type 2 542 */ 543 static inline uint16_t hci_event_command_complete_get_command_opcode(const uint8_t * event){ 544 return little_endian_read_16(event, 3); 545 } 546 /** 547 * @brief Get field return_parameters from event HCI_EVENT_COMMAND_COMPLETE 548 * @param event packet 549 * @return return_parameters 550 * @note: btstack_type R 551 */ 552 static inline const uint8_t * hci_event_command_complete_get_return_parameters(const uint8_t * event){ 553 return &event[5]; 554 } 555 556 /** 557 * @brief Get field status from event HCI_EVENT_COMMAND_STATUS 558 * @param event packet 559 * @return status 560 * @note: btstack_type 1 561 */ 562 static inline uint8_t hci_event_command_status_get_status(const uint8_t * event){ 563 return event[2]; 564 } 565 /** 566 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_STATUS 567 * @param event packet 568 * @return num_hci_command_packets 569 * @note: btstack_type 1 570 */ 571 static inline uint8_t hci_event_command_status_get_num_hci_command_packets(const uint8_t * event){ 572 return event[3]; 573 } 574 /** 575 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_STATUS 576 * @param event packet 577 * @return command_opcode 578 * @note: btstack_type 2 579 */ 580 static inline uint16_t hci_event_command_status_get_command_opcode(const uint8_t * event){ 581 return little_endian_read_16(event, 4); 582 } 583 584 /** 585 * @brief Get field hardware_code from event HCI_EVENT_HARDWARE_ERROR 586 * @param event packet 587 * @return hardware_code 588 * @note: btstack_type 1 589 */ 590 static inline uint8_t hci_event_hardware_error_get_hardware_code(const uint8_t * event){ 591 return event[2]; 592 } 593 594 /** 595 * @brief Get field status from event HCI_EVENT_ROLE_CHANGE 596 * @param event packet 597 * @return status 598 * @note: btstack_type 1 599 */ 600 static inline uint8_t hci_event_role_change_get_status(const uint8_t * event){ 601 return event[2]; 602 } 603 /** 604 * @brief Get field bd_addr from event HCI_EVENT_ROLE_CHANGE 605 * @param event packet 606 * @param Pointer to storage for bd_addr 607 * @note: btstack_type B 608 */ 609 static inline void hci_event_role_change_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 610 reverse_bytes(&event[3], bd_addr, 6); 611 } 612 /** 613 * @brief Get field role from event HCI_EVENT_ROLE_CHANGE 614 * @param event packet 615 * @return role 616 * @note: btstack_type 1 617 */ 618 static inline uint8_t hci_event_role_change_get_role(const uint8_t * event){ 619 return event[9]; 620 } 621 622 /** 623 * @brief Get field status from event HCI_EVENT_MODE_CHANGE 624 * @param event packet 625 * @return status 626 * @note: btstack_type 1 627 */ 628 static inline uint8_t hci_event_mode_change_get_status(const uint8_t * event){ 629 return event[2]; 630 } 631 /** 632 * @brief Get field handle from event HCI_EVENT_MODE_CHANGE 633 * @param event packet 634 * @return handle 635 * @note: btstack_type H 636 */ 637 static inline hci_con_handle_t hci_event_mode_change_get_handle(const uint8_t * event){ 638 return little_endian_read_16(event, 3); 639 } 640 /** 641 * @brief Get field mode from event HCI_EVENT_MODE_CHANGE 642 * @param event packet 643 * @return mode 644 * @note: btstack_type 1 645 */ 646 static inline uint8_t hci_event_mode_change_get_mode(const uint8_t * event){ 647 return event[5]; 648 } 649 /** 650 * @brief Get field interval from event HCI_EVENT_MODE_CHANGE 651 * @param event packet 652 * @return interval 653 * @note: btstack_type 2 654 */ 655 static inline uint16_t hci_event_mode_change_get_interval(const uint8_t * event){ 656 return little_endian_read_16(event, 6); 657 } 658 659 /** 660 * @brief Get field bd_addr from event HCI_EVENT_PIN_CODE_REQUEST 661 * @param event packet 662 * @param Pointer to storage for bd_addr 663 * @note: btstack_type B 664 */ 665 static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 666 reverse_bytes(&event[2], bd_addr, 6); 667 } 668 669 /** 670 * @brief Get field bd_addr from event HCI_EVENT_LINK_KEY_REQUEST 671 * @param event packet 672 * @param Pointer to storage for bd_addr 673 * @note: btstack_type B 674 */ 675 static inline void hci_event_link_key_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 676 reverse_bytes(&event[2], bd_addr, 6); 677 } 678 679 /** 680 * @brief Get field link_type from event HCI_EVENT_DATA_BUFFER_OVERFLOW 681 * @param event packet 682 * @return link_type 683 * @note: btstack_type 1 684 */ 685 static inline uint8_t hci_event_data_buffer_overflow_get_link_type(const uint8_t * event){ 686 return event[2]; 687 } 688 689 /** 690 * @brief Get field handle from event HCI_EVENT_MAX_SLOTS_CHANGED 691 * @param event packet 692 * @return handle 693 * @note: btstack_type H 694 */ 695 static inline hci_con_handle_t hci_event_max_slots_changed_get_handle(const uint8_t * event){ 696 return little_endian_read_16(event, 2); 697 } 698 /** 699 * @brief Get field lmp_max_slots from event HCI_EVENT_MAX_SLOTS_CHANGED 700 * @param event packet 701 * @return lmp_max_slots 702 * @note: btstack_type 1 703 */ 704 static inline uint8_t hci_event_max_slots_changed_get_lmp_max_slots(const uint8_t * event){ 705 return event[4]; 706 } 707 708 /** 709 * @brief Get field status from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 710 * @param event packet 711 * @return status 712 * @note: btstack_type 1 713 */ 714 static inline uint8_t hci_event_read_clock_offset_complete_get_status(const uint8_t * event){ 715 return event[2]; 716 } 717 /** 718 * @brief Get field handle from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 719 * @param event packet 720 * @return handle 721 * @note: btstack_type H 722 */ 723 static inline hci_con_handle_t hci_event_read_clock_offset_complete_get_handle(const uint8_t * event){ 724 return little_endian_read_16(event, 3); 725 } 726 /** 727 * @brief Get field clock_offset from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 728 * @param event packet 729 * @return clock_offset 730 * @note: btstack_type 2 731 */ 732 static inline uint16_t hci_event_read_clock_offset_complete_get_clock_offset(const uint8_t * event){ 733 return little_endian_read_16(event, 5); 734 } 735 736 /** 737 * @brief Get field status from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 738 * @param event packet 739 * @return status 740 * @note: btstack_type 1 741 */ 742 static inline uint8_t hci_event_connection_packet_type_changed_get_status(const uint8_t * event){ 743 return event[2]; 744 } 745 /** 746 * @brief Get field handle from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 747 * @param event packet 748 * @return handle 749 * @note: btstack_type H 750 */ 751 static inline hci_con_handle_t hci_event_connection_packet_type_changed_get_handle(const uint8_t * event){ 752 return little_endian_read_16(event, 3); 753 } 754 /** 755 * @brief Get field packet_types from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 756 * @param event packet 757 * @return packet_types 758 * @note: btstack_type 2 759 */ 760 static inline uint16_t hci_event_connection_packet_type_changed_get_packet_types(const uint8_t * event){ 761 return little_endian_read_16(event, 5); 762 } 763 764 /** 765 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 766 * @param event packet 767 * @return num_responses 768 * @note: btstack_type 1 769 */ 770 static inline uint8_t hci_event_inquiry_result_with_rssi_get_num_responses(const uint8_t * event){ 771 return event[2]; 772 } 773 /** 774 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 775 * @param event packet 776 * @param Pointer to storage for bd_addr 777 * @note: btstack_type B 778 */ 779 static inline void hci_event_inquiry_result_with_rssi_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 780 reverse_bytes(&event[3], bd_addr, 6); 781 } 782 /** 783 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 784 * @param event packet 785 * @return page_scan_repetition_mode 786 * @note: btstack_type 1 787 */ 788 static inline uint8_t hci_event_inquiry_result_with_rssi_get_page_scan_repetition_mode(const uint8_t * event){ 789 return event[9]; 790 } 791 /** 792 * @brief Get field reserved from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 793 * @param event packet 794 * @return reserved 795 * @note: btstack_type 1 796 */ 797 static inline uint8_t hci_event_inquiry_result_with_rssi_get_reserved(const uint8_t * event){ 798 return event[10]; 799 } 800 /** 801 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 802 * @param event packet 803 * @return class_of_device 804 * @note: btstack_type 3 805 */ 806 static inline uint32_t hci_event_inquiry_result_with_rssi_get_class_of_device(const uint8_t * event){ 807 return little_endian_read_24(event, 11); 808 } 809 /** 810 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 811 * @param event packet 812 * @return clock_offset 813 * @note: btstack_type 2 814 */ 815 static inline uint16_t hci_event_inquiry_result_with_rssi_get_clock_offset(const uint8_t * event){ 816 return little_endian_read_16(event, 14); 817 } 818 /** 819 * @brief Get field rssi from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 820 * @param event packet 821 * @return rssi 822 * @note: btstack_type 1 823 */ 824 static inline uint8_t hci_event_inquiry_result_with_rssi_get_rssi(const uint8_t * event){ 825 return event[16]; 826 } 827 828 /** 829 * @brief Get field status from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 830 * @param event packet 831 * @return status 832 * @note: btstack_type 1 833 */ 834 static inline uint8_t hci_event_synchronous_connection_complete_get_status(const uint8_t * event){ 835 return event[2]; 836 } 837 /** 838 * @brief Get field handle from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 839 * @param event packet 840 * @return handle 841 * @note: btstack_type H 842 */ 843 static inline hci_con_handle_t hci_event_synchronous_connection_complete_get_handle(const uint8_t * event){ 844 return little_endian_read_16(event, 3); 845 } 846 /** 847 * @brief Get field bd_addr from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 848 * @param event packet 849 * @param Pointer to storage for bd_addr 850 * @note: btstack_type B 851 */ 852 static inline void hci_event_synchronous_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 853 reverse_bytes(&event[5], bd_addr, 6); 854 } 855 /** 856 * @brief Get field link_type from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 857 * @param event packet 858 * @return link_type 859 * @note: btstack_type 1 860 */ 861 static inline uint8_t hci_event_synchronous_connection_complete_get_link_type(const uint8_t * event){ 862 return event[11]; 863 } 864 /** 865 * @brief Get field transmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 866 * @param event packet 867 * @return transmission_interval 868 * @note: btstack_type 1 869 */ 870 static inline uint8_t hci_event_synchronous_connection_complete_get_transmission_interval(const uint8_t * event){ 871 return event[12]; 872 } 873 /** 874 * @brief Get field retransmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 875 * @param event packet 876 * @return retransmission_interval 877 * @note: btstack_type 1 878 */ 879 static inline uint8_t hci_event_synchronous_connection_complete_get_retransmission_interval(const uint8_t * event){ 880 return event[13]; 881 } 882 /** 883 * @brief Get field rx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 884 * @param event packet 885 * @return rx_packet_length 886 * @note: btstack_type 2 887 */ 888 static inline uint16_t hci_event_synchronous_connection_complete_get_rx_packet_length(const uint8_t * event){ 889 return little_endian_read_16(event, 14); 890 } 891 /** 892 * @brief Get field tx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 893 * @param event packet 894 * @return tx_packet_length 895 * @note: btstack_type 2 896 */ 897 static inline uint16_t hci_event_synchronous_connection_complete_get_tx_packet_length(const uint8_t * event){ 898 return little_endian_read_16(event, 16); 899 } 900 /** 901 * @brief Get field air_mode from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 902 * @param event packet 903 * @return air_mode 904 * @note: btstack_type 1 905 */ 906 static inline uint8_t hci_event_synchronous_connection_complete_get_air_mode(const uint8_t * event){ 907 return event[18]; 908 } 909 910 /** 911 * @brief Get field num_responses from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 912 * @param event packet 913 * @return num_responses 914 * @note: btstack_type 1 915 */ 916 static inline uint8_t hci_event_extended_inquiry_response_get_num_responses(const uint8_t * event){ 917 return event[2]; 918 } 919 /** 920 * @brief Get field bd_addr from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 921 * @param event packet 922 * @param Pointer to storage for bd_addr 923 * @note: btstack_type B 924 */ 925 static inline void hci_event_extended_inquiry_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 926 reverse_bytes(&event[3], bd_addr, 6); 927 } 928 /** 929 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 930 * @param event packet 931 * @return page_scan_repetition_mode 932 * @note: btstack_type 1 933 */ 934 static inline uint8_t hci_event_extended_inquiry_response_get_page_scan_repetition_mode(const uint8_t * event){ 935 return event[9]; 936 } 937 /** 938 * @brief Get field reserved from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 939 * @param event packet 940 * @return reserved 941 * @note: btstack_type 1 942 */ 943 static inline uint8_t hci_event_extended_inquiry_response_get_reserved(const uint8_t * event){ 944 return event[10]; 945 } 946 /** 947 * @brief Get field class_of_device from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 948 * @param event packet 949 * @return class_of_device 950 * @note: btstack_type 3 951 */ 952 static inline uint32_t hci_event_extended_inquiry_response_get_class_of_device(const uint8_t * event){ 953 return little_endian_read_24(event, 11); 954 } 955 /** 956 * @brief Get field clock_offset from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 957 * @param event packet 958 * @return clock_offset 959 * @note: btstack_type 2 960 */ 961 static inline uint16_t hci_event_extended_inquiry_response_get_clock_offset(const uint8_t * event){ 962 return little_endian_read_16(event, 14); 963 } 964 /** 965 * @brief Get field rssi from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 966 * @param event packet 967 * @return rssi 968 * @note: btstack_type 1 969 */ 970 static inline uint8_t hci_event_extended_inquiry_response_get_rssi(const uint8_t * event){ 971 return event[16]; 972 } 973 974 /** 975 * @brief Get field status from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 976 * @param event packet 977 * @return status 978 * @note: btstack_type 1 979 */ 980 static inline uint8_t hci_event_encryption_key_refresh_complete_get_status(const uint8_t * event){ 981 return event[2]; 982 } 983 /** 984 * @brief Get field handle from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 985 * @param event packet 986 * @return handle 987 * @note: btstack_type H 988 */ 989 static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_handle(const uint8_t * event){ 990 return little_endian_read_16(event, 3); 991 } 992 993 /** 994 * @brief Get field bd_addr from event HCI_EVENT_USER_CONFIRMATION_REQUEST 995 * @param event packet 996 * @param Pointer to storage for bd_addr 997 * @note: btstack_type B 998 */ 999 static inline void hci_event_user_confirmation_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1000 reverse_bytes(&event[2], bd_addr, 6); 1001 } 1002 /** 1003 * @brief Get field numeric_value from event HCI_EVENT_USER_CONFIRMATION_REQUEST 1004 * @param event packet 1005 * @return numeric_value 1006 * @note: btstack_type 4 1007 */ 1008 static inline uint32_t hci_event_user_confirmation_request_get_numeric_value(const uint8_t * event){ 1009 return little_endian_read_32(event, 8); 1010 } 1011 1012 /** 1013 * @brief Get field bd_addr from event HCI_EVENT_USER_PASSKEY_REQUEST 1014 * @param event packet 1015 * @param Pointer to storage for bd_addr 1016 * @note: btstack_type B 1017 */ 1018 static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1019 reverse_bytes(&event[2], bd_addr, 6); 1020 } 1021 1022 /** 1023 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_OOB_DATA_REQUEST 1024 * @param event packet 1025 * @param Pointer to storage for bd_addr 1026 * @note: btstack_type B 1027 */ 1028 static inline void hci_event_remote_oob_data_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1029 reverse_bytes(&event[2], bd_addr, 6); 1030 } 1031 1032 /** 1033 * @brief Get field status from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 1034 * @param event packet 1035 * @return status 1036 * @note: btstack_type 1 1037 */ 1038 static inline uint8_t hci_event_simple_pairing_complete_get_status(const uint8_t * event){ 1039 return event[2]; 1040 } 1041 /** 1042 * @brief Get field bd_addr from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 1043 * @param event packet 1044 * @param Pointer to storage for bd_addr 1045 * @note: btstack_type B 1046 */ 1047 static inline void hci_event_simple_pairing_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1048 reverse_bytes(&event[3], bd_addr, 6); 1049 } 1050 1051 /** 1052 * @brief Get field state from event BTSTACK_EVENT_STATE 1053 * @param event packet 1054 * @return state 1055 * @note: btstack_type 1 1056 */ 1057 static inline uint8_t btstack_event_state_get_state(const uint8_t * event){ 1058 return event[2]; 1059 } 1060 1061 /** 1062 * @brief Get field number_connections from event BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 1063 * @param event packet 1064 * @return number_connections 1065 * @note: btstack_type 1 1066 */ 1067 static inline uint8_t btstack_event_nr_connections_changed_get_number_connections(const uint8_t * event){ 1068 return event[2]; 1069 } 1070 1071 1072 /** 1073 * @brief Get field discoverable from event BTSTACK_EVENT_DISCOVERABLE_ENABLED 1074 * @param event packet 1075 * @return discoverable 1076 * @note: btstack_type 1 1077 */ 1078 static inline uint8_t btstack_event_discoverable_enabled_get_discoverable(const uint8_t * event){ 1079 return event[2]; 1080 } 1081 1082 /** 1083 * @brief Get field active from event HCI_EVENT_TRANSPORT_SLEEP_MODE 1084 * @param event packet 1085 * @return active 1086 * @note: btstack_type 1 1087 */ 1088 static inline uint8_t hci_event_transport_sleep_mode_get_active(const uint8_t * event){ 1089 return event[2]; 1090 } 1091 1092 /** 1093 * @brief Get field handle from event HCI_EVENT_SCO_CAN_SEND_NOW 1094 * @param event packet 1095 * @param Pointer to storage for handle 1096 * @note: btstack_type B 1097 */ 1098 static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){ 1099 reverse_bytes(&event[2], handle, 6); 1100 } 1101 1102 /** 1103 * @brief Get field status from event L2CAP_EVENT_CHANNEL_OPENED 1104 * @param event packet 1105 * @return status 1106 * @note: btstack_type 1 1107 */ 1108 static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * event){ 1109 return event[2]; 1110 } 1111 /** 1112 * @brief Get field address from event L2CAP_EVENT_CHANNEL_OPENED 1113 * @param event packet 1114 * @param Pointer to storage for address 1115 * @note: btstack_type B 1116 */ 1117 static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1118 reverse_bytes(&event[3], address, 6); 1119 } 1120 /** 1121 * @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED 1122 * @param event packet 1123 * @return handle 1124 * @note: btstack_type H 1125 */ 1126 static inline hci_con_handle_t l2cap_event_channel_opened_get_handle(const uint8_t * event){ 1127 return little_endian_read_16(event, 9); 1128 } 1129 /** 1130 * @brief Get field psm from event L2CAP_EVENT_CHANNEL_OPENED 1131 * @param event packet 1132 * @return psm 1133 * @note: btstack_type 2 1134 */ 1135 static inline uint16_t l2cap_event_channel_opened_get_psm(const uint8_t * event){ 1136 return little_endian_read_16(event, 11); 1137 } 1138 /** 1139 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_OPENED 1140 * @param event packet 1141 * @return local_cid 1142 * @note: btstack_type 2 1143 */ 1144 static inline uint16_t l2cap_event_channel_opened_get_local_cid(const uint8_t * event){ 1145 return little_endian_read_16(event, 13); 1146 } 1147 /** 1148 * @brief Get field remote_cid from event L2CAP_EVENT_CHANNEL_OPENED 1149 * @param event packet 1150 * @return remote_cid 1151 * @note: btstack_type 2 1152 */ 1153 static inline uint16_t l2cap_event_channel_opened_get_remote_cid(const uint8_t * event){ 1154 return little_endian_read_16(event, 15); 1155 } 1156 /** 1157 * @brief Get field local_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1158 * @param event packet 1159 * @return local_mtu 1160 * @note: btstack_type 2 1161 */ 1162 static inline uint16_t l2cap_event_channel_opened_get_local_mtu(const uint8_t * event){ 1163 return little_endian_read_16(event, 17); 1164 } 1165 /** 1166 * @brief Get field remote_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1167 * @param event packet 1168 * @return remote_mtu 1169 * @note: btstack_type 2 1170 */ 1171 static inline uint16_t l2cap_event_channel_opened_get_remote_mtu(const uint8_t * event){ 1172 return little_endian_read_16(event, 19); 1173 } 1174 /** 1175 * @brief Get field flush_timeout from event L2CAP_EVENT_CHANNEL_OPENED 1176 * @param event packet 1177 * @return flush_timeout 1178 * @note: btstack_type 2 1179 */ 1180 static inline uint16_t l2cap_event_channel_opened_get_flush_timeout(const uint8_t * event){ 1181 return little_endian_read_16(event, 21); 1182 } 1183 /** 1184 * @brief Get field incoming from event L2CAP_EVENT_CHANNEL_OPENED 1185 * @param event packet 1186 * @return incoming 1187 * @note: btstack_type 1 1188 */ 1189 static inline uint8_t l2cap_event_channel_opened_get_incoming(const uint8_t * event){ 1190 return event[23]; 1191 } 1192 /** 1193 * @brief Get field mode from event L2CAP_EVENT_CHANNEL_OPENED 1194 * @param event packet 1195 * @return mode 1196 * @note: btstack_type 1 1197 */ 1198 static inline uint8_t l2cap_event_channel_opened_get_mode(const uint8_t * event){ 1199 return event[24]; 1200 } 1201 /** 1202 * @brief Get field fcs from event L2CAP_EVENT_CHANNEL_OPENED 1203 * @param event packet 1204 * @return fcs 1205 * @note: btstack_type 1 1206 */ 1207 static inline uint8_t l2cap_event_channel_opened_get_fcs(const uint8_t * event){ 1208 return event[25]; 1209 } 1210 1211 /** 1212 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED 1213 * @param event packet 1214 * @return local_cid 1215 * @note: btstack_type 2 1216 */ 1217 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){ 1218 return little_endian_read_16(event, 2); 1219 } 1220 1221 /** 1222 * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION 1223 * @param event packet 1224 * @param Pointer to storage for address 1225 * @note: btstack_type B 1226 */ 1227 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1228 reverse_bytes(&event[2], address, 6); 1229 } 1230 /** 1231 * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION 1232 * @param event packet 1233 * @return handle 1234 * @note: btstack_type H 1235 */ 1236 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){ 1237 return little_endian_read_16(event, 8); 1238 } 1239 /** 1240 * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION 1241 * @param event packet 1242 * @return psm 1243 * @note: btstack_type 2 1244 */ 1245 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){ 1246 return little_endian_read_16(event, 10); 1247 } 1248 /** 1249 * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1250 * @param event packet 1251 * @return local_cid 1252 * @note: btstack_type 2 1253 */ 1254 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){ 1255 return little_endian_read_16(event, 12); 1256 } 1257 /** 1258 * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1259 * @param event packet 1260 * @return remote_cid 1261 * @note: btstack_type 2 1262 */ 1263 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){ 1264 return little_endian_read_16(event, 14); 1265 } 1266 1267 /** 1268 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1269 * @param event packet 1270 * @return handle 1271 * @note: btstack_type H 1272 */ 1273 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){ 1274 return little_endian_read_16(event, 2); 1275 } 1276 /** 1277 * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1278 * @param event packet 1279 * @return interval_min 1280 * @note: btstack_type 2 1281 */ 1282 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){ 1283 return little_endian_read_16(event, 4); 1284 } 1285 /** 1286 * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1287 * @param event packet 1288 * @return interval_max 1289 * @note: btstack_type 2 1290 */ 1291 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){ 1292 return little_endian_read_16(event, 6); 1293 } 1294 /** 1295 * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1296 * @param event packet 1297 * @return latencey 1298 * @note: btstack_type 2 1299 */ 1300 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){ 1301 return little_endian_read_16(event, 8); 1302 } 1303 /** 1304 * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1305 * @param event packet 1306 * @return timeout_multiplier 1307 * @note: btstack_type 2 1308 */ 1309 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){ 1310 return little_endian_read_16(event, 10); 1311 } 1312 1313 /** 1314 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1315 * @param event packet 1316 * @return handle 1317 * @note: btstack_type H 1318 */ 1319 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){ 1320 return little_endian_read_16(event, 2); 1321 } 1322 /** 1323 * @brief Get field result from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1324 * @param event packet 1325 * @return result 1326 * @note: btstack_type 2 1327 */ 1328 static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){ 1329 return little_endian_read_16(event, 4); 1330 } 1331 1332 /** 1333 * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW 1334 * @param event packet 1335 * @return local_cid 1336 * @note: btstack_type 2 1337 */ 1338 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){ 1339 return little_endian_read_16(event, 2); 1340 } 1341 1342 /** 1343 * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1344 * @param event packet 1345 * @return address_type 1346 * @note: btstack_type 1 1347 */ 1348 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){ 1349 return event[2]; 1350 } 1351 /** 1352 * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1353 * @param event packet 1354 * @param Pointer to storage for address 1355 * @note: btstack_type B 1356 */ 1357 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1358 reverse_bytes(&event[3], address, 6); 1359 } 1360 /** 1361 * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1362 * @param event packet 1363 * @return handle 1364 * @note: btstack_type H 1365 */ 1366 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){ 1367 return little_endian_read_16(event, 9); 1368 } 1369 /** 1370 * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1371 * @param event packet 1372 * @return psm 1373 * @note: btstack_type 2 1374 */ 1375 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){ 1376 return little_endian_read_16(event, 11); 1377 } 1378 /** 1379 * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1380 * @param event packet 1381 * @return local_cid 1382 * @note: btstack_type 2 1383 */ 1384 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){ 1385 return little_endian_read_16(event, 13); 1386 } 1387 /** 1388 * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1389 * @param event packet 1390 * @return remote_cid 1391 * @note: btstack_type 2 1392 */ 1393 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){ 1394 return little_endian_read_16(event, 15); 1395 } 1396 /** 1397 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1398 * @param event packet 1399 * @return remote_mtu 1400 * @note: btstack_type 2 1401 */ 1402 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){ 1403 return little_endian_read_16(event, 17); 1404 } 1405 1406 /** 1407 * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED 1408 * @param event packet 1409 * @return status 1410 * @note: btstack_type 1 1411 */ 1412 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){ 1413 return event[2]; 1414 } 1415 /** 1416 * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED 1417 * @param event packet 1418 * @return address_type 1419 * @note: btstack_type 1 1420 */ 1421 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){ 1422 return event[3]; 1423 } 1424 /** 1425 * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED 1426 * @param event packet 1427 * @param Pointer to storage for address 1428 * @note: btstack_type B 1429 */ 1430 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1431 reverse_bytes(&event[4], address, 6); 1432 } 1433 /** 1434 * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED 1435 * @param event packet 1436 * @return handle 1437 * @note: btstack_type H 1438 */ 1439 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){ 1440 return little_endian_read_16(event, 10); 1441 } 1442 /** 1443 * @brief Get field incoming from event L2CAP_EVENT_LE_CHANNEL_OPENED 1444 * @param event packet 1445 * @return incoming 1446 * @note: btstack_type 1 1447 */ 1448 static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){ 1449 return event[12]; 1450 } 1451 /** 1452 * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED 1453 * @param event packet 1454 * @return psm 1455 * @note: btstack_type 2 1456 */ 1457 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){ 1458 return little_endian_read_16(event, 13); 1459 } 1460 /** 1461 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1462 * @param event packet 1463 * @return local_cid 1464 * @note: btstack_type 2 1465 */ 1466 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){ 1467 return little_endian_read_16(event, 15); 1468 } 1469 /** 1470 * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1471 * @param event packet 1472 * @return remote_cid 1473 * @note: btstack_type 2 1474 */ 1475 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){ 1476 return little_endian_read_16(event, 17); 1477 } 1478 /** 1479 * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1480 * @param event packet 1481 * @return local_mtu 1482 * @note: btstack_type 2 1483 */ 1484 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){ 1485 return little_endian_read_16(event, 19); 1486 } 1487 /** 1488 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1489 * @param event packet 1490 * @return remote_mtu 1491 * @note: btstack_type 2 1492 */ 1493 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){ 1494 return little_endian_read_16(event, 21); 1495 } 1496 1497 /** 1498 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED 1499 * @param event packet 1500 * @return local_cid 1501 * @note: btstack_type 2 1502 */ 1503 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){ 1504 return little_endian_read_16(event, 2); 1505 } 1506 1507 /** 1508 * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW 1509 * @param event packet 1510 * @return local_cid 1511 * @note: btstack_type 2 1512 */ 1513 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){ 1514 return little_endian_read_16(event, 2); 1515 } 1516 1517 /** 1518 * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT 1519 * @param event packet 1520 * @return local_cid 1521 * @note: btstack_type 2 1522 */ 1523 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){ 1524 return little_endian_read_16(event, 2); 1525 } 1526 1527 /** 1528 * @brief Get field local_cid from event L2CAP_EVENT_ERTM_BUFFER_RELEASED 1529 * @param event packet 1530 * @return local_cid 1531 * @note: btstack_type 2 1532 */ 1533 static inline uint16_t l2cap_event_ertm_buffer_released_get_local_cid(const uint8_t * event){ 1534 return little_endian_read_16(event, 2); 1535 } 1536 1537 /** 1538 * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED 1539 * @param event packet 1540 * @return status 1541 * @note: btstack_type 1 1542 */ 1543 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){ 1544 return event[2]; 1545 } 1546 /** 1547 * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED 1548 * @param event packet 1549 * @param Pointer to storage for bd_addr 1550 * @note: btstack_type B 1551 */ 1552 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1553 reverse_bytes(&event[3], bd_addr, 6); 1554 } 1555 /** 1556 * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED 1557 * @param event packet 1558 * @return con_handle 1559 * @note: btstack_type 2 1560 */ 1561 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){ 1562 return little_endian_read_16(event, 9); 1563 } 1564 /** 1565 * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED 1566 * @param event packet 1567 * @return server_channel 1568 * @note: btstack_type 1 1569 */ 1570 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){ 1571 return event[11]; 1572 } 1573 /** 1574 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED 1575 * @param event packet 1576 * @return rfcomm_cid 1577 * @note: btstack_type 2 1578 */ 1579 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){ 1580 return little_endian_read_16(event, 12); 1581 } 1582 /** 1583 * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED 1584 * @param event packet 1585 * @return max_frame_size 1586 * @note: btstack_type 2 1587 */ 1588 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){ 1589 return little_endian_read_16(event, 14); 1590 } 1591 /** 1592 * @brief Get field incoming from event RFCOMM_EVENT_CHANNEL_OPENED 1593 * @param event packet 1594 * @return incoming 1595 * @note: btstack_type 1 1596 */ 1597 static inline uint8_t rfcomm_event_channel_opened_get_incoming(const uint8_t * event){ 1598 return event[16]; 1599 } 1600 1601 /** 1602 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED 1603 * @param event packet 1604 * @return rfcomm_cid 1605 * @note: btstack_type 2 1606 */ 1607 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){ 1608 return little_endian_read_16(event, 2); 1609 } 1610 1611 /** 1612 * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION 1613 * @param event packet 1614 * @param Pointer to storage for bd_addr 1615 * @note: btstack_type B 1616 */ 1617 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1618 reverse_bytes(&event[2], bd_addr, 6); 1619 } 1620 /** 1621 * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION 1622 * @param event packet 1623 * @return server_channel 1624 * @note: btstack_type 1 1625 */ 1626 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){ 1627 return event[8]; 1628 } 1629 /** 1630 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION 1631 * @param event packet 1632 * @return rfcomm_cid 1633 * @note: btstack_type 2 1634 */ 1635 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){ 1636 return little_endian_read_16(event, 9); 1637 } 1638 1639 /** 1640 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1641 * @param event packet 1642 * @return rfcomm_cid 1643 * @note: btstack_type 2 1644 */ 1645 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){ 1646 return little_endian_read_16(event, 2); 1647 } 1648 /** 1649 * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1650 * @param event packet 1651 * @return line_status 1652 * @note: btstack_type 1 1653 */ 1654 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){ 1655 return event[4]; 1656 } 1657 1658 /** 1659 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1660 * @param event packet 1661 * @return rfcomm_cid 1662 * @note: btstack_type 2 1663 */ 1664 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){ 1665 return little_endian_read_16(event, 2); 1666 } 1667 /** 1668 * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1669 * @param event packet 1670 * @return modem_status 1671 * @note: btstack_type 1 1672 */ 1673 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){ 1674 return event[4]; 1675 } 1676 1677 /** 1678 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW 1679 * @param event packet 1680 * @return rfcomm_cid 1681 * @note: btstack_type 2 1682 */ 1683 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){ 1684 return little_endian_read_16(event, 2); 1685 } 1686 1687 /** 1688 * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE 1689 * @param event packet 1690 * @return status 1691 * @note: btstack_type 1 1692 */ 1693 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){ 1694 return event[2]; 1695 } 1696 1697 /** 1698 * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1699 * @param event packet 1700 * @return rfcomm_channel 1701 * @note: btstack_type 1 1702 */ 1703 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){ 1704 return event[2]; 1705 } 1706 /** 1707 * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1708 * @param event packet 1709 * @return name 1710 * @note: btstack_type T 1711 */ 1712 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){ 1713 return (const char *) &event[3]; 1714 } 1715 1716 /** 1717 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1718 * @param event packet 1719 * @return record_id 1720 * @note: btstack_type 2 1721 */ 1722 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){ 1723 return little_endian_read_16(event, 2); 1724 } 1725 /** 1726 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1727 * @param event packet 1728 * @return attribute_id 1729 * @note: btstack_type 2 1730 */ 1731 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){ 1732 return little_endian_read_16(event, 4); 1733 } 1734 /** 1735 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1736 * @param event packet 1737 * @return attribute_length 1738 * @note: btstack_type 2 1739 */ 1740 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){ 1741 return little_endian_read_16(event, 6); 1742 } 1743 /** 1744 * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1745 * @param event packet 1746 * @return data_offset 1747 * @note: btstack_type 2 1748 */ 1749 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){ 1750 return little_endian_read_16(event, 8); 1751 } 1752 /** 1753 * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1754 * @param event packet 1755 * @return data 1756 * @note: btstack_type 1 1757 */ 1758 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){ 1759 return event[10]; 1760 } 1761 1762 /** 1763 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1764 * @param event packet 1765 * @return record_id 1766 * @note: btstack_type 2 1767 */ 1768 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){ 1769 return little_endian_read_16(event, 2); 1770 } 1771 /** 1772 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1773 * @param event packet 1774 * @return attribute_id 1775 * @note: btstack_type 2 1776 */ 1777 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){ 1778 return little_endian_read_16(event, 4); 1779 } 1780 /** 1781 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1782 * @param event packet 1783 * @return attribute_length 1784 * @note: btstack_type L 1785 */ 1786 static inline uint16_t sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){ 1787 return little_endian_read_16(event, 6); 1788 } 1789 /** 1790 * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1791 * @param event packet 1792 * @return attribute_value 1793 * @note: btstack_type V 1794 */ 1795 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){ 1796 return &event[8]; 1797 } 1798 1799 /** 1800 * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1801 * @param event packet 1802 * @return total_count 1803 * @note: btstack_type 2 1804 */ 1805 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){ 1806 return little_endian_read_16(event, 2); 1807 } 1808 /** 1809 * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1810 * @param event packet 1811 * @return record_index 1812 * @note: btstack_type 2 1813 */ 1814 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){ 1815 return little_endian_read_16(event, 4); 1816 } 1817 /** 1818 * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1819 * @param event packet 1820 * @return record_handle 1821 * @note: btstack_type 4 1822 */ 1823 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){ 1824 return little_endian_read_32(event, 6); 1825 } 1826 1827 #ifdef ENABLE_BLE 1828 /** 1829 * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE 1830 * @param event packet 1831 * @return handle 1832 * @note: btstack_type H 1833 */ 1834 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){ 1835 return little_endian_read_16(event, 2); 1836 } 1837 /** 1838 * @brief Get field att_status from event GATT_EVENT_QUERY_COMPLETE 1839 * @param event packet 1840 * @return att_status 1841 * @note: btstack_type 1 1842 */ 1843 static inline uint8_t gatt_event_query_complete_get_att_status(const uint8_t * event){ 1844 return event[4]; 1845 } 1846 #endif 1847 1848 #ifdef ENABLE_BLE 1849 /** 1850 * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT 1851 * @param event packet 1852 * @return handle 1853 * @note: btstack_type H 1854 */ 1855 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){ 1856 return little_endian_read_16(event, 2); 1857 } 1858 /** 1859 * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT 1860 * @param event packet 1861 * @param Pointer to storage for service 1862 * @note: btstack_type X 1863 */ 1864 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 1865 gatt_client_deserialize_service(event, 4, service); 1866 } 1867 #endif 1868 1869 #ifdef ENABLE_BLE 1870 /** 1871 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1872 * @param event packet 1873 * @return handle 1874 * @note: btstack_type H 1875 */ 1876 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){ 1877 return little_endian_read_16(event, 2); 1878 } 1879 /** 1880 * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1881 * @param event packet 1882 * @param Pointer to storage for characteristic 1883 * @note: btstack_type Y 1884 */ 1885 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){ 1886 gatt_client_deserialize_characteristic(event, 4, characteristic); 1887 } 1888 #endif 1889 1890 #ifdef ENABLE_BLE 1891 /** 1892 * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1893 * @param event packet 1894 * @return handle 1895 * @note: btstack_type H 1896 */ 1897 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){ 1898 return little_endian_read_16(event, 2); 1899 } 1900 /** 1901 * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1902 * @param event packet 1903 * @return include_handle 1904 * @note: btstack_type 2 1905 */ 1906 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){ 1907 return little_endian_read_16(event, 4); 1908 } 1909 /** 1910 * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1911 * @param event packet 1912 * @param Pointer to storage for service 1913 * @note: btstack_type X 1914 */ 1915 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 1916 gatt_client_deserialize_service(event, 6, service); 1917 } 1918 #endif 1919 1920 #ifdef ENABLE_BLE 1921 /** 1922 * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 1923 * @param event packet 1924 * @return handle 1925 * @note: btstack_type H 1926 */ 1927 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){ 1928 return little_endian_read_16(event, 2); 1929 } 1930 /** 1931 * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 1932 * @param event packet 1933 * @param Pointer to storage for characteristic_descriptor 1934 * @note: btstack_type Z 1935 */ 1936 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){ 1937 gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor); 1938 } 1939 #endif 1940 1941 #ifdef ENABLE_BLE 1942 /** 1943 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1944 * @param event packet 1945 * @return handle 1946 * @note: btstack_type H 1947 */ 1948 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){ 1949 return little_endian_read_16(event, 2); 1950 } 1951 /** 1952 * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1953 * @param event packet 1954 * @return value_handle 1955 * @note: btstack_type 2 1956 */ 1957 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 1958 return little_endian_read_16(event, 4); 1959 } 1960 /** 1961 * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1962 * @param event packet 1963 * @return value_length 1964 * @note: btstack_type L 1965 */ 1966 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){ 1967 return little_endian_read_16(event, 6); 1968 } 1969 /** 1970 * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1971 * @param event packet 1972 * @return value 1973 * @note: btstack_type V 1974 */ 1975 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){ 1976 return &event[8]; 1977 } 1978 #endif 1979 1980 #ifdef ENABLE_BLE 1981 /** 1982 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1983 * @param event packet 1984 * @return handle 1985 * @note: btstack_type H 1986 */ 1987 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){ 1988 return little_endian_read_16(event, 2); 1989 } 1990 /** 1991 * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1992 * @param event packet 1993 * @return value_handle 1994 * @note: btstack_type 2 1995 */ 1996 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 1997 return little_endian_read_16(event, 4); 1998 } 1999 /** 2000 * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2001 * @param event packet 2002 * @return value_offset 2003 * @note: btstack_type 2 2004 */ 2005 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){ 2006 return little_endian_read_16(event, 6); 2007 } 2008 /** 2009 * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2010 * @param event packet 2011 * @return value_length 2012 * @note: btstack_type L 2013 */ 2014 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){ 2015 return little_endian_read_16(event, 8); 2016 } 2017 /** 2018 * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 2019 * @param event packet 2020 * @return value 2021 * @note: btstack_type V 2022 */ 2023 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){ 2024 return &event[10]; 2025 } 2026 #endif 2027 2028 #ifdef ENABLE_BLE 2029 /** 2030 * @brief Get field handle from event GATT_EVENT_NOTIFICATION 2031 * @param event packet 2032 * @return handle 2033 * @note: btstack_type H 2034 */ 2035 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){ 2036 return little_endian_read_16(event, 2); 2037 } 2038 /** 2039 * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION 2040 * @param event packet 2041 * @return value_handle 2042 * @note: btstack_type 2 2043 */ 2044 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){ 2045 return little_endian_read_16(event, 4); 2046 } 2047 /** 2048 * @brief Get field value_length from event GATT_EVENT_NOTIFICATION 2049 * @param event packet 2050 * @return value_length 2051 * @note: btstack_type L 2052 */ 2053 static inline uint16_t gatt_event_notification_get_value_length(const uint8_t * event){ 2054 return little_endian_read_16(event, 6); 2055 } 2056 /** 2057 * @brief Get field value from event GATT_EVENT_NOTIFICATION 2058 * @param event packet 2059 * @return value 2060 * @note: btstack_type V 2061 */ 2062 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){ 2063 return &event[8]; 2064 } 2065 #endif 2066 2067 #ifdef ENABLE_BLE 2068 /** 2069 * @brief Get field handle from event GATT_EVENT_INDICATION 2070 * @param event packet 2071 * @return handle 2072 * @note: btstack_type H 2073 */ 2074 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){ 2075 return little_endian_read_16(event, 2); 2076 } 2077 /** 2078 * @brief Get field value_handle from event GATT_EVENT_INDICATION 2079 * @param event packet 2080 * @return value_handle 2081 * @note: btstack_type 2 2082 */ 2083 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){ 2084 return little_endian_read_16(event, 4); 2085 } 2086 /** 2087 * @brief Get field value_length from event GATT_EVENT_INDICATION 2088 * @param event packet 2089 * @return value_length 2090 * @note: btstack_type L 2091 */ 2092 static inline uint16_t gatt_event_indication_get_value_length(const uint8_t * event){ 2093 return little_endian_read_16(event, 6); 2094 } 2095 /** 2096 * @brief Get field value from event GATT_EVENT_INDICATION 2097 * @param event packet 2098 * @return value 2099 * @note: btstack_type V 2100 */ 2101 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){ 2102 return &event[8]; 2103 } 2104 #endif 2105 2106 #ifdef ENABLE_BLE 2107 /** 2108 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2109 * @param event packet 2110 * @return handle 2111 * @note: btstack_type H 2112 */ 2113 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2114 return little_endian_read_16(event, 2); 2115 } 2116 /** 2117 * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2118 * @param event packet 2119 * @return descriptor_handle 2120 * @note: btstack_type 2 2121 */ 2122 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){ 2123 return little_endian_read_16(event, 4); 2124 } 2125 /** 2126 * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2127 * @param event packet 2128 * @return descriptor_length 2129 * @note: btstack_type L 2130 */ 2131 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2132 return little_endian_read_16(event, 6); 2133 } 2134 /** 2135 * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2136 * @param event packet 2137 * @return descriptor 2138 * @note: btstack_type V 2139 */ 2140 static inline const uint8_t * gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2141 return &event[8]; 2142 } 2143 #endif 2144 2145 #ifdef ENABLE_BLE 2146 /** 2147 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2148 * @param event packet 2149 * @return handle 2150 * @note: btstack_type H 2151 */ 2152 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2153 return little_endian_read_16(event, 2); 2154 } 2155 /** 2156 * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2157 * @param event packet 2158 * @return descriptor_offset 2159 * @note: btstack_type 2 2160 */ 2161 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){ 2162 return little_endian_read_16(event, 4); 2163 } 2164 /** 2165 * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2166 * @param event packet 2167 * @return descriptor_length 2168 * @note: btstack_type L 2169 */ 2170 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2171 return little_endian_read_16(event, 6); 2172 } 2173 /** 2174 * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2175 * @param event packet 2176 * @return descriptor 2177 * @note: btstack_type V 2178 */ 2179 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2180 return &event[8]; 2181 } 2182 #endif 2183 2184 #ifdef ENABLE_BLE 2185 /** 2186 * @brief Get field handle from event GATT_EVENT_MTU 2187 * @param event packet 2188 * @return handle 2189 * @note: btstack_type H 2190 */ 2191 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){ 2192 return little_endian_read_16(event, 2); 2193 } 2194 /** 2195 * @brief Get field MTU from event GATT_EVENT_MTU 2196 * @param event packet 2197 * @return MTU 2198 * @note: btstack_type 2 2199 */ 2200 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){ 2201 return little_endian_read_16(event, 4); 2202 } 2203 #endif 2204 2205 #ifdef ENABLE_BLE 2206 /** 2207 * @brief Get field handle from event GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE 2208 * @param event packet 2209 * @return handle 2210 * @note: btstack_type H 2211 */ 2212 static inline hci_con_handle_t gatt_event_can_write_without_response_get_handle(const uint8_t * event){ 2213 return little_endian_read_16(event, 2); 2214 } 2215 #endif 2216 2217 /** 2218 * @brief Get field address_type from event ATT_EVENT_CONNECTED 2219 * @param event packet 2220 * @return address_type 2221 * @note: btstack_type 1 2222 */ 2223 static inline uint8_t att_event_connected_get_address_type(const uint8_t * event){ 2224 return event[2]; 2225 } 2226 /** 2227 * @brief Get field address from event ATT_EVENT_CONNECTED 2228 * @param event packet 2229 * @param Pointer to storage for address 2230 * @note: btstack_type B 2231 */ 2232 static inline void att_event_connected_get_address(const uint8_t * event, bd_addr_t address){ 2233 reverse_bytes(&event[3], address, 6); 2234 } 2235 /** 2236 * @brief Get field handle from event ATT_EVENT_CONNECTED 2237 * @param event packet 2238 * @return handle 2239 * @note: btstack_type H 2240 */ 2241 static inline hci_con_handle_t att_event_connected_get_handle(const uint8_t * event){ 2242 return little_endian_read_16(event, 9); 2243 } 2244 2245 /** 2246 * @brief Get field handle from event ATT_EVENT_DISCONNECTED 2247 * @param event packet 2248 * @return handle 2249 * @note: btstack_type H 2250 */ 2251 static inline hci_con_handle_t att_event_disconnected_get_handle(const uint8_t * event){ 2252 return little_endian_read_16(event, 2); 2253 } 2254 2255 /** 2256 * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2257 * @param event packet 2258 * @return handle 2259 * @note: btstack_type H 2260 */ 2261 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){ 2262 return little_endian_read_16(event, 2); 2263 } 2264 /** 2265 * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2266 * @param event packet 2267 * @return MTU 2268 * @note: btstack_type 2 2269 */ 2270 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){ 2271 return little_endian_read_16(event, 4); 2272 } 2273 2274 /** 2275 * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2276 * @param event packet 2277 * @return status 2278 * @note: btstack_type 1 2279 */ 2280 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){ 2281 return event[2]; 2282 } 2283 /** 2284 * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2285 * @param event packet 2286 * @return conn_handle 2287 * @note: btstack_type H 2288 */ 2289 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){ 2290 return little_endian_read_16(event, 3); 2291 } 2292 /** 2293 * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2294 * @param event packet 2295 * @return attribute_handle 2296 * @note: btstack_type 2 2297 */ 2298 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){ 2299 return little_endian_read_16(event, 5); 2300 } 2301 2302 2303 /** 2304 * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED 2305 * @param event packet 2306 * @return status 2307 * @note: btstack_type 1 2308 */ 2309 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){ 2310 return event[2]; 2311 } 2312 /** 2313 * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED 2314 * @param event packet 2315 * @return service_uuid 2316 * @note: btstack_type 2 2317 */ 2318 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){ 2319 return little_endian_read_16(event, 3); 2320 } 2321 2322 /** 2323 * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED 2324 * @param event packet 2325 * @return status 2326 * @note: btstack_type 1 2327 */ 2328 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){ 2329 return event[2]; 2330 } 2331 /** 2332 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED 2333 * @param event packet 2334 * @return bnep_cid 2335 * @note: btstack_type 2 2336 */ 2337 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){ 2338 return little_endian_read_16(event, 3); 2339 } 2340 /** 2341 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED 2342 * @param event packet 2343 * @return source_uuid 2344 * @note: btstack_type 2 2345 */ 2346 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){ 2347 return little_endian_read_16(event, 5); 2348 } 2349 /** 2350 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED 2351 * @param event packet 2352 * @return destination_uuid 2353 * @note: btstack_type 2 2354 */ 2355 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){ 2356 return little_endian_read_16(event, 7); 2357 } 2358 /** 2359 * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED 2360 * @param event packet 2361 * @return mtu 2362 * @note: btstack_type 2 2363 */ 2364 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){ 2365 return little_endian_read_16(event, 9); 2366 } 2367 /** 2368 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED 2369 * @param event packet 2370 * @param Pointer to storage for remote_address 2371 * @note: btstack_type B 2372 */ 2373 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2374 reverse_bytes(&event[11], remote_address, 6); 2375 } 2376 /** 2377 * @brief Get field con_handle from event BNEP_EVENT_CHANNEL_OPENED 2378 * @param event packet 2379 * @return con_handle 2380 * @note: btstack_type H 2381 */ 2382 static inline hci_con_handle_t bnep_event_channel_opened_get_con_handle(const uint8_t * event){ 2383 return little_endian_read_16(event, 17); 2384 } 2385 2386 /** 2387 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED 2388 * @param event packet 2389 * @return bnep_cid 2390 * @note: btstack_type 2 2391 */ 2392 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){ 2393 return little_endian_read_16(event, 2); 2394 } 2395 /** 2396 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2397 * @param event packet 2398 * @return source_uuid 2399 * @note: btstack_type 2 2400 */ 2401 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){ 2402 return little_endian_read_16(event, 4); 2403 } 2404 /** 2405 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2406 * @param event packet 2407 * @return destination_uuid 2408 * @note: btstack_type 2 2409 */ 2410 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){ 2411 return little_endian_read_16(event, 6); 2412 } 2413 /** 2414 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED 2415 * @param event packet 2416 * @param Pointer to storage for remote_address 2417 * @note: btstack_type B 2418 */ 2419 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2420 reverse_bytes(&event[8], remote_address, 6); 2421 } 2422 2423 /** 2424 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT 2425 * @param event packet 2426 * @return bnep_cid 2427 * @note: btstack_type 2 2428 */ 2429 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){ 2430 return little_endian_read_16(event, 2); 2431 } 2432 /** 2433 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2434 * @param event packet 2435 * @return source_uuid 2436 * @note: btstack_type 2 2437 */ 2438 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){ 2439 return little_endian_read_16(event, 4); 2440 } 2441 /** 2442 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2443 * @param event packet 2444 * @return destination_uuid 2445 * @note: btstack_type 2 2446 */ 2447 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){ 2448 return little_endian_read_16(event, 6); 2449 } 2450 /** 2451 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT 2452 * @param event packet 2453 * @param Pointer to storage for remote_address 2454 * @note: btstack_type B 2455 */ 2456 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2457 reverse_bytes(&event[8], remote_address, 6); 2458 } 2459 /** 2460 * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT 2461 * @param event packet 2462 * @return channel_state 2463 * @note: btstack_type 1 2464 */ 2465 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){ 2466 return event[14]; 2467 } 2468 2469 /** 2470 * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW 2471 * @param event packet 2472 * @return bnep_cid 2473 * @note: btstack_type 2 2474 */ 2475 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){ 2476 return little_endian_read_16(event, 2); 2477 } 2478 /** 2479 * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW 2480 * @param event packet 2481 * @return source_uuid 2482 * @note: btstack_type 2 2483 */ 2484 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){ 2485 return little_endian_read_16(event, 4); 2486 } 2487 /** 2488 * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW 2489 * @param event packet 2490 * @return destination_uuid 2491 * @note: btstack_type 2 2492 */ 2493 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){ 2494 return little_endian_read_16(event, 6); 2495 } 2496 /** 2497 * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW 2498 * @param event packet 2499 * @param Pointer to storage for remote_address 2500 * @note: btstack_type B 2501 */ 2502 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2503 reverse_bytes(&event[8], remote_address, 6); 2504 } 2505 2506 #ifdef ENABLE_BLE 2507 /** 2508 * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST 2509 * @param event packet 2510 * @return handle 2511 * @note: btstack_type H 2512 */ 2513 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){ 2514 return little_endian_read_16(event, 2); 2515 } 2516 /** 2517 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST 2518 * @param event packet 2519 * @return addr_type 2520 * @note: btstack_type 1 2521 */ 2522 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){ 2523 return event[4]; 2524 } 2525 /** 2526 * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST 2527 * @param event packet 2528 * @param Pointer to storage for address 2529 * @note: btstack_type B 2530 */ 2531 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){ 2532 reverse_bytes(&event[5], address, 6); 2533 } 2534 #endif 2535 2536 #ifdef ENABLE_BLE 2537 /** 2538 * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL 2539 * @param event packet 2540 * @return handle 2541 * @note: btstack_type H 2542 */ 2543 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){ 2544 return little_endian_read_16(event, 2); 2545 } 2546 /** 2547 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL 2548 * @param event packet 2549 * @return addr_type 2550 * @note: btstack_type 1 2551 */ 2552 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){ 2553 return event[4]; 2554 } 2555 /** 2556 * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL 2557 * @param event packet 2558 * @param Pointer to storage for address 2559 * @note: btstack_type B 2560 */ 2561 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2562 reverse_bytes(&event[5], address, 6); 2563 } 2564 #endif 2565 2566 #ifdef ENABLE_BLE 2567 /** 2568 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2569 * @param event packet 2570 * @return handle 2571 * @note: btstack_type H 2572 */ 2573 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){ 2574 return little_endian_read_16(event, 2); 2575 } 2576 /** 2577 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2578 * @param event packet 2579 * @return addr_type 2580 * @note: btstack_type 1 2581 */ 2582 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){ 2583 return event[4]; 2584 } 2585 /** 2586 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2587 * @param event packet 2588 * @param Pointer to storage for address 2589 * @note: btstack_type B 2590 */ 2591 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){ 2592 reverse_bytes(&event[5], address, 6); 2593 } 2594 /** 2595 * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2596 * @param event packet 2597 * @return passkey 2598 * @note: btstack_type 4 2599 */ 2600 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){ 2601 return little_endian_read_32(event, 11); 2602 } 2603 #endif 2604 2605 #ifdef ENABLE_BLE 2606 /** 2607 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2608 * @param event packet 2609 * @return handle 2610 * @note: btstack_type H 2611 */ 2612 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){ 2613 return little_endian_read_16(event, 2); 2614 } 2615 /** 2616 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2617 * @param event packet 2618 * @return addr_type 2619 * @note: btstack_type 1 2620 */ 2621 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){ 2622 return event[4]; 2623 } 2624 /** 2625 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2626 * @param event packet 2627 * @param Pointer to storage for address 2628 * @note: btstack_type B 2629 */ 2630 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2631 reverse_bytes(&event[5], address, 6); 2632 } 2633 #endif 2634 2635 #ifdef ENABLE_BLE 2636 /** 2637 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER 2638 * @param event packet 2639 * @return handle 2640 * @note: btstack_type H 2641 */ 2642 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){ 2643 return little_endian_read_16(event, 2); 2644 } 2645 /** 2646 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER 2647 * @param event packet 2648 * @return addr_type 2649 * @note: btstack_type 1 2650 */ 2651 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){ 2652 return event[4]; 2653 } 2654 /** 2655 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER 2656 * @param event packet 2657 * @param Pointer to storage for address 2658 * @note: btstack_type B 2659 */ 2660 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){ 2661 reverse_bytes(&event[5], address, 6); 2662 } 2663 #endif 2664 2665 #ifdef ENABLE_BLE 2666 /** 2667 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL 2668 * @param event packet 2669 * @return handle 2670 * @note: btstack_type H 2671 */ 2672 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){ 2673 return little_endian_read_16(event, 2); 2674 } 2675 /** 2676 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL 2677 * @param event packet 2678 * @return addr_type 2679 * @note: btstack_type 1 2680 */ 2681 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){ 2682 return event[4]; 2683 } 2684 /** 2685 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL 2686 * @param event packet 2687 * @param Pointer to storage for address 2688 * @note: btstack_type B 2689 */ 2690 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2691 reverse_bytes(&event[5], address, 6); 2692 } 2693 #endif 2694 2695 #ifdef ENABLE_BLE 2696 /** 2697 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2698 * @param event packet 2699 * @return handle 2700 * @note: btstack_type H 2701 */ 2702 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){ 2703 return little_endian_read_16(event, 2); 2704 } 2705 /** 2706 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2707 * @param event packet 2708 * @return addr_type 2709 * @note: btstack_type 1 2710 */ 2711 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){ 2712 return event[4]; 2713 } 2714 /** 2715 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2716 * @param event packet 2717 * @param Pointer to storage for address 2718 * @note: btstack_type B 2719 */ 2720 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){ 2721 reverse_bytes(&event[5], address, 6); 2722 } 2723 /** 2724 * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2725 * @param event packet 2726 * @return passkey 2727 * @note: btstack_type 4 2728 */ 2729 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){ 2730 return little_endian_read_32(event, 11); 2731 } 2732 #endif 2733 2734 #ifdef ENABLE_BLE 2735 /** 2736 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2737 * @param event packet 2738 * @return handle 2739 * @note: btstack_type H 2740 */ 2741 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){ 2742 return little_endian_read_16(event, 2); 2743 } 2744 /** 2745 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2746 * @param event packet 2747 * @return addr_type 2748 * @note: btstack_type 1 2749 */ 2750 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){ 2751 return event[4]; 2752 } 2753 /** 2754 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2755 * @param event packet 2756 * @param Pointer to storage for address 2757 * @note: btstack_type B 2758 */ 2759 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2760 reverse_bytes(&event[5], address, 6); 2761 } 2762 #endif 2763 2764 #ifdef ENABLE_BLE 2765 /** 2766 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2767 * @param event packet 2768 * @return handle 2769 * @note: btstack_type H 2770 */ 2771 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){ 2772 return little_endian_read_16(event, 2); 2773 } 2774 /** 2775 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2776 * @param event packet 2777 * @return addr_type 2778 * @note: btstack_type 1 2779 */ 2780 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){ 2781 return event[4]; 2782 } 2783 /** 2784 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2785 * @param event packet 2786 * @param Pointer to storage for address 2787 * @note: btstack_type B 2788 */ 2789 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){ 2790 reverse_bytes(&event[5], address, 6); 2791 } 2792 #endif 2793 2794 #ifdef ENABLE_BLE 2795 /** 2796 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2797 * @param event packet 2798 * @return handle 2799 * @note: btstack_type H 2800 */ 2801 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){ 2802 return little_endian_read_16(event, 2); 2803 } 2804 /** 2805 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2806 * @param event packet 2807 * @return addr_type 2808 * @note: btstack_type 1 2809 */ 2810 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){ 2811 return event[4]; 2812 } 2813 /** 2814 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2815 * @param event packet 2816 * @param Pointer to storage for address 2817 * @note: btstack_type B 2818 */ 2819 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){ 2820 reverse_bytes(&event[5], address, 6); 2821 } 2822 #endif 2823 2824 #ifdef ENABLE_BLE 2825 /** 2826 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2827 * @param event packet 2828 * @return handle 2829 * @note: btstack_type H 2830 */ 2831 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){ 2832 return little_endian_read_16(event, 2); 2833 } 2834 /** 2835 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2836 * @param event packet 2837 * @return addr_type 2838 * @note: btstack_type 1 2839 */ 2840 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){ 2841 return event[4]; 2842 } 2843 /** 2844 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2845 * @param event packet 2846 * @param Pointer to storage for address 2847 * @note: btstack_type B 2848 */ 2849 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){ 2850 reverse_bytes(&event[5], address, 6); 2851 } 2852 /** 2853 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2854 * @param event packet 2855 * @return identity_addr_type 2856 * @note: btstack_type 1 2857 */ 2858 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){ 2859 return event[11]; 2860 } 2861 /** 2862 * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2863 * @param event packet 2864 * @param Pointer to storage for identity_address 2865 * @note: btstack_type B 2866 */ 2867 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2868 reverse_bytes(&event[12], identity_address, 6); 2869 } 2870 /** 2871 * @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2872 * @param event packet 2873 * @return index 2874 * @note: btstack_type 2 2875 */ 2876 static inline uint16_t sm_event_identity_resolving_succeeded_get_index(const uint8_t * event){ 2877 return little_endian_read_16(event, 18); 2878 } 2879 #endif 2880 2881 #ifdef ENABLE_BLE 2882 /** 2883 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST 2884 * @param event packet 2885 * @return handle 2886 * @note: btstack_type H 2887 */ 2888 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){ 2889 return little_endian_read_16(event, 2); 2890 } 2891 /** 2892 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST 2893 * @param event packet 2894 * @return addr_type 2895 * @note: btstack_type 1 2896 */ 2897 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){ 2898 return event[4]; 2899 } 2900 /** 2901 * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST 2902 * @param event packet 2903 * @param Pointer to storage for address 2904 * @note: btstack_type B 2905 */ 2906 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){ 2907 reverse_bytes(&event[5], address, 6); 2908 } 2909 #endif 2910 2911 #ifdef ENABLE_BLE 2912 /** 2913 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT 2914 * @param event packet 2915 * @return handle 2916 * @note: btstack_type H 2917 */ 2918 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){ 2919 return little_endian_read_16(event, 2); 2920 } 2921 /** 2922 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT 2923 * @param event packet 2924 * @return addr_type 2925 * @note: btstack_type 1 2926 */ 2927 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){ 2928 return event[4]; 2929 } 2930 /** 2931 * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT 2932 * @param event packet 2933 * @param Pointer to storage for address 2934 * @note: btstack_type B 2935 */ 2936 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){ 2937 reverse_bytes(&event[5], address, 6); 2938 } 2939 /** 2940 * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT 2941 * @param event packet 2942 * @return authorization_result 2943 * @note: btstack_type 1 2944 */ 2945 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){ 2946 return event[11]; 2947 } 2948 #endif 2949 2950 #ifdef ENABLE_BLE 2951 /** 2952 * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION 2953 * @param event packet 2954 * @return handle 2955 * @note: btstack_type H 2956 */ 2957 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){ 2958 return little_endian_read_16(event, 2); 2959 } 2960 /** 2961 * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION 2962 * @param event packet 2963 * @return action 2964 * @note: btstack_type 1 2965 */ 2966 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){ 2967 return event[4]; 2968 } 2969 #endif 2970 2971 #ifdef ENABLE_BLE 2972 /** 2973 * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED 2974 * @param event packet 2975 * @return handle 2976 * @note: btstack_type H 2977 */ 2978 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){ 2979 return little_endian_read_16(event, 2); 2980 } 2981 /** 2982 * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED 2983 * @param event packet 2984 * @return addr_type 2985 * @note: btstack_type 1 2986 */ 2987 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){ 2988 return event[4]; 2989 } 2990 /** 2991 * @brief Get field address from event SM_EVENT_IDENTITY_CREATED 2992 * @param event packet 2993 * @param Pointer to storage for address 2994 * @note: btstack_type B 2995 */ 2996 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){ 2997 reverse_bytes(&event[5], address, 6); 2998 } 2999 /** 3000 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED 3001 * @param event packet 3002 * @return identity_addr_type 3003 * @note: btstack_type 1 3004 */ 3005 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){ 3006 return event[11]; 3007 } 3008 /** 3009 * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED 3010 * @param event packet 3011 * @param Pointer to storage for identity_address 3012 * @note: btstack_type B 3013 */ 3014 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 3015 reverse_bytes(&event[12], identity_address, 6); 3016 } 3017 /** 3018 * @brief Get field index from event SM_EVENT_IDENTITY_CREATED 3019 * @param event packet 3020 * @return index 3021 * @note: btstack_type 2 3022 */ 3023 static inline uint16_t sm_event_identity_created_get_index(const uint8_t * event){ 3024 return little_endian_read_16(event, 18); 3025 } 3026 #endif 3027 3028 #ifdef ENABLE_BLE 3029 /** 3030 * @brief Get field handle from event SM_EVENT_PAIRING_COMPLETE 3031 * @param event packet 3032 * @return handle 3033 * @note: btstack_type H 3034 */ 3035 static inline hci_con_handle_t sm_event_pairing_complete_get_handle(const uint8_t * event){ 3036 return little_endian_read_16(event, 2); 3037 } 3038 /** 3039 * @brief Get field addr_type from event SM_EVENT_PAIRING_COMPLETE 3040 * @param event packet 3041 * @return addr_type 3042 * @note: btstack_type 1 3043 */ 3044 static inline uint8_t sm_event_pairing_complete_get_addr_type(const uint8_t * event){ 3045 return event[4]; 3046 } 3047 /** 3048 * @brief Get field address from event SM_EVENT_PAIRING_COMPLETE 3049 * @param event packet 3050 * @param Pointer to storage for address 3051 * @note: btstack_type B 3052 */ 3053 static inline void sm_event_pairing_complete_get_address(const uint8_t * event, bd_addr_t address){ 3054 reverse_bytes(&event[5], address, 6); 3055 } 3056 /** 3057 * @brief Get field status from event SM_EVENT_PAIRING_COMPLETE 3058 * @param event packet 3059 * @return status 3060 * @note: btstack_type 1 3061 */ 3062 static inline uint8_t sm_event_pairing_complete_get_status(const uint8_t * event){ 3063 return event[11]; 3064 } 3065 /** 3066 * @brief Get field reason from event SM_EVENT_PAIRING_COMPLETE 3067 * @param event packet 3068 * @return reason 3069 * @note: btstack_type 1 3070 */ 3071 static inline uint8_t sm_event_pairing_complete_get_reason(const uint8_t * event){ 3072 return event[12]; 3073 } 3074 #endif 3075 3076 /** 3077 * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL 3078 * @param event packet 3079 * @return handle 3080 * @note: btstack_type H 3081 */ 3082 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){ 3083 return little_endian_read_16(event, 2); 3084 } 3085 /** 3086 * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL 3087 * @param event packet 3088 * @return security_level 3089 * @note: btstack_type 1 3090 */ 3091 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){ 3092 return event[4]; 3093 } 3094 3095 /** 3096 * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 3097 * @param event packet 3098 * @return status 3099 * @note: btstack_type 1 3100 */ 3101 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){ 3102 return event[2]; 3103 } 3104 /** 3105 * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 3106 * @param event packet 3107 * @param Pointer to storage for address 3108 * @note: btstack_type B 3109 */ 3110 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){ 3111 reverse_bytes(&event[3], address, 6); 3112 } 3113 3114 /** 3115 * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT 3116 * @param event packet 3117 * @return advertising_event_type 3118 * @note: btstack_type 1 3119 */ 3120 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){ 3121 return event[2]; 3122 } 3123 /** 3124 * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT 3125 * @param event packet 3126 * @return address_type 3127 * @note: btstack_type 1 3128 */ 3129 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){ 3130 return event[3]; 3131 } 3132 /** 3133 * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT 3134 * @param event packet 3135 * @param Pointer to storage for address 3136 * @note: btstack_type B 3137 */ 3138 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){ 3139 reverse_bytes(&event[4], address, 6); 3140 } 3141 /** 3142 * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT 3143 * @param event packet 3144 * @return rssi 3145 * @note: btstack_type 1 3146 */ 3147 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){ 3148 return event[10]; 3149 } 3150 /** 3151 * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT 3152 * @param event packet 3153 * @return data_length 3154 * @note: btstack_type J 3155 */ 3156 static inline uint8_t gap_event_advertising_report_get_data_length(const uint8_t * event){ 3157 return event[11]; 3158 } 3159 /** 3160 * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT 3161 * @param event packet 3162 * @return data 3163 * @note: btstack_type V 3164 */ 3165 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){ 3166 return &event[12]; 3167 } 3168 3169 /** 3170 * @brief Get field bd_addr from event GAP_EVENT_INQUIRY_RESULT 3171 * @param event packet 3172 * @param Pointer to storage for bd_addr 3173 * @note: btstack_type B 3174 */ 3175 static inline void gap_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3176 reverse_bytes(&event[2], bd_addr, 6); 3177 } 3178 /** 3179 * @brief Get field page_scan_repetition_mode from event GAP_EVENT_INQUIRY_RESULT 3180 * @param event packet 3181 * @return page_scan_repetition_mode 3182 * @note: btstack_type 1 3183 */ 3184 static inline uint8_t gap_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 3185 return event[8]; 3186 } 3187 /** 3188 * @brief Get field class_of_device from event GAP_EVENT_INQUIRY_RESULT 3189 * @param event packet 3190 * @return class_of_device 3191 * @note: btstack_type 3 3192 */ 3193 static inline uint32_t gap_event_inquiry_result_get_class_of_device(const uint8_t * event){ 3194 return little_endian_read_24(event, 9); 3195 } 3196 /** 3197 * @brief Get field clock_offset from event GAP_EVENT_INQUIRY_RESULT 3198 * @param event packet 3199 * @return clock_offset 3200 * @note: btstack_type 2 3201 */ 3202 static inline uint16_t gap_event_inquiry_result_get_clock_offset(const uint8_t * event){ 3203 return little_endian_read_16(event, 12); 3204 } 3205 /** 3206 * @brief Get field rssi_available from event GAP_EVENT_INQUIRY_RESULT 3207 * @param event packet 3208 * @return rssi_available 3209 * @note: btstack_type 1 3210 */ 3211 static inline uint8_t gap_event_inquiry_result_get_rssi_available(const uint8_t * event){ 3212 return event[14]; 3213 } 3214 /** 3215 * @brief Get field rssi from event GAP_EVENT_INQUIRY_RESULT 3216 * @param event packet 3217 * @return rssi 3218 * @note: btstack_type 1 3219 */ 3220 static inline uint8_t gap_event_inquiry_result_get_rssi(const uint8_t * event){ 3221 return event[15]; 3222 } 3223 /** 3224 * @brief Get field name_available from event GAP_EVENT_INQUIRY_RESULT 3225 * @param event packet 3226 * @return name_available 3227 * @note: btstack_type 1 3228 */ 3229 static inline uint8_t gap_event_inquiry_result_get_name_available(const uint8_t * event){ 3230 return event[16]; 3231 } 3232 /** 3233 * @brief Get field name_len from event GAP_EVENT_INQUIRY_RESULT 3234 * @param event packet 3235 * @return name_len 3236 * @note: btstack_type J 3237 */ 3238 static inline uint8_t gap_event_inquiry_result_get_name_len(const uint8_t * event){ 3239 return event[17]; 3240 } 3241 /** 3242 * @brief Get field name from event GAP_EVENT_INQUIRY_RESULT 3243 * @param event packet 3244 * @return name 3245 * @note: btstack_type V 3246 */ 3247 static inline const uint8_t * gap_event_inquiry_result_get_name(const uint8_t * event){ 3248 return &event[18]; 3249 } 3250 3251 /** 3252 * @brief Get field status from event GAP_EVENT_INQUIRY_COMPLETE 3253 * @param event packet 3254 * @return status 3255 * @note: btstack_type 1 3256 */ 3257 static inline uint8_t gap_event_inquiry_complete_get_status(const uint8_t * event){ 3258 return event[2]; 3259 } 3260 3261 /** 3262 * @brief Get field con_handle from event GAP_EVENT_RSSI_MEASUREMENT 3263 * @param event packet 3264 * @return con_handle 3265 * @note: btstack_type H 3266 */ 3267 static inline hci_con_handle_t gap_event_rssi_measurement_get_con_handle(const uint8_t * event){ 3268 return little_endian_read_16(event, 2); 3269 } 3270 /** 3271 * @brief Get field rssi from event GAP_EVENT_RSSI_MEASUREMENT 3272 * @param event packet 3273 * @return rssi 3274 * @note: btstack_type 1 3275 */ 3276 static inline uint8_t gap_event_rssi_measurement_get_rssi(const uint8_t * event){ 3277 return event[4]; 3278 } 3279 3280 /** 3281 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3282 * @param event packet 3283 * @return status 3284 * @note: btstack_type 1 3285 */ 3286 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){ 3287 return event[3]; 3288 } 3289 /** 3290 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3291 * @param event packet 3292 * @return connection_handle 3293 * @note: btstack_type H 3294 */ 3295 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){ 3296 return little_endian_read_16(event, 4); 3297 } 3298 /** 3299 * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3300 * @param event packet 3301 * @return role 3302 * @note: btstack_type 1 3303 */ 3304 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){ 3305 return event[6]; 3306 } 3307 /** 3308 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3309 * @param event packet 3310 * @return peer_address_type 3311 * @note: btstack_type 1 3312 */ 3313 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){ 3314 return event[7]; 3315 } 3316 /** 3317 * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3318 * @param event packet 3319 * @param Pointer to storage for peer_address 3320 * @note: btstack_type B 3321 */ 3322 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){ 3323 reverse_bytes(&event[8], peer_address, 6); 3324 } 3325 /** 3326 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3327 * @param event packet 3328 * @return conn_interval 3329 * @note: btstack_type 2 3330 */ 3331 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){ 3332 return little_endian_read_16(event, 14); 3333 } 3334 /** 3335 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3336 * @param event packet 3337 * @return conn_latency 3338 * @note: btstack_type 2 3339 */ 3340 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){ 3341 return little_endian_read_16(event, 16); 3342 } 3343 /** 3344 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3345 * @param event packet 3346 * @return supervision_timeout 3347 * @note: btstack_type 2 3348 */ 3349 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){ 3350 return little_endian_read_16(event, 18); 3351 } 3352 /** 3353 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3354 * @param event packet 3355 * @return master_clock_accuracy 3356 * @note: btstack_type 1 3357 */ 3358 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3359 return event[20]; 3360 } 3361 3362 /** 3363 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3364 * @param event packet 3365 * @return status 3366 * @note: btstack_type 1 3367 */ 3368 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){ 3369 return event[3]; 3370 } 3371 /** 3372 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3373 * @param event packet 3374 * @return connection_handle 3375 * @note: btstack_type H 3376 */ 3377 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){ 3378 return little_endian_read_16(event, 4); 3379 } 3380 /** 3381 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3382 * @param event packet 3383 * @return conn_interval 3384 * @note: btstack_type 2 3385 */ 3386 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){ 3387 return little_endian_read_16(event, 6); 3388 } 3389 /** 3390 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3391 * @param event packet 3392 * @return conn_latency 3393 * @note: btstack_type 2 3394 */ 3395 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){ 3396 return little_endian_read_16(event, 8); 3397 } 3398 /** 3399 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3400 * @param event packet 3401 * @return supervision_timeout 3402 * @note: btstack_type 2 3403 */ 3404 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){ 3405 return little_endian_read_16(event, 10); 3406 } 3407 3408 /** 3409 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3410 * @param event packet 3411 * @return connection_handle 3412 * @note: btstack_type H 3413 */ 3414 static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){ 3415 return little_endian_read_16(event, 3); 3416 } 3417 /** 3418 * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3419 * @param event packet 3420 * @return random_number 3421 * @note: btstack_type D 3422 */ 3423 static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){ 3424 return (const uint8_t *) &event[5]; 3425 } 3426 /** 3427 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3428 * @param event packet 3429 * @return encryption_diversifier 3430 * @note: btstack_type 2 3431 */ 3432 static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){ 3433 return little_endian_read_16(event, 13); 3434 } 3435 3436 /** 3437 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3438 * @param event packet 3439 * @return connection_handle 3440 * @note: btstack_type H 3441 */ 3442 static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){ 3443 return little_endian_read_16(event, 3); 3444 } 3445 /** 3446 * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3447 * @param event packet 3448 * @return random_number 3449 * @note: btstack_type D 3450 */ 3451 static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){ 3452 return (const uint8_t *) &event[5]; 3453 } 3454 /** 3455 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3456 * @param event packet 3457 * @return encryption_diversifier 3458 * @note: btstack_type 2 3459 */ 3460 static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){ 3461 return little_endian_read_16(event, 13); 3462 } 3463 3464 /** 3465 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3466 * @param event packet 3467 * @return connection_handle 3468 * @note: btstack_type H 3469 */ 3470 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){ 3471 return little_endian_read_16(event, 3); 3472 } 3473 /** 3474 * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3475 * @param event packet 3476 * @return interval_min 3477 * @note: btstack_type 2 3478 */ 3479 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){ 3480 return little_endian_read_16(event, 5); 3481 } 3482 /** 3483 * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3484 * @param event packet 3485 * @return interval_max 3486 * @note: btstack_type 2 3487 */ 3488 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){ 3489 return little_endian_read_16(event, 7); 3490 } 3491 /** 3492 * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3493 * @param event packet 3494 * @return latency 3495 * @note: btstack_type 2 3496 */ 3497 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){ 3498 return little_endian_read_16(event, 9); 3499 } 3500 /** 3501 * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3502 * @param event packet 3503 * @return timeout 3504 * @note: btstack_type 2 3505 */ 3506 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){ 3507 return little_endian_read_16(event, 11); 3508 } 3509 3510 /** 3511 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3512 * @param event packet 3513 * @return connection_handle 3514 * @note: btstack_type H 3515 */ 3516 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){ 3517 return little_endian_read_16(event, 3); 3518 } 3519 /** 3520 * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3521 * @param event packet 3522 * @return max_tx_octets 3523 * @note: btstack_type 2 3524 */ 3525 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){ 3526 return little_endian_read_16(event, 5); 3527 } 3528 /** 3529 * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3530 * @param event packet 3531 * @return max_tx_time 3532 * @note: btstack_type 2 3533 */ 3534 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){ 3535 return little_endian_read_16(event, 7); 3536 } 3537 /** 3538 * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3539 * @param event packet 3540 * @return max_rx_octets 3541 * @note: btstack_type 2 3542 */ 3543 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){ 3544 return little_endian_read_16(event, 9); 3545 } 3546 /** 3547 * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3548 * @param event packet 3549 * @return max_rx_time 3550 * @note: btstack_type 2 3551 */ 3552 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){ 3553 return little_endian_read_16(event, 11); 3554 } 3555 3556 /** 3557 * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3558 * @param event packet 3559 * @return status 3560 * @note: btstack_type 1 3561 */ 3562 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){ 3563 return event[3]; 3564 } 3565 /** 3566 * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3567 * @param event packet 3568 * @param Pointer to storage for dhkey_x 3569 * @note: btstack_type Q 3570 */ 3571 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){ 3572 reverse_bytes(&event[4], dhkey_x, 32); 3573 } 3574 /** 3575 * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3576 * @param event packet 3577 * @param Pointer to storage for dhkey_y 3578 * @note: btstack_type Q 3579 */ 3580 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){ 3581 reverse_bytes(&event[36], dhkey_y, 32); 3582 } 3583 3584 /** 3585 * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3586 * @param event packet 3587 * @return status 3588 * @note: btstack_type 1 3589 */ 3590 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){ 3591 return event[3]; 3592 } 3593 /** 3594 * @brief Get field dhkey from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3595 * @param event packet 3596 * @param Pointer to storage for dhkey 3597 * @note: btstack_type Q 3598 */ 3599 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey(const uint8_t * event, uint8_t * dhkey){ 3600 reverse_bytes(&event[4], dhkey, 32); 3601 } 3602 3603 /** 3604 * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3605 * @param event packet 3606 * @return status 3607 * @note: btstack_type 1 3608 */ 3609 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){ 3610 return event[3]; 3611 } 3612 /** 3613 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3614 * @param event packet 3615 * @return connection_handle 3616 * @note: btstack_type H 3617 */ 3618 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){ 3619 return little_endian_read_16(event, 4); 3620 } 3621 /** 3622 * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3623 * @param event packet 3624 * @return role 3625 * @note: btstack_type 1 3626 */ 3627 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){ 3628 return event[6]; 3629 } 3630 /** 3631 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3632 * @param event packet 3633 * @return peer_address_type 3634 * @note: btstack_type 1 3635 */ 3636 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){ 3637 return event[7]; 3638 } 3639 /** 3640 * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3641 * @param event packet 3642 * @param Pointer to storage for perr_addresss 3643 * @note: btstack_type B 3644 */ 3645 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){ 3646 reverse_bytes(&event[8], perr_addresss, 6); 3647 } 3648 /** 3649 * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3650 * @param event packet 3651 * @param Pointer to storage for local_resolvable_private_addres 3652 * @note: btstack_type B 3653 */ 3654 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){ 3655 reverse_bytes(&event[14], local_resolvable_private_addres, 6); 3656 } 3657 /** 3658 * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3659 * @param event packet 3660 * @param Pointer to storage for peer_resolvable_private_addres 3661 * @note: btstack_type B 3662 */ 3663 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){ 3664 reverse_bytes(&event[20], peer_resolvable_private_addres, 6); 3665 } 3666 /** 3667 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3668 * @param event packet 3669 * @return conn_interval 3670 * @note: btstack_type 2 3671 */ 3672 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){ 3673 return little_endian_read_16(event, 26); 3674 } 3675 /** 3676 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3677 * @param event packet 3678 * @return conn_latency 3679 * @note: btstack_type 2 3680 */ 3681 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){ 3682 return little_endian_read_16(event, 28); 3683 } 3684 /** 3685 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3686 * @param event packet 3687 * @return supervision_timeout 3688 * @note: btstack_type 2 3689 */ 3690 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){ 3691 return little_endian_read_16(event, 30); 3692 } 3693 /** 3694 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3695 * @param event packet 3696 * @return master_clock_accuracy 3697 * @note: btstack_type 1 3698 */ 3699 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3700 return event[32]; 3701 } 3702 3703 /** 3704 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 3705 * @param event packet 3706 * @return status 3707 * @note: btstack_type 1 3708 */ 3709 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){ 3710 return event[3]; 3711 } 3712 3713 /** 3714 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 3715 * @param event packet 3716 * @return status 3717 * @note: btstack_type 1 3718 */ 3719 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){ 3720 return event[3]; 3721 } 3722 3723 /** 3724 * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3725 * @param event packet 3726 * @return status 3727 * @note: btstack_type 1 3728 */ 3729 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){ 3730 return event[3]; 3731 } 3732 /** 3733 * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3734 * @param event packet 3735 * @return handle 3736 * @note: btstack_type H 3737 */ 3738 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){ 3739 return little_endian_read_16(event, 4); 3740 } 3741 3742 /** 3743 * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 3744 * @param event packet 3745 * @return status 3746 * @note: btstack_type 1 3747 */ 3748 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){ 3749 return event[3]; 3750 } 3751 3752 3753 /** 3754 * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 3755 * @param event packet 3756 * @return gain 3757 * @note: btstack_type 1 3758 */ 3759 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){ 3760 return event[3]; 3761 } 3762 3763 /** 3764 * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 3765 * @param event packet 3766 * @return gain 3767 * @note: btstack_type 1 3768 */ 3769 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){ 3770 return event[3]; 3771 } 3772 3773 /** 3774 * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND 3775 * @param event packet 3776 * @return value_length 3777 * @note: btstack_type J 3778 */ 3779 static inline uint8_t hsp_subevent_hs_command_get_value_length(const uint8_t * event){ 3780 return event[3]; 3781 } 3782 /** 3783 * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND 3784 * @param event packet 3785 * @return value 3786 * @note: btstack_type V 3787 */ 3788 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){ 3789 return &event[4]; 3790 } 3791 3792 /** 3793 * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION 3794 * @param event packet 3795 * @return value_length 3796 * @note: btstack_type J 3797 */ 3798 static inline uint8_t hsp_subevent_ag_indication_get_value_length(const uint8_t * event){ 3799 return event[3]; 3800 } 3801 /** 3802 * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION 3803 * @param event packet 3804 * @return value 3805 * @note: btstack_type V 3806 */ 3807 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){ 3808 return &event[4]; 3809 } 3810 3811 /** 3812 * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3813 * @param event packet 3814 * @return status 3815 * @note: btstack_type 1 3816 */ 3817 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){ 3818 return event[3]; 3819 } 3820 /** 3821 * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3822 * @param event packet 3823 * @return con_handle 3824 * @note: btstack_type H 3825 */ 3826 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){ 3827 return little_endian_read_16(event, 4); 3828 } 3829 /** 3830 * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3831 * @param event packet 3832 * @param Pointer to storage for bd_addr 3833 * @note: btstack_type B 3834 */ 3835 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3836 reverse_bytes(&event[6], bd_addr, 6); 3837 } 3838 3839 3840 /** 3841 * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3842 * @param event packet 3843 * @return status 3844 * @note: btstack_type 1 3845 */ 3846 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ 3847 return event[3]; 3848 } 3849 /** 3850 * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3851 * @param event packet 3852 * @return handle 3853 * @note: btstack_type H 3854 */ 3855 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){ 3856 return little_endian_read_16(event, 4); 3857 } 3858 /** 3859 * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3860 * @param event packet 3861 * @param Pointer to storage for bd_addr 3862 * @note: btstack_type B 3863 */ 3864 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3865 reverse_bytes(&event[6], bd_addr, 6); 3866 } 3867 /** 3868 * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3869 * @param event packet 3870 * @return negotiated_codec 3871 * @note: btstack_type 1 3872 */ 3873 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){ 3874 return event[12]; 3875 } 3876 3877 3878 /** 3879 * @brief Get field status from event HFP_SUBEVENT_COMPLETE 3880 * @param event packet 3881 * @return status 3882 * @note: btstack_type 1 3883 */ 3884 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){ 3885 return event[3]; 3886 } 3887 3888 /** 3889 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3890 * @param event packet 3891 * @return indicator_index 3892 * @note: btstack_type 1 3893 */ 3894 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){ 3895 return event[3]; 3896 } 3897 /** 3898 * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3899 * @param event packet 3900 * @return indicator_status 3901 * @note: btstack_type 1 3902 */ 3903 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){ 3904 return event[4]; 3905 } 3906 /** 3907 * @brief Get field indicator_min_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3908 * @param event packet 3909 * @return indicator_min_range 3910 * @note: btstack_type 1 3911 */ 3912 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_min_range(const uint8_t * event){ 3913 return event[5]; 3914 } 3915 /** 3916 * @brief Get field indicator_max_range from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3917 * @param event packet 3918 * @return indicator_max_range 3919 * @note: btstack_type 1 3920 */ 3921 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_max_range(const uint8_t * event){ 3922 return event[6]; 3923 } 3924 /** 3925 * @brief Get field indicator_mandatory from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3926 * @param event packet 3927 * @return indicator_mandatory 3928 * @note: btstack_type 1 3929 */ 3930 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_mandatory(const uint8_t * event){ 3931 return event[7]; 3932 } 3933 /** 3934 * @brief Get field indicator_enabled from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3935 * @param event packet 3936 * @return indicator_enabled 3937 * @note: btstack_type 1 3938 */ 3939 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_enabled(const uint8_t * event){ 3940 return event[8]; 3941 } 3942 /** 3943 * @brief Get field indicator_status_changed from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3944 * @param event packet 3945 * @return indicator_status_changed 3946 * @note: btstack_type 1 3947 */ 3948 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status_changed(const uint8_t * event){ 3949 return event[9]; 3950 } 3951 /** 3952 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3953 * @param event packet 3954 * @return indicator_name 3955 * @note: btstack_type T 3956 */ 3957 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){ 3958 return (const char *) &event[10]; 3959 } 3960 3961 /** 3962 * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3963 * @param event packet 3964 * @return network_operator_mode 3965 * @note: btstack_type 1 3966 */ 3967 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){ 3968 return event[3]; 3969 } 3970 /** 3971 * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3972 * @param event packet 3973 * @return network_operator_format 3974 * @note: btstack_type 1 3975 */ 3976 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){ 3977 return event[4]; 3978 } 3979 /** 3980 * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3981 * @param event packet 3982 * @return network_operator_name 3983 * @note: btstack_type T 3984 */ 3985 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){ 3986 return (const char *) &event[5]; 3987 } 3988 3989 /** 3990 * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 3991 * @param event packet 3992 * @return error 3993 * @note: btstack_type 1 3994 */ 3995 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){ 3996 return event[3]; 3997 } 3998 3999 4000 4001 4002 /** 4003 * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 4004 * @param event packet 4005 * @return number 4006 * @note: btstack_type T 4007 */ 4008 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){ 4009 return (const char *) &event[3]; 4010 } 4011 4012 4013 /** 4014 * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 4015 * @param event packet 4016 * @return number 4017 * @note: btstack_type T 4018 */ 4019 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){ 4020 return (const char *) &event[3]; 4021 } 4022 4023 /** 4024 * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 4025 * @param event packet 4026 * @return dtmf 4027 * @note: btstack_type T 4028 */ 4029 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){ 4030 return (const char *) &event[3]; 4031 } 4032 4033 4034 4035 4036 /** 4037 * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME 4038 * @param event packet 4039 * @return status 4040 * @note: btstack_type 1 4041 */ 4042 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){ 4043 return event[3]; 4044 } 4045 /** 4046 * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME 4047 * @param event packet 4048 * @return gain 4049 * @note: btstack_type 1 4050 */ 4051 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){ 4052 return event[4]; 4053 } 4054 4055 /** 4056 * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME 4057 * @param event packet 4058 * @return status 4059 * @note: btstack_type 1 4060 */ 4061 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){ 4062 return event[3]; 4063 } 4064 /** 4065 * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME 4066 * @param event packet 4067 * @return gain 4068 * @note: btstack_type 1 4069 */ 4070 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){ 4071 return event[4]; 4072 } 4073 4074 /** 4075 * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4076 * @param event packet 4077 * @return type 4078 * @note: btstack_type 1 4079 */ 4080 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){ 4081 return event[3]; 4082 } 4083 /** 4084 * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 4085 * @param event packet 4086 * @return number 4087 * @note: btstack_type T 4088 */ 4089 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){ 4090 return (const char *) &event[4]; 4091 } 4092 4093 /** 4094 * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4095 * @param event packet 4096 * @return type 4097 * @note: btstack_type 1 4098 */ 4099 static inline uint8_t hfp_subevent_calling_line_identification_notification_get_type(const uint8_t * event){ 4100 return event[3]; 4101 } 4102 /** 4103 * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 4104 * @param event packet 4105 * @return number 4106 * @note: btstack_type T 4107 */ 4108 static inline const char * hfp_subevent_calling_line_identification_notification_get_number(const uint8_t * event){ 4109 return (const char *) &event[4]; 4110 } 4111 4112 /** 4113 * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4114 * @param event packet 4115 * @return clcc_idx 4116 * @note: btstack_type 1 4117 */ 4118 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){ 4119 return event[3]; 4120 } 4121 /** 4122 * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4123 * @param event packet 4124 * @return clcc_dir 4125 * @note: btstack_type 1 4126 */ 4127 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){ 4128 return event[4]; 4129 } 4130 /** 4131 * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4132 * @param event packet 4133 * @return clcc_status 4134 * @note: btstack_type 1 4135 */ 4136 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){ 4137 return event[5]; 4138 } 4139 /** 4140 * @brief Get field clcc_mode from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4141 * @param event packet 4142 * @return clcc_mode 4143 * @note: btstack_type 1 4144 */ 4145 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mode(const uint8_t * event){ 4146 return event[6]; 4147 } 4148 /** 4149 * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4150 * @param event packet 4151 * @return clcc_mpty 4152 * @note: btstack_type 1 4153 */ 4154 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 4155 return event[7]; 4156 } 4157 /** 4158 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4159 * @param event packet 4160 * @return bnip_type 4161 * @note: btstack_type 1 4162 */ 4163 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 4164 return event[8]; 4165 } 4166 /** 4167 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 4168 * @param event packet 4169 * @return bnip_number 4170 * @note: btstack_type T 4171 */ 4172 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 4173 return (const char *) &event[9]; 4174 } 4175 4176 /** 4177 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4178 * @param event packet 4179 * @return status 4180 * @note: btstack_type 1 4181 */ 4182 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 4183 return event[3]; 4184 } 4185 /** 4186 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4187 * @param event packet 4188 * @return bnip_type 4189 * @note: btstack_type 1 4190 */ 4191 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 4192 return event[4]; 4193 } 4194 /** 4195 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 4196 * @param event packet 4197 * @return bnip_number 4198 * @note: btstack_type T 4199 */ 4200 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 4201 return (const char *) &event[5]; 4202 } 4203 4204 /** 4205 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 4206 * @param event packet 4207 * @return value 4208 * @note: btstack_type T 4209 */ 4210 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 4211 return (const char *) &event[3]; 4212 } 4213 4214 #ifdef ENABLE_BLE 4215 /** 4216 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 4217 * @param event packet 4218 * @return handle 4219 * @note: btstack_type H 4220 */ 4221 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 4222 return little_endian_read_16(event, 3); 4223 } 4224 #endif 4225 4226 #ifdef ENABLE_BLE 4227 /** 4228 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4229 * @param event packet 4230 * @return handle 4231 * @note: btstack_type H 4232 */ 4233 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 4234 return little_endian_read_16(event, 3); 4235 } 4236 /** 4237 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4238 * @param event packet 4239 * @return attribute_id 4240 * @note: btstack_type 2 4241 */ 4242 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 4243 return little_endian_read_16(event, 5); 4244 } 4245 /** 4246 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 4247 * @param event packet 4248 * @return text 4249 * @note: btstack_type T 4250 */ 4251 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 4252 return (const char *) &event[7]; 4253 } 4254 #endif 4255 4256 #ifdef ENABLE_BLE 4257 /** 4258 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 4259 * @param event packet 4260 * @return handle 4261 * @note: btstack_type H 4262 */ 4263 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 4264 return little_endian_read_16(event, 3); 4265 } 4266 #endif 4267 4268 /** 4269 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4270 * @param event packet 4271 * @return avdtp_cid 4272 * @note: btstack_type 2 4273 */ 4274 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 4275 return little_endian_read_16(event, 3); 4276 } 4277 /** 4278 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4279 * @param event packet 4280 * @return local_seid 4281 * @note: btstack_type 1 4282 */ 4283 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 4284 return event[5]; 4285 } 4286 /** 4287 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4288 * @param event packet 4289 * @return signal_identifier 4290 * @note: btstack_type 1 4291 */ 4292 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 4293 return event[6]; 4294 } 4295 4296 /** 4297 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4298 * @param event packet 4299 * @return avdtp_cid 4300 * @note: btstack_type 2 4301 */ 4302 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 4303 return little_endian_read_16(event, 3); 4304 } 4305 /** 4306 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4307 * @param event packet 4308 * @return local_seid 4309 * @note: btstack_type 1 4310 */ 4311 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 4312 return event[5]; 4313 } 4314 /** 4315 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 4316 * @param event packet 4317 * @return signal_identifier 4318 * @note: btstack_type 1 4319 */ 4320 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 4321 return event[6]; 4322 } 4323 4324 /** 4325 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4326 * @param event packet 4327 * @return avdtp_cid 4328 * @note: btstack_type 2 4329 */ 4330 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 4331 return little_endian_read_16(event, 3); 4332 } 4333 /** 4334 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4335 * @param event packet 4336 * @return local_seid 4337 * @note: btstack_type 1 4338 */ 4339 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 4340 return event[5]; 4341 } 4342 /** 4343 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4344 * @param event packet 4345 * @return signal_identifier 4346 * @note: btstack_type 1 4347 */ 4348 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 4349 return event[6]; 4350 } 4351 4352 /** 4353 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4354 * @param event packet 4355 * @return avdtp_cid 4356 * @note: btstack_type 2 4357 */ 4358 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 4359 return little_endian_read_16(event, 3); 4360 } 4361 /** 4362 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4363 * @param event packet 4364 * @param Pointer to storage for bd_addr 4365 * @note: btstack_type B 4366 */ 4367 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4368 reverse_bytes(&event[5], bd_addr, 6); 4369 } 4370 /** 4371 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4372 * @param event packet 4373 * @return status 4374 * @note: btstack_type 1 4375 */ 4376 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 4377 return event[11]; 4378 } 4379 4380 /** 4381 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 4382 * @param event packet 4383 * @return avdtp_cid 4384 * @note: btstack_type 2 4385 */ 4386 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 4387 return little_endian_read_16(event, 3); 4388 } 4389 4390 /** 4391 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4392 * @param event packet 4393 * @return avdtp_cid 4394 * @note: btstack_type 2 4395 */ 4396 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 4397 return little_endian_read_16(event, 3); 4398 } 4399 /** 4400 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4401 * @param event packet 4402 * @return remote_seid 4403 * @note: btstack_type 1 4404 */ 4405 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 4406 return event[5]; 4407 } 4408 /** 4409 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4410 * @param event packet 4411 * @return in_use 4412 * @note: btstack_type 1 4413 */ 4414 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 4415 return event[6]; 4416 } 4417 /** 4418 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4419 * @param event packet 4420 * @return media_type 4421 * @note: btstack_type 1 4422 */ 4423 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 4424 return event[7]; 4425 } 4426 /** 4427 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4428 * @param event packet 4429 * @return sep_type 4430 * @note: btstack_type 1 4431 */ 4432 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 4433 return event[8]; 4434 } 4435 4436 /** 4437 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4438 * @param event packet 4439 * @return avdtp_cid 4440 * @note: btstack_type 2 4441 */ 4442 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 4443 return little_endian_read_16(event, 3); 4444 } 4445 /** 4446 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4447 * @param event packet 4448 * @return local_seid 4449 * @note: btstack_type 1 4450 */ 4451 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_local_seid(const uint8_t * event){ 4452 return event[5]; 4453 } 4454 /** 4455 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4456 * @param event packet 4457 * @return remote_seid 4458 * @note: btstack_type 1 4459 */ 4460 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 4461 return event[6]; 4462 } 4463 /** 4464 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4465 * @param event packet 4466 * @return media_type 4467 * @note: btstack_type 1 4468 */ 4469 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 4470 return event[7]; 4471 } 4472 /** 4473 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4474 * @param event packet 4475 * @return sampling_frequency_bitmap 4476 * @note: btstack_type 1 4477 */ 4478 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4479 return event[8]; 4480 } 4481 /** 4482 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4483 * @param event packet 4484 * @return channel_mode_bitmap 4485 * @note: btstack_type 1 4486 */ 4487 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 4488 return event[9]; 4489 } 4490 /** 4491 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4492 * @param event packet 4493 * @return block_length_bitmap 4494 * @note: btstack_type 1 4495 */ 4496 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 4497 return event[10]; 4498 } 4499 /** 4500 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4501 * @param event packet 4502 * @return subbands_bitmap 4503 * @note: btstack_type 1 4504 */ 4505 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 4506 return event[11]; 4507 } 4508 /** 4509 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4510 * @param event packet 4511 * @return allocation_method_bitmap 4512 * @note: btstack_type 1 4513 */ 4514 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 4515 return event[12]; 4516 } 4517 /** 4518 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4519 * @param event packet 4520 * @return min_bitpool_value 4521 * @note: btstack_type 1 4522 */ 4523 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 4524 return event[13]; 4525 } 4526 /** 4527 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4528 * @param event packet 4529 * @return max_bitpool_value 4530 * @note: btstack_type 1 4531 */ 4532 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 4533 return event[14]; 4534 } 4535 4536 /** 4537 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4538 * @param event packet 4539 * @return avdtp_cid 4540 * @note: btstack_type 2 4541 */ 4542 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 4543 return little_endian_read_16(event, 3); 4544 } 4545 /** 4546 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4547 * @param event packet 4548 * @return local_seid 4549 * @note: btstack_type 1 4550 */ 4551 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_local_seid(const uint8_t * event){ 4552 return event[5]; 4553 } 4554 /** 4555 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4556 * @param event packet 4557 * @return remote_seid 4558 * @note: btstack_type 1 4559 */ 4560 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 4561 return event[6]; 4562 } 4563 /** 4564 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4565 * @param event packet 4566 * @return media_type 4567 * @note: btstack_type 1 4568 */ 4569 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 4570 return event[7]; 4571 } 4572 /** 4573 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4574 * @param event packet 4575 * @return media_codec_type 4576 * @note: btstack_type 2 4577 */ 4578 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 4579 return little_endian_read_16(event, 8); 4580 } 4581 /** 4582 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4583 * @param event packet 4584 * @return media_codec_information_len 4585 * @note: btstack_type L 4586 */ 4587 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 4588 return little_endian_read_16(event, 10); 4589 } 4590 /** 4591 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4592 * @param event packet 4593 * @return media_codec_information 4594 * @note: btstack_type V 4595 */ 4596 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 4597 return &event[12]; 4598 } 4599 4600 /** 4601 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4602 * @param event packet 4603 * @return avdtp_cid 4604 * @note: btstack_type 2 4605 */ 4606 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 4607 return little_endian_read_16(event, 3); 4608 } 4609 /** 4610 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4611 * @param event packet 4612 * @return local_seid 4613 * @note: btstack_type 1 4614 */ 4615 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_local_seid(const uint8_t * event){ 4616 return event[5]; 4617 } 4618 /** 4619 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4620 * @param event packet 4621 * @return remote_seid 4622 * @note: btstack_type 1 4623 */ 4624 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 4625 return event[6]; 4626 } 4627 4628 /** 4629 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4630 * @param event packet 4631 * @return avdtp_cid 4632 * @note: btstack_type 2 4633 */ 4634 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4635 return little_endian_read_16(event, 3); 4636 } 4637 /** 4638 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4639 * @param event packet 4640 * @return local_seid 4641 * @note: btstack_type 1 4642 */ 4643 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_local_seid(const uint8_t * event){ 4644 return event[5]; 4645 } 4646 /** 4647 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4648 * @param event packet 4649 * @return remote_seid 4650 * @note: btstack_type 1 4651 */ 4652 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 4653 return event[6]; 4654 } 4655 4656 /** 4657 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4658 * @param event packet 4659 * @return avdtp_cid 4660 * @note: btstack_type 2 4661 */ 4662 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 4663 return little_endian_read_16(event, 3); 4664 } 4665 /** 4666 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4667 * @param event packet 4668 * @return local_seid 4669 * @note: btstack_type 1 4670 */ 4671 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_local_seid(const uint8_t * event){ 4672 return event[5]; 4673 } 4674 /** 4675 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4676 * @param event packet 4677 * @return remote_seid 4678 * @note: btstack_type 1 4679 */ 4680 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 4681 return event[6]; 4682 } 4683 /** 4684 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4685 * @param event packet 4686 * @return recovery_type 4687 * @note: btstack_type 1 4688 */ 4689 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 4690 return event[7]; 4691 } 4692 /** 4693 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4694 * @param event packet 4695 * @return maximum_recovery_window_size 4696 * @note: btstack_type 1 4697 */ 4698 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 4699 return event[8]; 4700 } 4701 /** 4702 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4703 * @param event packet 4704 * @return maximum_number_media_packets 4705 * @note: btstack_type 1 4706 */ 4707 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 4708 return event[9]; 4709 } 4710 4711 /** 4712 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4713 * @param event packet 4714 * @return avdtp_cid 4715 * @note: btstack_type 2 4716 */ 4717 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 4718 return little_endian_read_16(event, 3); 4719 } 4720 /** 4721 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4722 * @param event packet 4723 * @return local_seid 4724 * @note: btstack_type 1 4725 */ 4726 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_local_seid(const uint8_t * event){ 4727 return event[5]; 4728 } 4729 /** 4730 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4731 * @param event packet 4732 * @return remote_seid 4733 * @note: btstack_type 1 4734 */ 4735 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 4736 return event[6]; 4737 } 4738 /** 4739 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4740 * @param event packet 4741 * @return cp_type 4742 * @note: btstack_type 2 4743 */ 4744 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 4745 return little_endian_read_16(event, 7); 4746 } 4747 /** 4748 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4749 * @param event packet 4750 * @return cp_type_value_len 4751 * @note: btstack_type L 4752 */ 4753 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 4754 return little_endian_read_16(event, 9); 4755 } 4756 /** 4757 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4758 * @param event packet 4759 * @return cp_type_value 4760 * @note: btstack_type V 4761 */ 4762 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 4763 return &event[11]; 4764 } 4765 4766 /** 4767 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4768 * @param event packet 4769 * @return avdtp_cid 4770 * @note: btstack_type 2 4771 */ 4772 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 4773 return little_endian_read_16(event, 3); 4774 } 4775 /** 4776 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4777 * @param event packet 4778 * @return local_seid 4779 * @note: btstack_type 1 4780 */ 4781 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_local_seid(const uint8_t * event){ 4782 return event[5]; 4783 } 4784 /** 4785 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4786 * @param event packet 4787 * @return remote_seid 4788 * @note: btstack_type 1 4789 */ 4790 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 4791 return event[6]; 4792 } 4793 /** 4794 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4795 * @param event packet 4796 * @return fragmentation 4797 * @note: btstack_type 1 4798 */ 4799 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 4800 return event[7]; 4801 } 4802 /** 4803 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4804 * @param event packet 4805 * @return transport_identifiers_num 4806 * @note: btstack_type 1 4807 */ 4808 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 4809 return event[8]; 4810 } 4811 /** 4812 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4813 * @param event packet 4814 * @return transport_session_identifier_1 4815 * @note: btstack_type 1 4816 */ 4817 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 4818 return event[9]; 4819 } 4820 /** 4821 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4822 * @param event packet 4823 * @return transport_session_identifier_2 4824 * @note: btstack_type 1 4825 */ 4826 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 4827 return event[10]; 4828 } 4829 /** 4830 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4831 * @param event packet 4832 * @return transport_session_identifier_3 4833 * @note: btstack_type 1 4834 */ 4835 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 4836 return event[11]; 4837 } 4838 /** 4839 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4840 * @param event packet 4841 * @return tcid_1 4842 * @note: btstack_type 1 4843 */ 4844 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 4845 return event[12]; 4846 } 4847 /** 4848 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4849 * @param event packet 4850 * @return tcid_2 4851 * @note: btstack_type 1 4852 */ 4853 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 4854 return event[13]; 4855 } 4856 /** 4857 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4858 * @param event packet 4859 * @return tcid_3 4860 * @note: btstack_type 1 4861 */ 4862 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 4863 return event[14]; 4864 } 4865 4866 /** 4867 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4868 * @param event packet 4869 * @return avdtp_cid 4870 * @note: btstack_type 2 4871 */ 4872 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4873 return little_endian_read_16(event, 3); 4874 } 4875 /** 4876 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4877 * @param event packet 4878 * @return local_seid 4879 * @note: btstack_type 1 4880 */ 4881 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_local_seid(const uint8_t * event){ 4882 return event[5]; 4883 } 4884 /** 4885 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4886 * @param event packet 4887 * @return remote_seid 4888 * @note: btstack_type 1 4889 */ 4890 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 4891 return event[6]; 4892 } 4893 4894 /** 4895 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4896 * @param event packet 4897 * @return avdtp_cid 4898 * @note: btstack_type 2 4899 */ 4900 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 4901 return little_endian_read_16(event, 3); 4902 } 4903 /** 4904 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4905 * @param event packet 4906 * @return local_seid 4907 * @note: btstack_type 1 4908 */ 4909 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_local_seid(const uint8_t * event){ 4910 return event[5]; 4911 } 4912 /** 4913 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4914 * @param event packet 4915 * @return remote_seid 4916 * @note: btstack_type 1 4917 */ 4918 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 4919 return event[6]; 4920 } 4921 /** 4922 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4923 * @param event packet 4924 * @return back_ch 4925 * @note: btstack_type 1 4926 */ 4927 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 4928 return event[7]; 4929 } 4930 /** 4931 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4932 * @param event packet 4933 * @return media 4934 * @note: btstack_type 1 4935 */ 4936 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 4937 return event[8]; 4938 } 4939 /** 4940 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4941 * @param event packet 4942 * @return recovery 4943 * @note: btstack_type 1 4944 */ 4945 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 4946 return event[9]; 4947 } 4948 4949 /** 4950 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4951 * @param event packet 4952 * @return avdtp_cid 4953 * @note: btstack_type 2 4954 */ 4955 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 4956 return little_endian_read_16(event, 3); 4957 } 4958 /** 4959 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4960 * @param event packet 4961 * @return local_seid 4962 * @note: btstack_type 1 4963 */ 4964 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 4965 return event[5]; 4966 } 4967 /** 4968 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4969 * @param event packet 4970 * @return remote_seid 4971 * @note: btstack_type 1 4972 */ 4973 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 4974 return event[6]; 4975 } 4976 /** 4977 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4978 * @param event packet 4979 * @return reconfigure 4980 * @note: btstack_type 1 4981 */ 4982 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 4983 return event[7]; 4984 } 4985 /** 4986 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4987 * @param event packet 4988 * @return media_type 4989 * @note: btstack_type 1 4990 */ 4991 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 4992 return event[8]; 4993 } 4994 /** 4995 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4996 * @param event packet 4997 * @return sampling_frequency 4998 * @note: btstack_type 2 4999 */ 5000 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5001 return little_endian_read_16(event, 9); 5002 } 5003 /** 5004 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5005 * @param event packet 5006 * @return channel_mode 5007 * @note: btstack_type 1 5008 */ 5009 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5010 return event[11]; 5011 } 5012 /** 5013 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5014 * @param event packet 5015 * @return num_channels 5016 * @note: btstack_type 1 5017 */ 5018 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5019 return event[12]; 5020 } 5021 /** 5022 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5023 * @param event packet 5024 * @return block_length 5025 * @note: btstack_type 1 5026 */ 5027 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5028 return event[13]; 5029 } 5030 /** 5031 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5032 * @param event packet 5033 * @return subbands 5034 * @note: btstack_type 1 5035 */ 5036 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5037 return event[14]; 5038 } 5039 /** 5040 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5041 * @param event packet 5042 * @return allocation_method 5043 * @note: btstack_type 1 5044 */ 5045 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5046 return event[15]; 5047 } 5048 /** 5049 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5050 * @param event packet 5051 * @return min_bitpool_value 5052 * @note: btstack_type 1 5053 */ 5054 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5055 return event[16]; 5056 } 5057 /** 5058 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5059 * @param event packet 5060 * @return max_bitpool_value 5061 * @note: btstack_type 1 5062 */ 5063 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5064 return event[17]; 5065 } 5066 5067 /** 5068 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5069 * @param event packet 5070 * @return avdtp_cid 5071 * @note: btstack_type 2 5072 */ 5073 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 5074 return little_endian_read_16(event, 3); 5075 } 5076 /** 5077 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5078 * @param event packet 5079 * @return local_seid 5080 * @note: btstack_type 1 5081 */ 5082 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 5083 return event[5]; 5084 } 5085 /** 5086 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5087 * @param event packet 5088 * @return remote_seid 5089 * @note: btstack_type 1 5090 */ 5091 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 5092 return event[6]; 5093 } 5094 /** 5095 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5096 * @param event packet 5097 * @return reconfigure 5098 * @note: btstack_type 1 5099 */ 5100 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5101 return event[7]; 5102 } 5103 /** 5104 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5105 * @param event packet 5106 * @return media_type 5107 * @note: btstack_type 1 5108 */ 5109 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5110 return event[8]; 5111 } 5112 /** 5113 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5114 * @param event packet 5115 * @return media_codec_type 5116 * @note: btstack_type 2 5117 */ 5118 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5119 return little_endian_read_16(event, 9); 5120 } 5121 /** 5122 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5123 * @param event packet 5124 * @return media_codec_information_len 5125 * @note: btstack_type L 5126 */ 5127 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5128 return little_endian_read_16(event, 11); 5129 } 5130 /** 5131 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5132 * @param event packet 5133 * @return media_codec_information 5134 * @note: btstack_type V 5135 */ 5136 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5137 return &event[13]; 5138 } 5139 5140 /** 5141 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5142 * @param event packet 5143 * @return avdtp_cid 5144 * @note: btstack_type 2 5145 */ 5146 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 5147 return little_endian_read_16(event, 3); 5148 } 5149 /** 5150 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5151 * @param event packet 5152 * @param Pointer to storage for bd_addr 5153 * @note: btstack_type B 5154 */ 5155 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5156 reverse_bytes(&event[5], bd_addr, 6); 5157 } 5158 /** 5159 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5160 * @param event packet 5161 * @return local_seid 5162 * @note: btstack_type 1 5163 */ 5164 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 5165 return event[11]; 5166 } 5167 /** 5168 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5169 * @param event packet 5170 * @return remote_seid 5171 * @note: btstack_type 1 5172 */ 5173 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 5174 return event[12]; 5175 } 5176 /** 5177 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 5178 * @param event packet 5179 * @return status 5180 * @note: btstack_type 1 5181 */ 5182 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 5183 return event[13]; 5184 } 5185 5186 /** 5187 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5188 * @param event packet 5189 * @return avdtp_cid 5190 * @note: btstack_type 2 5191 */ 5192 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 5193 return little_endian_read_16(event, 3); 5194 } 5195 /** 5196 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 5197 * @param event packet 5198 * @return local_seid 5199 * @note: btstack_type 1 5200 */ 5201 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 5202 return event[5]; 5203 } 5204 5205 /** 5206 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5207 * @param event packet 5208 * @return avdtp_cid 5209 * @note: btstack_type 2 5210 */ 5211 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 5212 return little_endian_read_16(event, 3); 5213 } 5214 /** 5215 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5216 * @param event packet 5217 * @return local_seid 5218 * @note: btstack_type 1 5219 */ 5220 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5221 return event[5]; 5222 } 5223 /** 5224 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5225 * @param event packet 5226 * @return sequence_number 5227 * @note: btstack_type 2 5228 */ 5229 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 5230 return little_endian_read_16(event, 6); 5231 } 5232 5233 /** 5234 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5235 * @param event packet 5236 * @return avdtp_cid 5237 * @note: btstack_type 2 5238 */ 5239 static inline uint16_t avdtp_subevent_signaling_capabilities_done_get_avdtp_cid(const uint8_t * event){ 5240 return little_endian_read_16(event, 3); 5241 } 5242 /** 5243 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5244 * @param event packet 5245 * @return local_seid 5246 * @note: btstack_type 1 5247 */ 5248 static inline uint8_t avdtp_subevent_signaling_capabilities_done_get_local_seid(const uint8_t * event){ 5249 return event[5]; 5250 } 5251 /** 5252 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5253 * @param event packet 5254 * @return remote_seid 5255 * @note: btstack_type 1 5256 */ 5257 static inline uint8_t avdtp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 5258 return event[6]; 5259 } 5260 5261 /** 5262 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE 5263 * @param event packet 5264 * @return avdtp_cid 5265 * @note: btstack_type 2 5266 */ 5267 static inline uint16_t avdtp_subevent_signaling_sep_dicovery_done_get_avdtp_cid(const uint8_t * event){ 5268 return little_endian_read_16(event, 3); 5269 } 5270 5271 /** 5272 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5273 * @param event packet 5274 * @return avdtp_cid 5275 * @note: btstack_type 2 5276 */ 5277 static inline uint16_t avdtp_subevent_signaling_delay_report_get_avdtp_cid(const uint8_t * event){ 5278 return little_endian_read_16(event, 3); 5279 } 5280 /** 5281 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5282 * @param event packet 5283 * @return local_seid 5284 * @note: btstack_type 1 5285 */ 5286 static inline uint8_t avdtp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 5287 return event[5]; 5288 } 5289 /** 5290 * @brief Get field delay_100us from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORT 5291 * @param event packet 5292 * @return delay_100us 5293 * @note: btstack_type 2 5294 */ 5295 static inline uint16_t avdtp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 5296 return little_endian_read_16(event, 6); 5297 } 5298 5299 /** 5300 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5301 * @param event packet 5302 * @return a2dp_cid 5303 * @note: btstack_type 2 5304 */ 5305 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 5306 return little_endian_read_16(event, 3); 5307 } 5308 /** 5309 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 5310 * @param event packet 5311 * @return local_seid 5312 * @note: btstack_type 1 5313 */ 5314 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 5315 return event[5]; 5316 } 5317 5318 /** 5319 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5320 * @param event packet 5321 * @return a2dp_cid 5322 * @note: btstack_type 2 5323 */ 5324 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 5325 return little_endian_read_16(event, 3); 5326 } 5327 /** 5328 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5329 * @param event packet 5330 * @return int_seid 5331 * @note: btstack_type 1 5332 */ 5333 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_int_seid(const uint8_t * event){ 5334 return event[5]; 5335 } 5336 /** 5337 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5338 * @param event packet 5339 * @return acp_seid 5340 * @note: btstack_type 1 5341 */ 5342 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_acp_seid(const uint8_t * event){ 5343 return event[6]; 5344 } 5345 /** 5346 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5347 * @param event packet 5348 * @return reconfigure 5349 * @note: btstack_type 1 5350 */ 5351 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 5352 return event[7]; 5353 } 5354 /** 5355 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5356 * @param event packet 5357 * @return media_type 5358 * @note: btstack_type 1 5359 */ 5360 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 5361 return event[8]; 5362 } 5363 /** 5364 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5365 * @param event packet 5366 * @return sampling_frequency 5367 * @note: btstack_type 2 5368 */ 5369 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5370 return little_endian_read_16(event, 9); 5371 } 5372 /** 5373 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5374 * @param event packet 5375 * @return channel_mode 5376 * @note: btstack_type 1 5377 */ 5378 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5379 return event[11]; 5380 } 5381 /** 5382 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5383 * @param event packet 5384 * @return num_channels 5385 * @note: btstack_type 1 5386 */ 5387 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5388 return event[12]; 5389 } 5390 /** 5391 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5392 * @param event packet 5393 * @return block_length 5394 * @note: btstack_type 1 5395 */ 5396 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5397 return event[13]; 5398 } 5399 /** 5400 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5401 * @param event packet 5402 * @return subbands 5403 * @note: btstack_type 1 5404 */ 5405 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5406 return event[14]; 5407 } 5408 /** 5409 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5410 * @param event packet 5411 * @return allocation_method 5412 * @note: btstack_type 1 5413 */ 5414 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5415 return event[15]; 5416 } 5417 /** 5418 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5419 * @param event packet 5420 * @return min_bitpool_value 5421 * @note: btstack_type 1 5422 */ 5423 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5424 return event[16]; 5425 } 5426 /** 5427 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5428 * @param event packet 5429 * @return max_bitpool_value 5430 * @note: btstack_type 1 5431 */ 5432 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5433 return event[17]; 5434 } 5435 5436 /** 5437 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5438 * @param event packet 5439 * @return a2dp_cid 5440 * @note: btstack_type 2 5441 */ 5442 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 5443 return little_endian_read_16(event, 3); 5444 } 5445 /** 5446 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5447 * @param event packet 5448 * @return int_seid 5449 * @note: btstack_type 1 5450 */ 5451 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_int_seid(const uint8_t * event){ 5452 return event[5]; 5453 } 5454 /** 5455 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5456 * @param event packet 5457 * @return acp_seid 5458 * @note: btstack_type 1 5459 */ 5460 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_acp_seid(const uint8_t * event){ 5461 return event[6]; 5462 } 5463 /** 5464 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5465 * @param event packet 5466 * @return reconfigure 5467 * @note: btstack_type 1 5468 */ 5469 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5470 return event[7]; 5471 } 5472 /** 5473 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5474 * @param event packet 5475 * @return media_type 5476 * @note: btstack_type 1 5477 */ 5478 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5479 return event[8]; 5480 } 5481 /** 5482 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5483 * @param event packet 5484 * @return media_codec_type 5485 * @note: btstack_type 2 5486 */ 5487 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5488 return little_endian_read_16(event, 9); 5489 } 5490 /** 5491 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5492 * @param event packet 5493 * @return media_codec_information_len 5494 * @note: btstack_type L 5495 */ 5496 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5497 return little_endian_read_16(event, 11); 5498 } 5499 /** 5500 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5501 * @param event packet 5502 * @return media_codec_information 5503 * @note: btstack_type V 5504 */ 5505 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5506 return &event[13]; 5507 } 5508 5509 /** 5510 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5511 * @param event packet 5512 * @return a2dp_cid 5513 * @note: btstack_type 2 5514 */ 5515 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 5516 return little_endian_read_16(event, 3); 5517 } 5518 /** 5519 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5520 * @param event packet 5521 * @param Pointer to storage for bd_addr 5522 * @note: btstack_type B 5523 */ 5524 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5525 reverse_bytes(&event[5], bd_addr, 6); 5526 } 5527 /** 5528 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5529 * @param event packet 5530 * @return local_seid 5531 * @note: btstack_type 1 5532 */ 5533 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 5534 return event[11]; 5535 } 5536 /** 5537 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5538 * @param event packet 5539 * @return remote_seid 5540 * @note: btstack_type 1 5541 */ 5542 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 5543 return event[12]; 5544 } 5545 /** 5546 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5547 * @param event packet 5548 * @return status 5549 * @note: btstack_type 1 5550 */ 5551 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 5552 return event[13]; 5553 } 5554 5555 /** 5556 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 5557 * @param event packet 5558 * @return a2dp_cid 5559 * @note: btstack_type 2 5560 */ 5561 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 5562 return little_endian_read_16(event, 3); 5563 } 5564 /** 5565 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 5566 * @param event packet 5567 * @return local_seid 5568 * @note: btstack_type 1 5569 */ 5570 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 5571 return event[5]; 5572 } 5573 5574 /** 5575 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5576 * @param event packet 5577 * @return a2dp_cid 5578 * @note: btstack_type 2 5579 */ 5580 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 5581 return little_endian_read_16(event, 3); 5582 } 5583 /** 5584 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5585 * @param event packet 5586 * @return local_seid 5587 * @note: btstack_type 1 5588 */ 5589 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 5590 return event[5]; 5591 } 5592 5593 /** 5594 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 5595 * @param event packet 5596 * @return a2dp_cid 5597 * @note: btstack_type 2 5598 */ 5599 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 5600 return little_endian_read_16(event, 3); 5601 } 5602 /** 5603 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 5604 * @param event packet 5605 * @return local_seid 5606 * @note: btstack_type 1 5607 */ 5608 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 5609 return event[5]; 5610 } 5611 5612 /** 5613 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 5614 * @param event packet 5615 * @return a2dp_cid 5616 * @note: btstack_type 2 5617 */ 5618 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 5619 return little_endian_read_16(event, 3); 5620 } 5621 /** 5622 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 5623 * @param event packet 5624 * @return local_seid 5625 * @note: btstack_type 1 5626 */ 5627 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 5628 return event[5]; 5629 } 5630 5631 /** 5632 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5633 * @param event packet 5634 * @return a2dp_cid 5635 * @note: btstack_type 2 5636 */ 5637 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 5638 return little_endian_read_16(event, 3); 5639 } 5640 /** 5641 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5642 * @param event packet 5643 * @return local_seid 5644 * @note: btstack_type 1 5645 */ 5646 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 5647 return event[5]; 5648 } 5649 /** 5650 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5651 * @param event packet 5652 * @return signal_identifier 5653 * @note: btstack_type 1 5654 */ 5655 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 5656 return event[6]; 5657 } 5658 5659 /** 5660 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 5661 * @param event packet 5662 * @return a2dp_cid 5663 * @note: btstack_type 2 5664 */ 5665 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 5666 return little_endian_read_16(event, 3); 5667 } 5668 /** 5669 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 5670 * @param event packet 5671 * @return local_seid 5672 * @note: btstack_type 1 5673 */ 5674 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 5675 return event[5]; 5676 } 5677 /** 5678 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 5679 * @param event packet 5680 * @return signal_identifier 5681 * @note: btstack_type 1 5682 */ 5683 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 5684 return event[6]; 5685 } 5686 5687 /** 5688 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5689 * @param event packet 5690 * @return a2dp_cid 5691 * @note: btstack_type 2 5692 */ 5693 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 5694 return little_endian_read_16(event, 3); 5695 } 5696 /** 5697 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5698 * @param event packet 5699 * @param Pointer to storage for bd_addr 5700 * @note: btstack_type B 5701 */ 5702 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5703 reverse_bytes(&event[5], bd_addr, 6); 5704 } 5705 /** 5706 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5707 * @param event packet 5708 * @return status 5709 * @note: btstack_type 1 5710 */ 5711 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 5712 return event[11]; 5713 } 5714 5715 /** 5716 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 5717 * @param event packet 5718 * @return a2dp_cid 5719 * @note: btstack_type 2 5720 */ 5721 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 5722 return little_endian_read_16(event, 3); 5723 } 5724 5725 /** 5726 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5727 * @param event packet 5728 * @return a2dp_cid 5729 * @note: btstack_type 2 5730 */ 5731 static inline uint16_t a2dp_subevent_stream_reconfigured_get_a2dp_cid(const uint8_t * event){ 5732 return little_endian_read_16(event, 3); 5733 } 5734 /** 5735 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5736 * @param event packet 5737 * @return local_seid 5738 * @note: btstack_type 1 5739 */ 5740 static inline uint8_t a2dp_subevent_stream_reconfigured_get_local_seid(const uint8_t * event){ 5741 return event[5]; 5742 } 5743 /** 5744 * @brief Get field status from event A2DP_SUBEVENT_STREAM_RECONFIGURED 5745 * @param event packet 5746 * @return status 5747 * @note: btstack_type 1 5748 */ 5749 static inline uint8_t a2dp_subevent_stream_reconfigured_get_status(const uint8_t * event){ 5750 return event[6]; 5751 } 5752 5753 /** 5754 * @brief Get field avdtp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 5755 * @param event packet 5756 * @return avdtp_cid 5757 * @note: btstack_type 2 5758 */ 5759 static inline uint16_t a2dp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 5760 return little_endian_read_16(event, 3); 5761 } 5762 /** 5763 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 5764 * @param event packet 5765 * @return local_seid 5766 * @note: btstack_type 1 5767 */ 5768 static inline uint8_t a2dp_subevent_signaling_delay_reporting_capability_get_local_seid(const uint8_t * event){ 5769 return event[5]; 5770 } 5771 /** 5772 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 5773 * @param event packet 5774 * @return remote_seid 5775 * @note: btstack_type 1 5776 */ 5777 static inline uint8_t a2dp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 5778 return event[6]; 5779 } 5780 5781 /** 5782 * @brief Get field avdtp_cid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 5783 * @param event packet 5784 * @return avdtp_cid 5785 * @note: btstack_type 2 5786 */ 5787 static inline uint16_t a2dp_subevent_signaling_delay_report_get_avdtp_cid(const uint8_t * event){ 5788 return little_endian_read_16(event, 3); 5789 } 5790 /** 5791 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 5792 * @param event packet 5793 * @return local_seid 5794 * @note: btstack_type 1 5795 */ 5796 static inline uint8_t a2dp_subevent_signaling_delay_report_get_local_seid(const uint8_t * event){ 5797 return event[5]; 5798 } 5799 /** 5800 * @brief Get field delay_100us from event A2DP_SUBEVENT_SIGNALING_DELAY_REPORT 5801 * @param event packet 5802 * @return delay_100us 5803 * @note: btstack_type 2 5804 */ 5805 static inline uint16_t a2dp_subevent_signaling_delay_report_get_delay_100us(const uint8_t * event){ 5806 return little_endian_read_16(event, 6); 5807 } 5808 5809 /** 5810 * @brief Get field avdtp_cid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5811 * @param event packet 5812 * @return avdtp_cid 5813 * @note: btstack_type 2 5814 */ 5815 static inline uint16_t a2dp_subevent_signaling_capabilities_done_get_avdtp_cid(const uint8_t * event){ 5816 return little_endian_read_16(event, 3); 5817 } 5818 /** 5819 * @brief Get field local_seid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5820 * @param event packet 5821 * @return local_seid 5822 * @note: btstack_type 1 5823 */ 5824 static inline uint8_t a2dp_subevent_signaling_capabilities_done_get_local_seid(const uint8_t * event){ 5825 return event[5]; 5826 } 5827 /** 5828 * @brief Get field remote_seid from event A2DP_SUBEVENT_SIGNALING_CAPABILITIES_DONE 5829 * @param event packet 5830 * @return remote_seid 5831 * @note: btstack_type 1 5832 */ 5833 static inline uint8_t a2dp_subevent_signaling_capabilities_done_get_remote_seid(const uint8_t * event){ 5834 return event[6]; 5835 } 5836 5837 /** 5838 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5839 * @param event packet 5840 * @return status 5841 * @note: btstack_type 1 5842 */ 5843 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 5844 return event[3]; 5845 } 5846 /** 5847 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5848 * @param event packet 5849 * @param Pointer to storage for bd_addr 5850 * @note: btstack_type B 5851 */ 5852 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5853 reverse_bytes(&event[4], bd_addr, 6); 5854 } 5855 /** 5856 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5857 * @param event packet 5858 * @return avrcp_cid 5859 * @note: btstack_type 2 5860 */ 5861 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 5862 return little_endian_read_16(event, 10); 5863 } 5864 5865 /** 5866 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 5867 * @param event packet 5868 * @return avrcp_cid 5869 * @note: btstack_type 2 5870 */ 5871 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 5872 return little_endian_read_16(event, 3); 5873 } 5874 5875 /** 5876 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5877 * @param event packet 5878 * @return avrcp_cid 5879 * @note: btstack_type 2 5880 */ 5881 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 5882 return little_endian_read_16(event, 3); 5883 } 5884 /** 5885 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5886 * @param event packet 5887 * @return command_type 5888 * @note: btstack_type 1 5889 */ 5890 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 5891 return event[5]; 5892 } 5893 /** 5894 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5895 * @param event packet 5896 * @return repeat_mode 5897 * @note: btstack_type 1 5898 */ 5899 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 5900 return event[6]; 5901 } 5902 /** 5903 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5904 * @param event packet 5905 * @return shuffle_mode 5906 * @note: btstack_type 1 5907 */ 5908 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 5909 return event[7]; 5910 } 5911 5912 /** 5913 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 5914 * @param event packet 5915 * @return avrcp_cid 5916 * @note: btstack_type 2 5917 */ 5918 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 5919 return little_endian_read_16(event, 3); 5920 } 5921 /** 5922 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 5923 * @param event packet 5924 * @return command_type 5925 * @note: btstack_type 1 5926 */ 5927 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 5928 return event[5]; 5929 } 5930 /** 5931 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 5932 * @param event packet 5933 * @return song_length 5934 * @note: btstack_type 4 5935 */ 5936 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 5937 return little_endian_read_32(event, 6); 5938 } 5939 /** 5940 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 5941 * @param event packet 5942 * @return song_position 5943 * @note: btstack_type 4 5944 */ 5945 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 5946 return little_endian_read_32(event, 10); 5947 } 5948 /** 5949 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 5950 * @param event packet 5951 * @return play_status 5952 * @note: btstack_type 1 5953 */ 5954 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 5955 return event[14]; 5956 } 5957 5958 /** 5959 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5960 * @param event packet 5961 * @return avrcp_cid 5962 * @note: btstack_type 2 5963 */ 5964 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 5965 return little_endian_read_16(event, 3); 5966 } 5967 /** 5968 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5969 * @param event packet 5970 * @return command_type 5971 * @note: btstack_type 1 5972 */ 5973 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 5974 return event[5]; 5975 } 5976 /** 5977 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5978 * @param event packet 5979 * @return play_status 5980 * @note: btstack_type 1 5981 */ 5982 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 5983 return event[6]; 5984 } 5985 5986 /** 5987 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5988 * @param event packet 5989 * @return avrcp_cid 5990 * @note: btstack_type 2 5991 */ 5992 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 5993 return little_endian_read_16(event, 3); 5994 } 5995 /** 5996 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5997 * @param event packet 5998 * @return command_type 5999 * @note: btstack_type 1 6000 */ 6001 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 6002 return event[5]; 6003 } 6004 6005 /** 6006 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 6007 * @param event packet 6008 * @return avrcp_cid 6009 * @note: btstack_type 2 6010 */ 6011 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 6012 return little_endian_read_16(event, 3); 6013 } 6014 /** 6015 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 6016 * @param event packet 6017 * @return command_type 6018 * @note: btstack_type 1 6019 */ 6020 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 6021 return event[5]; 6022 } 6023 6024 /** 6025 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 6026 * @param event packet 6027 * @return avrcp_cid 6028 * @note: btstack_type 2 6029 */ 6030 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 6031 return little_endian_read_16(event, 3); 6032 } 6033 /** 6034 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 6035 * @param event packet 6036 * @return command_type 6037 * @note: btstack_type 1 6038 */ 6039 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 6040 return event[5]; 6041 } 6042 6043 /** 6044 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 6045 * @param event packet 6046 * @return avrcp_cid 6047 * @note: btstack_type 2 6048 */ 6049 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 6050 return little_endian_read_16(event, 3); 6051 } 6052 /** 6053 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 6054 * @param event packet 6055 * @return command_type 6056 * @note: btstack_type 1 6057 */ 6058 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 6059 return event[5]; 6060 } 6061 /** 6062 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 6063 * @param event packet 6064 * @return absolute_volume 6065 * @note: btstack_type 1 6066 */ 6067 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 6068 return event[6]; 6069 } 6070 6071 /** 6072 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 6073 * @param event packet 6074 * @return avrcp_cid 6075 * @note: btstack_type 2 6076 */ 6077 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 6078 return little_endian_read_16(event, 3); 6079 } 6080 /** 6081 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 6082 * @param event packet 6083 * @return command_type 6084 * @note: btstack_type 1 6085 */ 6086 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 6087 return event[5]; 6088 } 6089 /** 6090 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 6091 * @param event packet 6092 * @return absolute_volume 6093 * @note: btstack_type 1 6094 */ 6095 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 6096 return event[6]; 6097 } 6098 6099 /** 6100 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 6101 * @param event packet 6102 * @return avrcp_cid 6103 * @note: btstack_type 2 6104 */ 6105 static inline uint16_t avrcp_subevent_enable_notification_complete_get_avrcp_cid(const uint8_t * event){ 6106 return little_endian_read_16(event, 3); 6107 } 6108 /** 6109 * @brief Get field command_type from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 6110 * @param event packet 6111 * @return command_type 6112 * @note: btstack_type 1 6113 */ 6114 static inline uint8_t avrcp_subevent_enable_notification_complete_get_command_type(const uint8_t * event){ 6115 return event[5]; 6116 } 6117 /** 6118 * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 6119 * @param event packet 6120 * @return notification_id 6121 * @note: btstack_type 1 6122 */ 6123 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){ 6124 return event[6]; 6125 } 6126 6127 /** 6128 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 6129 * @param event packet 6130 * @return avrcp_cid 6131 * @note: btstack_type 2 6132 */ 6133 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 6134 return little_endian_read_16(event, 3); 6135 } 6136 /** 6137 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 6138 * @param event packet 6139 * @return command_type 6140 * @note: btstack_type 1 6141 */ 6142 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 6143 return event[5]; 6144 } 6145 /** 6146 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 6147 * @param event packet 6148 * @return operation_id 6149 * @note: btstack_type 1 6150 */ 6151 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 6152 return event[6]; 6153 } 6154 6155 /** 6156 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 6157 * @param event packet 6158 * @return avrcp_cid 6159 * @note: btstack_type 2 6160 */ 6161 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 6162 return little_endian_read_16(event, 3); 6163 } 6164 /** 6165 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 6166 * @param event packet 6167 * @return command_type 6168 * @note: btstack_type 1 6169 */ 6170 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 6171 return event[5]; 6172 } 6173 /** 6174 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 6175 * @param event packet 6176 * @return operation_id 6177 * @note: btstack_type 1 6178 */ 6179 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 6180 return event[6]; 6181 } 6182 6183 /** 6184 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 6185 * @param event packet 6186 * @return avrcp_cid 6187 * @note: btstack_type 2 6188 */ 6189 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 6190 return little_endian_read_16(event, 3); 6191 } 6192 /** 6193 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 6194 * @param event packet 6195 * @return command_type 6196 * @note: btstack_type 1 6197 */ 6198 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 6199 return event[5]; 6200 } 6201 6202 /** 6203 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_COMPANY_IDS_QUERY 6204 * @param event packet 6205 * @return avrcp_cid 6206 * @note: btstack_type 2 6207 */ 6208 static inline uint16_t avrcp_subevent_company_ids_query_get_avrcp_cid(const uint8_t * event){ 6209 return little_endian_read_16(event, 3); 6210 } 6211 6212 /** 6213 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_EVENT_IDS_QUERY 6214 * @param event packet 6215 * @return avrcp_cid 6216 * @note: btstack_type 2 6217 */ 6218 static inline uint16_t avrcp_subevent_event_ids_query_get_avrcp_cid(const uint8_t * event){ 6219 return little_endian_read_16(event, 3); 6220 } 6221 6222 /** 6223 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 6224 * @param event packet 6225 * @return avrcp_cid 6226 * @note: btstack_type 2 6227 */ 6228 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 6229 return little_endian_read_16(event, 3); 6230 } 6231 6232 /** 6233 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 6234 * @param event packet 6235 * @return avrcp_cid 6236 * @note: btstack_type 2 6237 */ 6238 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 6239 return little_endian_read_16(event, 3); 6240 } 6241 /** 6242 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 6243 * @param event packet 6244 * @return operation_id 6245 * @note: btstack_type 1 6246 */ 6247 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 6248 return event[5]; 6249 } 6250 /** 6251 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 6252 * @param event packet 6253 * @return operands_length 6254 * @note: btstack_type 1 6255 */ 6256 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 6257 return event[6]; 6258 } 6259 /** 6260 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 6261 * @param event packet 6262 * @return operand 6263 * @note: btstack_type 1 6264 */ 6265 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 6266 return event[7]; 6267 } 6268 6269 /** 6270 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6271 * @param event packet 6272 * @return avrcp_cid 6273 * @note: btstack_type 2 6274 */ 6275 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 6276 return little_endian_read_16(event, 3); 6277 } 6278 /** 6279 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6280 * @param event packet 6281 * @return command_type 6282 * @note: btstack_type 1 6283 */ 6284 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 6285 return event[5]; 6286 } 6287 /** 6288 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 6289 * @param event packet 6290 * @return track 6291 * @note: btstack_type 1 6292 */ 6293 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 6294 return event[6]; 6295 } 6296 6297 /** 6298 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6299 * @param event packet 6300 * @return avrcp_cid 6301 * @note: btstack_type 2 6302 */ 6303 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 6304 return little_endian_read_16(event, 3); 6305 } 6306 /** 6307 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6308 * @param event packet 6309 * @return command_type 6310 * @note: btstack_type 1 6311 */ 6312 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 6313 return event[5]; 6314 } 6315 /** 6316 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 6317 * @param event packet 6318 * @return total_tracks 6319 * @note: btstack_type 1 6320 */ 6321 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 6322 return event[6]; 6323 } 6324 6325 /** 6326 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6327 * @param event packet 6328 * @return avrcp_cid 6329 * @note: btstack_type 2 6330 */ 6331 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 6332 return little_endian_read_16(event, 3); 6333 } 6334 /** 6335 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6336 * @param event packet 6337 * @return command_type 6338 * @note: btstack_type 1 6339 */ 6340 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 6341 return event[5]; 6342 } 6343 /** 6344 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 6345 * @param event packet 6346 * @return song_length 6347 * @note: btstack_type 4 6348 */ 6349 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 6350 return little_endian_read_32(event, 6); 6351 } 6352 6353 /** 6354 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6355 * @param event packet 6356 * @return avrcp_cid 6357 * @note: btstack_type 2 6358 */ 6359 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 6360 return little_endian_read_16(event, 3); 6361 } 6362 /** 6363 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6364 * @param event packet 6365 * @return command_type 6366 * @note: btstack_type 1 6367 */ 6368 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 6369 return event[5]; 6370 } 6371 /** 6372 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6373 * @param event packet 6374 * @return value_len 6375 * @note: btstack_type J 6376 */ 6377 static inline uint8_t avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 6378 return event[6]; 6379 } 6380 /** 6381 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 6382 * @param event packet 6383 * @return value 6384 * @note: btstack_type V 6385 */ 6386 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 6387 return &event[7]; 6388 } 6389 6390 /** 6391 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6392 * @param event packet 6393 * @return avrcp_cid 6394 * @note: btstack_type 2 6395 */ 6396 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 6397 return little_endian_read_16(event, 3); 6398 } 6399 /** 6400 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6401 * @param event packet 6402 * @return command_type 6403 * @note: btstack_type 1 6404 */ 6405 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 6406 return event[5]; 6407 } 6408 /** 6409 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6410 * @param event packet 6411 * @return value_len 6412 * @note: btstack_type J 6413 */ 6414 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 6415 return event[6]; 6416 } 6417 /** 6418 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 6419 * @param event packet 6420 * @return value 6421 * @note: btstack_type V 6422 */ 6423 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 6424 return &event[7]; 6425 } 6426 6427 /** 6428 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6429 * @param event packet 6430 * @return avrcp_cid 6431 * @note: btstack_type 2 6432 */ 6433 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 6434 return little_endian_read_16(event, 3); 6435 } 6436 /** 6437 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6438 * @param event packet 6439 * @return command_type 6440 * @note: btstack_type 1 6441 */ 6442 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 6443 return event[5]; 6444 } 6445 /** 6446 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6447 * @param event packet 6448 * @return value_len 6449 * @note: btstack_type J 6450 */ 6451 static inline uint8_t avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 6452 return event[6]; 6453 } 6454 /** 6455 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6456 * @param event packet 6457 * @return value 6458 * @note: btstack_type V 6459 */ 6460 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 6461 return &event[7]; 6462 } 6463 6464 /** 6465 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6466 * @param event packet 6467 * @return avrcp_cid 6468 * @note: btstack_type 2 6469 */ 6470 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 6471 return little_endian_read_16(event, 3); 6472 } 6473 /** 6474 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6475 * @param event packet 6476 * @return command_type 6477 * @note: btstack_type 1 6478 */ 6479 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 6480 return event[5]; 6481 } 6482 /** 6483 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6484 * @param event packet 6485 * @return value_len 6486 * @note: btstack_type J 6487 */ 6488 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 6489 return event[6]; 6490 } 6491 /** 6492 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6493 * @param event packet 6494 * @return value 6495 * @note: btstack_type V 6496 */ 6497 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 6498 return &event[7]; 6499 } 6500 6501 /** 6502 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6503 * @param event packet 6504 * @return avrcp_cid 6505 * @note: btstack_type 2 6506 */ 6507 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 6508 return little_endian_read_16(event, 3); 6509 } 6510 /** 6511 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6512 * @param event packet 6513 * @return command_type 6514 * @note: btstack_type 1 6515 */ 6516 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 6517 return event[5]; 6518 } 6519 /** 6520 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6521 * @param event packet 6522 * @return status 6523 * @note: btstack_type 1 6524 */ 6525 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 6526 return event[6]; 6527 } 6528 6529 /** 6530 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6531 * @param event packet 6532 * @param Pointer to storage for bd_addr 6533 * @note: btstack_type B 6534 */ 6535 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6536 reverse_bytes(&event[3], bd_addr, 6); 6537 } 6538 /** 6539 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6540 * @param event packet 6541 * @return browsing_cid 6542 * @note: btstack_type 2 6543 */ 6544 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 6545 return little_endian_read_16(event, 9); 6546 } 6547 6548 /** 6549 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6550 * @param event packet 6551 * @return status 6552 * @note: btstack_type 1 6553 */ 6554 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 6555 return event[3]; 6556 } 6557 /** 6558 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6559 * @param event packet 6560 * @param Pointer to storage for bd_addr 6561 * @note: btstack_type B 6562 */ 6563 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6564 reverse_bytes(&event[4], bd_addr, 6); 6565 } 6566 /** 6567 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6568 * @param event packet 6569 * @return browsing_cid 6570 * @note: btstack_type 2 6571 */ 6572 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 6573 return little_endian_read_16(event, 10); 6574 } 6575 6576 /** 6577 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 6578 * @param event packet 6579 * @return browsing_cid 6580 * @note: btstack_type 2 6581 */ 6582 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 6583 return little_endian_read_16(event, 3); 6584 } 6585 6586 /** 6587 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_DONE 6588 * @param event packet 6589 * @return browsing_cid 6590 * @note: btstack_type 2 6591 */ 6592 static inline uint16_t avrcp_subevent_browsing_done_get_browsing_cid(const uint8_t * event){ 6593 return little_endian_read_16(event, 3); 6594 } 6595 /** 6596 * @brief Get field uid_counter from event AVRCP_SUBEVENT_BROWSING_DONE 6597 * @param event packet 6598 * @return uid_counter 6599 * @note: btstack_type 2 6600 */ 6601 static inline uint16_t avrcp_subevent_browsing_done_get_uid_counter(const uint8_t * event){ 6602 return little_endian_read_16(event, 5); 6603 } 6604 /** 6605 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_DONE 6606 * @param event packet 6607 * @return browsing_status 6608 * @note: btstack_type 1 6609 */ 6610 static inline uint8_t avrcp_subevent_browsing_done_get_browsing_status(const uint8_t * event){ 6611 return event[7]; 6612 } 6613 /** 6614 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_DONE 6615 * @param event packet 6616 * @return bluetooth_status 6617 * @note: btstack_type 1 6618 */ 6619 static inline uint8_t avrcp_subevent_browsing_done_get_bluetooth_status(const uint8_t * event){ 6620 return event[8]; 6621 } 6622 6623 /** 6624 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6625 * @param event packet 6626 * @return browsing_cid 6627 * @note: btstack_type 2 6628 */ 6629 static inline uint16_t avrcp_subevent_browsing_get_folder_items_get_browsing_cid(const uint8_t * event){ 6630 return little_endian_read_16(event, 3); 6631 } 6632 /** 6633 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6634 * @param event packet 6635 * @return scope 6636 * @note: btstack_type 1 6637 */ 6638 static inline uint8_t avrcp_subevent_browsing_get_folder_items_get_scope(const uint8_t * event){ 6639 return event[5]; 6640 } 6641 /** 6642 * @brief Get field attr_bitmap from event AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 6643 * @param event packet 6644 * @return attr_bitmap 6645 * @note: btstack_type 4 6646 */ 6647 static inline uint32_t avrcp_subevent_browsing_get_folder_items_get_attr_bitmap(const uint8_t * event){ 6648 return little_endian_read_32(event, 6); 6649 } 6650 6651 /** 6652 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 6653 * @param event packet 6654 * @return browsing_cid 6655 * @note: btstack_type 2 6656 */ 6657 static inline uint16_t avrcp_subevent_browsing_get_total_num_items_get_browsing_cid(const uint8_t * event){ 6658 return little_endian_read_16(event, 3); 6659 } 6660 /** 6661 * @brief Get field scope from event AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 6662 * @param event packet 6663 * @return scope 6664 * @note: btstack_type 1 6665 */ 6666 static inline uint8_t avrcp_subevent_browsing_get_total_num_items_get_scope(const uint8_t * event){ 6667 return event[5]; 6668 } 6669 6670 /** 6671 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6672 * @param event packet 6673 * @return avrcp_cid 6674 * @note: btstack_type 2 6675 */ 6676 static inline uint16_t avrcp_subevent_notification_playback_pos_changed_get_avrcp_cid(const uint8_t * event){ 6677 return little_endian_read_16(event, 3); 6678 } 6679 /** 6680 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6681 * @param event packet 6682 * @return command_type 6683 * @note: btstack_type 1 6684 */ 6685 static inline uint8_t avrcp_subevent_notification_playback_pos_changed_get_command_type(const uint8_t * event){ 6686 return event[5]; 6687 } 6688 /** 6689 * @brief Get field playback_position_ms from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 6690 * @param event packet 6691 * @return playback_position_ms 6692 * @note: btstack_type 4 6693 */ 6694 static inline uint32_t avrcp_subevent_notification_playback_pos_changed_get_playback_position_ms(const uint8_t * event){ 6695 return little_endian_read_32(event, 6); 6696 } 6697 6698 /** 6699 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 6700 * @param event packet 6701 * @return goep_cid 6702 * @note: btstack_type 2 6703 */ 6704 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 6705 return little_endian_read_16(event, 3); 6706 } 6707 /** 6708 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 6709 * @param event packet 6710 * @return status 6711 * @note: btstack_type 1 6712 */ 6713 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 6714 return event[5]; 6715 } 6716 /** 6717 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 6718 * @param event packet 6719 * @param Pointer to storage for bd_addr 6720 * @note: btstack_type B 6721 */ 6722 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6723 reverse_bytes(&event[6], bd_addr, 6); 6724 } 6725 /** 6726 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 6727 * @param event packet 6728 * @return con_handle 6729 * @note: btstack_type H 6730 */ 6731 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6732 return little_endian_read_16(event, 12); 6733 } 6734 /** 6735 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 6736 * @param event packet 6737 * @return incoming 6738 * @note: btstack_type 1 6739 */ 6740 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 6741 return event[14]; 6742 } 6743 6744 /** 6745 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 6746 * @param event packet 6747 * @return goep_cid 6748 * @note: btstack_type 2 6749 */ 6750 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6751 return little_endian_read_16(event, 3); 6752 } 6753 6754 /** 6755 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 6756 * @param event packet 6757 * @return goep_cid 6758 * @note: btstack_type 2 6759 */ 6760 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 6761 return little_endian_read_16(event, 3); 6762 } 6763 6764 /** 6765 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 6766 * @param event packet 6767 * @return pbap_cid 6768 * @note: btstack_type 2 6769 */ 6770 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 6771 return little_endian_read_16(event, 3); 6772 } 6773 /** 6774 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 6775 * @param event packet 6776 * @return status 6777 * @note: btstack_type 1 6778 */ 6779 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 6780 return event[5]; 6781 } 6782 /** 6783 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 6784 * @param event packet 6785 * @param Pointer to storage for bd_addr 6786 * @note: btstack_type B 6787 */ 6788 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6789 reverse_bytes(&event[6], bd_addr, 6); 6790 } 6791 /** 6792 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 6793 * @param event packet 6794 * @return con_handle 6795 * @note: btstack_type H 6796 */ 6797 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6798 return little_endian_read_16(event, 12); 6799 } 6800 /** 6801 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 6802 * @param event packet 6803 * @return incoming 6804 * @note: btstack_type 1 6805 */ 6806 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 6807 return event[14]; 6808 } 6809 6810 /** 6811 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 6812 * @param event packet 6813 * @return goep_cid 6814 * @note: btstack_type 2 6815 */ 6816 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6817 return little_endian_read_16(event, 3); 6818 } 6819 6820 /** 6821 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 6822 * @param event packet 6823 * @return goep_cid 6824 * @note: btstack_type 2 6825 */ 6826 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 6827 return little_endian_read_16(event, 3); 6828 } 6829 /** 6830 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 6831 * @param event packet 6832 * @return status 6833 * @note: btstack_type 1 6834 */ 6835 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 6836 return event[5]; 6837 } 6838 6839 /** 6840 * @brief Get field goep_cid from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6841 * @param event packet 6842 * @return goep_cid 6843 * @note: btstack_type 2 6844 */ 6845 static inline uint16_t pbap_subevent_phonebook_size_get_goep_cid(const uint8_t * event){ 6846 return little_endian_read_16(event, 3); 6847 } 6848 /** 6849 * @brief Get field status from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6850 * @param event packet 6851 * @return status 6852 * @note: btstack_type 1 6853 */ 6854 static inline uint8_t pbap_subevent_phonebook_size_get_status(const uint8_t * event){ 6855 return event[5]; 6856 } 6857 /** 6858 * @brief Get field phoneboook_size from event PBAP_SUBEVENT_PHONEBOOK_SIZE 6859 * @param event packet 6860 * @return phoneboook_size 6861 * @note: btstack_type 2 6862 */ 6863 static inline uint16_t pbap_subevent_phonebook_size_get_phoneboook_size(const uint8_t * event){ 6864 return little_endian_read_16(event, 6); 6865 } 6866 6867 /** 6868 * @brief Get field goep_cid from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6869 * @param event packet 6870 * @return goep_cid 6871 * @note: btstack_type 2 6872 */ 6873 static inline uint16_t pbap_subevent_authentication_request_get_goep_cid(const uint8_t * event){ 6874 return little_endian_read_16(event, 3); 6875 } 6876 /** 6877 * @brief Get field user_id_required from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6878 * @param event packet 6879 * @return user_id_required 6880 * @note: btstack_type 1 6881 */ 6882 static inline uint8_t pbap_subevent_authentication_request_get_user_id_required(const uint8_t * event){ 6883 return event[5]; 6884 } 6885 /** 6886 * @brief Get field full_access from event PBAP_SUBEVENT_AUTHENTICATION_REQUEST 6887 * @param event packet 6888 * @return full_access 6889 * @note: btstack_type 1 6890 */ 6891 static inline uint8_t pbap_subevent_authentication_request_get_full_access(const uint8_t * event){ 6892 return event[6]; 6893 } 6894 6895 /** 6896 * @brief Get field goep_cid from event PBAP_SUBEVENT_CARD_RESULT 6897 * @param event packet 6898 * @return goep_cid 6899 * @note: btstack_type 2 6900 */ 6901 static inline uint16_t pbap_subevent_card_result_get_goep_cid(const uint8_t * event){ 6902 return little_endian_read_16(event, 3); 6903 } 6904 /** 6905 * @brief Get field name_len from event PBAP_SUBEVENT_CARD_RESULT 6906 * @param event packet 6907 * @return name_len 6908 * @note: btstack_type J 6909 */ 6910 static inline uint8_t pbap_subevent_card_result_get_name_len(const uint8_t * event){ 6911 return event[5]; 6912 } 6913 /** 6914 * @brief Get field name from event PBAP_SUBEVENT_CARD_RESULT 6915 * @param event packet 6916 * @return name 6917 * @note: btstack_type V 6918 */ 6919 static inline const uint8_t * pbap_subevent_card_result_get_name(const uint8_t * event){ 6920 return &event[6]; 6921 } 6922 /** 6923 * @brief Get field handle_len from event PBAP_SUBEVENT_CARD_RESULT 6924 * @param event packet 6925 * @return handle_len 6926 * @note: btstack_type J 6927 */ 6928 static inline uint8_t pbap_subevent_card_result_get_handle_len(const uint8_t * event){ 6929 return event[6 + event[5]]; 6930 } 6931 /** 6932 * @brief Get field handle from event PBAP_SUBEVENT_CARD_RESULT 6933 * @param event packet 6934 * @return handle 6935 * @note: btstack_type V 6936 */ 6937 static inline const uint8_t * pbap_subevent_card_result_get_handle(const uint8_t * event){ 6938 return &event[6 + event[5] + 1]; 6939 } 6940 6941 /** 6942 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 6943 * @param event packet 6944 * @return hid_cid 6945 * @note: btstack_type 2 6946 */ 6947 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 6948 return little_endian_read_16(event, 3); 6949 } 6950 /** 6951 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 6952 * @param event packet 6953 * @return status 6954 * @note: btstack_type 1 6955 */ 6956 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 6957 return event[5]; 6958 } 6959 /** 6960 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 6961 * @param event packet 6962 * @param Pointer to storage for bd_addr 6963 * @note: btstack_type B 6964 */ 6965 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6966 reverse_bytes(&event[6], bd_addr, 6); 6967 } 6968 /** 6969 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 6970 * @param event packet 6971 * @return con_handle 6972 * @note: btstack_type H 6973 */ 6974 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6975 return little_endian_read_16(event, 12); 6976 } 6977 /** 6978 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 6979 * @param event packet 6980 * @return incoming 6981 * @note: btstack_type 1 6982 */ 6983 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 6984 return event[14]; 6985 } 6986 6987 /** 6988 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 6989 * @param event packet 6990 * @return hid_cid 6991 * @note: btstack_type 2 6992 */ 6993 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 6994 return little_endian_read_16(event, 3); 6995 } 6996 6997 /** 6998 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 6999 * @param event packet 7000 * @return hid_cid 7001 * @note: btstack_type 2 7002 */ 7003 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 7004 return little_endian_read_16(event, 3); 7005 } 7006 7007 /** 7008 * @brief Get field con_handle from event HID_SUBEVENT_SUSPEND 7009 * @param event packet 7010 * @return con_handle 7011 * @note: btstack_type 2 7012 */ 7013 static inline uint16_t hid_subevent_suspend_get_con_handle(const uint8_t * event){ 7014 return little_endian_read_16(event, 3); 7015 } 7016 7017 /** 7018 * @brief Get field con_handle from event HID_SUBEVENT_EXIT_SUSPEND 7019 * @param event packet 7020 * @return con_handle 7021 * @note: btstack_type 2 7022 */ 7023 static inline uint16_t hid_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 7024 return little_endian_read_16(event, 3); 7025 } 7026 7027 /** 7028 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 7029 * @param event packet 7030 * @return con_handle 7031 * @note: btstack_type 2 7032 */ 7033 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 7034 return little_endian_read_16(event, 3); 7035 } 7036 7037 /** 7038 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 7039 * @param event packet 7040 * @return con_handle 7041 * @note: btstack_type 2 7042 */ 7043 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 7044 return little_endian_read_16(event, 3); 7045 } 7046 /** 7047 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 7048 * @param event packet 7049 * @return protocol_mode 7050 * @note: btstack_type 1 7051 */ 7052 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 7053 return event[5]; 7054 } 7055 7056 /** 7057 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 7058 * @param event packet 7059 * @return con_handle 7060 * @note: btstack_type 2 7061 */ 7062 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 7063 return little_endian_read_16(event, 3); 7064 } 7065 /** 7066 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 7067 * @param event packet 7068 * @return enable 7069 * @note: btstack_type 1 7070 */ 7071 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 7072 return event[5]; 7073 } 7074 7075 /** 7076 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 7077 * @param event packet 7078 * @return con_handle 7079 * @note: btstack_type 2 7080 */ 7081 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 7082 return little_endian_read_16(event, 3); 7083 } 7084 /** 7085 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 7086 * @param event packet 7087 * @return enable 7088 * @note: btstack_type 1 7089 */ 7090 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 7091 return event[5]; 7092 } 7093 7094 /** 7095 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 7096 * @param event packet 7097 * @return con_handle 7098 * @note: btstack_type 2 7099 */ 7100 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 7101 return little_endian_read_16(event, 3); 7102 } 7103 /** 7104 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 7105 * @param event packet 7106 * @return enable 7107 * @note: btstack_type 1 7108 */ 7109 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 7110 return event[5]; 7111 } 7112 7113 /** 7114 * @brief Get field con_handle from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 7115 * @param event packet 7116 * @return con_handle 7117 * @note: btstack_type 2 7118 */ 7119 static inline uint16_t hids_subevent_output_report_enable_get_con_handle(const uint8_t * event){ 7120 return little_endian_read_16(event, 3); 7121 } 7122 /** 7123 * @brief Get field enable from event HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 7124 * @param event packet 7125 * @return enable 7126 * @note: btstack_type 1 7127 */ 7128 static inline uint8_t hids_subevent_output_report_enable_get_enable(const uint8_t * event){ 7129 return event[5]; 7130 } 7131 7132 /** 7133 * @brief Get field con_handle from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 7134 * @param event packet 7135 * @return con_handle 7136 * @note: btstack_type 2 7137 */ 7138 static inline uint16_t hids_subevent_feature_report_enable_get_con_handle(const uint8_t * event){ 7139 return little_endian_read_16(event, 3); 7140 } 7141 /** 7142 * @brief Get field enable from event HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 7143 * @param event packet 7144 * @return enable 7145 * @note: btstack_type 1 7146 */ 7147 static inline uint8_t hids_subevent_feature_report_enable_get_enable(const uint8_t * event){ 7148 return event[5]; 7149 } 7150 7151 /** 7152 * @brief Get field con_handle from event HIDS_SUBEVENT_SUSPEND 7153 * @param event packet 7154 * @return con_handle 7155 * @note: btstack_type 2 7156 */ 7157 static inline uint16_t hids_subevent_suspend_get_con_handle(const uint8_t * event){ 7158 return little_endian_read_16(event, 3); 7159 } 7160 7161 /** 7162 * @brief Get field con_handle from event HIDS_SUBEVENT_EXIT_SUSPEND 7163 * @param event packet 7164 * @return con_handle 7165 * @note: btstack_type 2 7166 */ 7167 static inline uint16_t hids_subevent_exit_suspend_get_con_handle(const uint8_t * event){ 7168 return little_endian_read_16(event, 3); 7169 } 7170 7171 /** 7172 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 7173 * @param event packet 7174 * @return con_handle 7175 * @note: btstack_type 2 7176 */ 7177 static inline uint16_t gattservice_subevent_cycling_power_start_calibration_get_con_handle(const uint8_t * event){ 7178 return little_endian_read_16(event, 3); 7179 } 7180 /** 7181 * @brief Get field measurement_type from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 7182 * @param event packet 7183 * @return measurement_type 7184 * @note: btstack_type 1 7185 */ 7186 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_measurement_type(const uint8_t * event){ 7187 return event[5]; 7188 } 7189 /** 7190 * @brief Get field is_enhanced from event GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 7191 * @param event packet 7192 * @return is_enhanced 7193 * @note: btstack_type 1 7194 */ 7195 static inline uint8_t gattservice_subevent_cycling_power_start_calibration_get_is_enhanced(const uint8_t * event){ 7196 return event[6]; 7197 } 7198 7199 /** 7200 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START 7201 * @param event packet 7202 * @return con_handle 7203 * @note: btstack_type 2 7204 */ 7205 static inline uint16_t gattservice_subevent_cycling_power_broadcast_start_get_con_handle(const uint8_t * event){ 7206 return little_endian_read_16(event, 3); 7207 } 7208 7209 /** 7210 * @brief Get field con_handle from event GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP 7211 * @param event packet 7212 * @return con_handle 7213 * @note: btstack_type 2 7214 */ 7215 static inline uint16_t gattservice_subevent_cycling_power_broadcast_stop_get_con_handle(const uint8_t * event){ 7216 return little_endian_read_16(event, 3); 7217 } 7218 7219 /** 7220 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_OPENED 7221 * @param event packet 7222 * @return map_cid 7223 * @note: btstack_type 2 7224 */ 7225 static inline uint16_t map_subevent_connection_opened_get_map_cid(const uint8_t * event){ 7226 return little_endian_read_16(event, 3); 7227 } 7228 /** 7229 * @brief Get field status from event MAP_SUBEVENT_CONNECTION_OPENED 7230 * @param event packet 7231 * @return status 7232 * @note: btstack_type 1 7233 */ 7234 static inline uint8_t map_subevent_connection_opened_get_status(const uint8_t * event){ 7235 return event[5]; 7236 } 7237 /** 7238 * @brief Get field bd_addr from event MAP_SUBEVENT_CONNECTION_OPENED 7239 * @param event packet 7240 * @param Pointer to storage for bd_addr 7241 * @note: btstack_type B 7242 */ 7243 static inline void map_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 7244 reverse_bytes(&event[6], bd_addr, 6); 7245 } 7246 /** 7247 * @brief Get field con_handle from event MAP_SUBEVENT_CONNECTION_OPENED 7248 * @param event packet 7249 * @return con_handle 7250 * @note: btstack_type H 7251 */ 7252 static inline hci_con_handle_t map_subevent_connection_opened_get_con_handle(const uint8_t * event){ 7253 return little_endian_read_16(event, 12); 7254 } 7255 /** 7256 * @brief Get field incoming from event MAP_SUBEVENT_CONNECTION_OPENED 7257 * @param event packet 7258 * @return incoming 7259 * @note: btstack_type 1 7260 */ 7261 static inline uint8_t map_subevent_connection_opened_get_incoming(const uint8_t * event){ 7262 return event[14]; 7263 } 7264 7265 /** 7266 * @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_CLOSED 7267 * @param event packet 7268 * @return map_cid 7269 * @note: btstack_type 2 7270 */ 7271 static inline uint16_t map_subevent_connection_closed_get_map_cid(const uint8_t * event){ 7272 return little_endian_read_16(event, 3); 7273 } 7274 7275 /** 7276 * @brief Get field map_cid from event MAP_SUBEVENT_OPERATION_COMPLETED 7277 * @param event packet 7278 * @return map_cid 7279 * @note: btstack_type 2 7280 */ 7281 static inline uint16_t map_subevent_operation_completed_get_map_cid(const uint8_t * event){ 7282 return little_endian_read_16(event, 3); 7283 } 7284 /** 7285 * @brief Get field status from event MAP_SUBEVENT_OPERATION_COMPLETED 7286 * @param event packet 7287 * @return status 7288 * @note: btstack_type 1 7289 */ 7290 static inline uint8_t map_subevent_operation_completed_get_status(const uint8_t * event){ 7291 return event[5]; 7292 } 7293 7294 /** 7295 * @brief Get field map_cid from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 7296 * @param event packet 7297 * @return map_cid 7298 * @note: btstack_type 2 7299 */ 7300 static inline uint16_t map_subevent_folder_listing_item_get_map_cid(const uint8_t * event){ 7301 return little_endian_read_16(event, 3); 7302 } 7303 /** 7304 * @brief Get field name_len from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 7305 * @param event packet 7306 * @return name_len 7307 * @note: btstack_type L 7308 */ 7309 static inline uint16_t map_subevent_folder_listing_item_get_name_len(const uint8_t * event){ 7310 return little_endian_read_16(event, 5); 7311 } 7312 /** 7313 * @brief Get field name from event MAP_SUBEVENT_FOLDER_LISTING_ITEM 7314 * @param event packet 7315 * @return name 7316 * @note: btstack_type V 7317 */ 7318 static inline const uint8_t * map_subevent_folder_listing_item_get_name(const uint8_t * event){ 7319 return &event[7]; 7320 } 7321 7322 /** 7323 * @brief Get field map_cid from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 7324 * @param event packet 7325 * @return map_cid 7326 * @note: btstack_type 2 7327 */ 7328 static inline uint16_t map_subevent_message_listing_item_get_map_cid(const uint8_t * event){ 7329 return little_endian_read_16(event, 3); 7330 } 7331 /** 7332 * @brief Get field handle from event MAP_SUBEVENT_MESSAGE_LISTING_ITEM 7333 * @param event packet 7334 * @return handle 7335 * @note: btstack_type D 7336 */ 7337 static inline const uint8_t * map_subevent_message_listing_item_get_handle(const uint8_t * event){ 7338 return (const uint8_t *) &event[5]; 7339 } 7340 7341 /** 7342 * @brief Get field map_cid from event MAP_SUBEVENT_PARSING_DONE 7343 * @param event packet 7344 * @return map_cid 7345 * @note: btstack_type 2 7346 */ 7347 static inline uint16_t map_subevent_parsing_done_get_map_cid(const uint8_t * event){ 7348 return little_endian_read_16(event, 3); 7349 } 7350 7351 7352 /** 7353 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_PDU_SENT 7354 * @param event packet 7355 * @return status 7356 * @note: btstack_type 1 7357 */ 7358 static inline uint8_t mesh_subevent_pb_transport_pdu_sent_get_status(const uint8_t * event){ 7359 return event[3]; 7360 } 7361 7362 /** 7363 * @brief Get field status from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 7364 * @param event packet 7365 * @return status 7366 * @note: btstack_type 1 7367 */ 7368 static inline uint8_t mesh_subevent_pb_transport_link_open_get_status(const uint8_t * event){ 7369 return event[3]; 7370 } 7371 /** 7372 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 7373 * @param event packet 7374 * @return pb_transport_cid 7375 * @note: btstack_type 2 7376 */ 7377 static inline uint16_t mesh_subevent_pb_transport_link_open_get_pb_transport_cid(const uint8_t * event){ 7378 return little_endian_read_16(event, 4); 7379 } 7380 /** 7381 * @brief Get field pb_type from event MESH_SUBEVENT_PB_TRANSPORT_LINK_OPEN 7382 * @param event packet 7383 * @return pb_type 7384 * @note: btstack_type 1 7385 */ 7386 static inline uint8_t mesh_subevent_pb_transport_link_open_get_pb_type(const uint8_t * event){ 7387 return event[6]; 7388 } 7389 7390 /** 7391 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 7392 * @param event packet 7393 * @return pb_transport_cid 7394 * @note: btstack_type 1 7395 */ 7396 static inline uint8_t mesh_subevent_pb_transport_link_closed_get_pb_transport_cid(const uint8_t * event){ 7397 return event[3]; 7398 } 7399 /** 7400 * @brief Get field reason from event MESH_SUBEVENT_PB_TRANSPORT_LINK_CLOSED 7401 * @param event packet 7402 * @return reason 7403 * @note: btstack_type 2 7404 */ 7405 static inline uint16_t mesh_subevent_pb_transport_link_closed_get_reason(const uint8_t * event){ 7406 return little_endian_read_16(event, 4); 7407 } 7408 7409 /** 7410 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 7411 * @param event packet 7412 * @return pb_transport_cid 7413 * @note: btstack_type 2 7414 */ 7415 static inline uint16_t mesh_subevent_pb_prov_attention_timer_get_pb_transport_cid(const uint8_t * event){ 7416 return little_endian_read_16(event, 3); 7417 } 7418 /** 7419 * @brief Get field attention_time from event MESH_SUBEVENT_PB_PROV_ATTENTION_TIMER 7420 * @param event packet 7421 * @return attention_time 7422 * @note: btstack_type 1 7423 */ 7424 static inline uint8_t mesh_subevent_pb_prov_attention_timer_get_attention_time(const uint8_t * event){ 7425 return event[5]; 7426 } 7427 7428 /** 7429 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_PUBLIC_KEY_OOB 7430 * @param event packet 7431 * @return pb_transport_cid 7432 * @note: btstack_type 2 7433 */ 7434 static inline uint16_t mesh_subevent_pb_prov_start_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 7435 return little_endian_read_16(event, 3); 7436 } 7437 7438 /** 7439 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB 7440 * @param event packet 7441 * @return pb_transport_cid 7442 * @note: btstack_type 2 7443 */ 7444 static inline uint16_t mesh_subevent_pb_prov_stop_emit_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 7445 return little_endian_read_16(event, 3); 7446 } 7447 7448 /** 7449 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_INPUT_OOB_REQUEST 7450 * @param event packet 7451 * @return pb_transport_cid 7452 * @note: btstack_type 2 7453 */ 7454 static inline uint16_t mesh_subevent_pb_prov_input_oob_request_get_pb_transport_cid(const uint8_t * event){ 7455 return little_endian_read_16(event, 3); 7456 } 7457 7458 /** 7459 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 7460 * @param event packet 7461 * @return pb_transport_cid 7462 * @note: btstack_type 2 7463 */ 7464 static inline uint16_t mesh_subevent_pb_prov_start_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 7465 return little_endian_read_16(event, 3); 7466 } 7467 /** 7468 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_OUTPUT_OOB 7469 * @param event packet 7470 * @return output_oob 7471 * @note: btstack_type 4 7472 */ 7473 static inline uint32_t mesh_subevent_pb_prov_start_emit_output_oob_get_output_oob(const uint8_t * event){ 7474 return little_endian_read_32(event, 5); 7475 } 7476 7477 /** 7478 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_OUTPUT_OOB 7479 * @param event packet 7480 * @return pb_transport_cid 7481 * @note: btstack_type 2 7482 */ 7483 static inline uint16_t mesh_subevent_pb_prov_stop_emit_output_oob_get_pb_transport_cid(const uint8_t * event){ 7484 return little_endian_read_16(event, 3); 7485 } 7486 7487 /** 7488 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB 7489 * @param event packet 7490 * @return pb_transport_cid 7491 * @note: btstack_type 2 7492 */ 7493 static inline uint16_t mesh_subevent_pb_prov_start_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 7494 return little_endian_read_16(event, 3); 7495 } 7496 7497 /** 7498 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB 7499 * @param event packet 7500 * @return pb_transport_cid 7501 * @note: btstack_type 2 7502 */ 7503 static inline uint16_t mesh_subevent_pb_prov_stop_receive_public_key_oob_get_pb_transport_cid(const uint8_t * event){ 7504 return little_endian_read_16(event, 3); 7505 } 7506 7507 /** 7508 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_OUTPUT_OOB_REQUEST 7509 * @param event packet 7510 * @return pb_transport_cid 7511 * @note: btstack_type 2 7512 */ 7513 static inline uint16_t mesh_subevent_pb_prov_output_oob_request_get_pb_transport_cid(const uint8_t * event){ 7514 return little_endian_read_16(event, 3); 7515 } 7516 7517 /** 7518 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 7519 * @param event packet 7520 * @return pb_transport_cid 7521 * @note: btstack_type 2 7522 */ 7523 static inline uint16_t mesh_subevent_pb_prov_start_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 7524 return little_endian_read_16(event, 3); 7525 } 7526 /** 7527 * @brief Get field output_oob from event MESH_SUBEVENT_PB_PROV_START_EMIT_INPUT_OOB 7528 * @param event packet 7529 * @return output_oob 7530 * @note: btstack_type 4 7531 */ 7532 static inline uint32_t mesh_subevent_pb_prov_start_emit_input_oob_get_output_oob(const uint8_t * event){ 7533 return little_endian_read_32(event, 5); 7534 } 7535 7536 /** 7537 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_STOP_EMIT_INPUT_OOB 7538 * @param event packet 7539 * @return pb_transport_cid 7540 * @note: btstack_type 2 7541 */ 7542 static inline uint16_t mesh_subevent_pb_prov_stop_emit_input_oob_get_pb_transport_cid(const uint8_t * event){ 7543 return little_endian_read_16(event, 3); 7544 } 7545 7546 /** 7547 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7548 * @param event packet 7549 * @return pb_transport_cid 7550 * @note: btstack_type 2 7551 */ 7552 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_pb_transport_cid(const uint8_t * event){ 7553 return little_endian_read_16(event, 3); 7554 } 7555 /** 7556 * @brief Get field num_elements from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7557 * @param event packet 7558 * @return num_elements 7559 * @note: btstack_type 1 7560 */ 7561 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_num_elements(const uint8_t * event){ 7562 return event[5]; 7563 } 7564 /** 7565 * @brief Get field algorithms from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7566 * @param event packet 7567 * @return algorithms 7568 * @note: btstack_type 2 7569 */ 7570 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_algorithms(const uint8_t * event){ 7571 return little_endian_read_16(event, 6); 7572 } 7573 /** 7574 * @brief Get field public_key from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7575 * @param event packet 7576 * @return public_key 7577 * @note: btstack_type 1 7578 */ 7579 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_public_key(const uint8_t * event){ 7580 return event[8]; 7581 } 7582 /** 7583 * @brief Get field static_oob_type from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7584 * @param event packet 7585 * @return static_oob_type 7586 * @note: btstack_type 1 7587 */ 7588 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_static_oob_type(const uint8_t * event){ 7589 return event[9]; 7590 } 7591 /** 7592 * @brief Get field output_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7593 * @param event packet 7594 * @return output_oob_size 7595 * @note: btstack_type 1 7596 */ 7597 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_output_oob_size(const uint8_t * event){ 7598 return event[10]; 7599 } 7600 /** 7601 * @brief Get field output_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7602 * @param event packet 7603 * @return output_oob_action 7604 * @note: btstack_type 2 7605 */ 7606 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_output_oob_action(const uint8_t * event){ 7607 return little_endian_read_16(event, 11); 7608 } 7609 /** 7610 * @brief Get field input_oob_size from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7611 * @param event packet 7612 * @return input_oob_size 7613 * @note: btstack_type 1 7614 */ 7615 static inline uint8_t mesh_subevent_pb_prov_capabilities_get_input_oob_size(const uint8_t * event){ 7616 return event[13]; 7617 } 7618 /** 7619 * @brief Get field input_oob_action from event MESH_SUBEVENT_PB_PROV_CAPABILITIES 7620 * @param event packet 7621 * @return input_oob_action 7622 * @note: btstack_type 2 7623 */ 7624 static inline uint16_t mesh_subevent_pb_prov_capabilities_get_input_oob_action(const uint8_t * event){ 7625 return little_endian_read_16(event, 14); 7626 } 7627 7628 /** 7629 * @brief Get field pb_transport_cid from event MESH_SUBEVENT_PB_PROV_COMPLETE 7630 * @param event packet 7631 * @return pb_transport_cid 7632 * @note: btstack_type 2 7633 */ 7634 static inline uint16_t mesh_subevent_pb_prov_complete_get_pb_transport_cid(const uint8_t * event){ 7635 return little_endian_read_16(event, 3); 7636 } 7637 7638 /** 7639 * @brief Get field attention_time from event MESH_SUBEVENT_ATTENTION_TIMER 7640 * @param event packet 7641 * @return attention_time 7642 * @note: btstack_type 1 7643 */ 7644 static inline uint8_t mesh_subevent_attention_timer_get_attention_time(const uint8_t * event){ 7645 return event[3]; 7646 } 7647 7648 /** 7649 * @brief Get field status from event MESH_SUBEVENT_PROXY_CONNECTED 7650 * @param event packet 7651 * @return status 7652 * @note: btstack_type 1 7653 */ 7654 static inline uint8_t mesh_subevent_proxy_connected_get_status(const uint8_t * event){ 7655 return event[3]; 7656 } 7657 /** 7658 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_CONNECTED 7659 * @param event packet 7660 * @return con_handle 7661 * @note: btstack_type H 7662 */ 7663 static inline hci_con_handle_t mesh_subevent_proxy_connected_get_con_handle(const uint8_t * event){ 7664 return little_endian_read_16(event, 4); 7665 } 7666 7667 /** 7668 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_PDU_SENT 7669 * @param event packet 7670 * @return con_handle 7671 * @note: btstack_type H 7672 */ 7673 static inline hci_con_handle_t mesh_subevent_proxy_pdu_sent_get_con_handle(const uint8_t * event){ 7674 return little_endian_read_16(event, 3); 7675 } 7676 7677 /** 7678 * @brief Get field con_handle from event MESH_SUBEVENT_PROXY_DISCONNECTED 7679 * @param event packet 7680 * @return con_handle 7681 * @note: btstack_type H 7682 */ 7683 static inline hci_con_handle_t mesh_subevent_proxy_disconnected_get_con_handle(const uint8_t * event){ 7684 return little_endian_read_16(event, 3); 7685 } 7686 7687 /** 7688 * @brief Get field con_handle from event MESH_SUBEVENT_MESSAGE_SENT 7689 * @param event packet 7690 * @return con_handle 7691 * @note: btstack_type H 7692 */ 7693 static inline hci_con_handle_t mesh_subevent_message_sent_get_con_handle(const uint8_t * event){ 7694 return little_endian_read_16(event, 3); 7695 } 7696 7697 /** 7698 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_BOOL 7699 * @param event packet 7700 * @return element_index 7701 * @note: btstack_type 1 7702 */ 7703 static inline uint8_t mesh_subevent_state_update_bool_get_element_index(const uint8_t * event){ 7704 return event[3]; 7705 } 7706 /** 7707 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 7708 * @param event packet 7709 * @return model_identifier 7710 * @note: btstack_type 4 7711 */ 7712 static inline uint32_t mesh_subevent_state_update_bool_get_model_identifier(const uint8_t * event){ 7713 return little_endian_read_32(event, 4); 7714 } 7715 /** 7716 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_BOOL 7717 * @param event packet 7718 * @return state_identifier 7719 * @note: btstack_type 4 7720 */ 7721 static inline uint32_t mesh_subevent_state_update_bool_get_state_identifier(const uint8_t * event){ 7722 return little_endian_read_32(event, 8); 7723 } 7724 /** 7725 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_BOOL 7726 * @param event packet 7727 * @return reason 7728 * @note: btstack_type 1 7729 */ 7730 static inline uint8_t mesh_subevent_state_update_bool_get_reason(const uint8_t * event){ 7731 return event[12]; 7732 } 7733 /** 7734 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_BOOL 7735 * @param event packet 7736 * @return value 7737 * @note: btstack_type 1 7738 */ 7739 static inline uint8_t mesh_subevent_state_update_bool_get_value(const uint8_t * event){ 7740 return event[13]; 7741 } 7742 7743 /** 7744 * @brief Get field element_index from event MESH_SUBEVENT_STATE_UPDATE_INT16 7745 * @param event packet 7746 * @return element_index 7747 * @note: btstack_type 1 7748 */ 7749 static inline uint8_t mesh_subevent_state_update_int16_get_element_index(const uint8_t * event){ 7750 return event[3]; 7751 } 7752 /** 7753 * @brief Get field model_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 7754 * @param event packet 7755 * @return model_identifier 7756 * @note: btstack_type 4 7757 */ 7758 static inline uint32_t mesh_subevent_state_update_int16_get_model_identifier(const uint8_t * event){ 7759 return little_endian_read_32(event, 4); 7760 } 7761 /** 7762 * @brief Get field state_identifier from event MESH_SUBEVENT_STATE_UPDATE_INT16 7763 * @param event packet 7764 * @return state_identifier 7765 * @note: btstack_type 4 7766 */ 7767 static inline uint32_t mesh_subevent_state_update_int16_get_state_identifier(const uint8_t * event){ 7768 return little_endian_read_32(event, 8); 7769 } 7770 /** 7771 * @brief Get field reason from event MESH_SUBEVENT_STATE_UPDATE_INT16 7772 * @param event packet 7773 * @return reason 7774 * @note: btstack_type 1 7775 */ 7776 static inline uint8_t mesh_subevent_state_update_int16_get_reason(const uint8_t * event){ 7777 return event[12]; 7778 } 7779 /** 7780 * @brief Get field value from event MESH_SUBEVENT_STATE_UPDATE_INT16 7781 * @param event packet 7782 * @return value 7783 * @note: btstack_type 2 7784 */ 7785 static inline uint16_t mesh_subevent_state_update_int16_get_value(const uint8_t * event){ 7786 return little_endian_read_16(event, 13); 7787 } 7788 7789 /** 7790 * @brief Get field element_index from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 7791 * @param event packet 7792 * @return element_index 7793 * @note: btstack_type 1 7794 */ 7795 static inline uint8_t mesh_subevent_message_not_acknowledged_get_element_index(const uint8_t * event){ 7796 return event[3]; 7797 } 7798 /** 7799 * @brief Get field model_identifier from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 7800 * @param event packet 7801 * @return model_identifier 7802 * @note: btstack_type 4 7803 */ 7804 static inline uint32_t mesh_subevent_message_not_acknowledged_get_model_identifier(const uint8_t * event){ 7805 return little_endian_read_32(event, 4); 7806 } 7807 /** 7808 * @brief Get field opcode from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 7809 * @param event packet 7810 * @return opcode 7811 * @note: btstack_type 4 7812 */ 7813 static inline uint32_t mesh_subevent_message_not_acknowledged_get_opcode(const uint8_t * event){ 7814 return little_endian_read_32(event, 8); 7815 } 7816 /** 7817 * @brief Get field dest from event MESH_SUBEVENT_MESSAGE_NOT_ACKNOWLEDGED 7818 * @param event packet 7819 * @return dest 7820 * @note: btstack_type 2 7821 */ 7822 static inline uint16_t mesh_subevent_message_not_acknowledged_get_dest(const uint8_t * event){ 7823 return little_endian_read_16(event, 12); 7824 } 7825 7826 /** 7827 * @brief Get field element_index from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 7828 * @param event packet 7829 * @return element_index 7830 * @note: btstack_type 1 7831 */ 7832 static inline uint8_t mesh_subevent_generic_on_off_status_get_element_index(const uint8_t * event){ 7833 return event[3]; 7834 } 7835 /** 7836 * @brief Get field model_identifier from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 7837 * @param event packet 7838 * @return model_identifier 7839 * @note: btstack_type 4 7840 */ 7841 static inline uint32_t mesh_subevent_generic_on_off_status_get_model_identifier(const uint8_t * event){ 7842 return little_endian_read_32(event, 4); 7843 } 7844 /** 7845 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 7846 * @param event packet 7847 * @return present_value 7848 * @note: btstack_type 1 7849 */ 7850 static inline uint8_t mesh_subevent_generic_on_off_status_get_present_value(const uint8_t * event){ 7851 return event[8]; 7852 } 7853 /** 7854 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 7855 * @param event packet 7856 * @return target_value 7857 * @note: btstack_type 1 7858 */ 7859 static inline uint8_t mesh_subevent_generic_on_off_status_get_target_value(const uint8_t * event){ 7860 return event[9]; 7861 } 7862 /** 7863 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_ON_OFF_STATUS 7864 * @param event packet 7865 * @return remaining_time_ms 7866 * @note: btstack_type 4 7867 */ 7868 static inline uint32_t mesh_subevent_generic_on_off_status_get_remaining_time_ms(const uint8_t * event){ 7869 return little_endian_read_32(event, 10); 7870 } 7871 7872 /** 7873 * @brief Get field element_index from event MESH_SUBEVENT_GENERIC_LEVEL_STATUS 7874 * @param event packet 7875 * @return element_index 7876 * @note: btstack_type 1 7877 */ 7878 static inline uint8_t mesh_subevent_generic_level_status_get_element_index(const uint8_t * event){ 7879 return event[3]; 7880 } 7881 /** 7882 * @brief Get field model_identifier from event MESH_SUBEVENT_GENERIC_LEVEL_STATUS 7883 * @param event packet 7884 * @return model_identifier 7885 * @note: btstack_type 4 7886 */ 7887 static inline uint32_t mesh_subevent_generic_level_status_get_model_identifier(const uint8_t * event){ 7888 return little_endian_read_32(event, 4); 7889 } 7890 /** 7891 * @brief Get field present_value from event MESH_SUBEVENT_GENERIC_LEVEL_STATUS 7892 * @param event packet 7893 * @return present_value 7894 * @note: btstack_type 2 7895 */ 7896 static inline uint16_t mesh_subevent_generic_level_status_get_present_value(const uint8_t * event){ 7897 return little_endian_read_16(event, 8); 7898 } 7899 /** 7900 * @brief Get field target_value from event MESH_SUBEVENT_GENERIC_LEVEL_STATUS 7901 * @param event packet 7902 * @return target_value 7903 * @note: btstack_type 2 7904 */ 7905 static inline uint16_t mesh_subevent_generic_level_status_get_target_value(const uint8_t * event){ 7906 return little_endian_read_16(event, 10); 7907 } 7908 /** 7909 * @brief Get field remaining_time_ms from event MESH_SUBEVENT_GENERIC_LEVEL_STATUS 7910 * @param event packet 7911 * @return remaining_time_ms 7912 * @note: btstack_type 4 7913 */ 7914 static inline uint32_t mesh_subevent_generic_level_status_get_remaining_time_ms(const uint8_t * event){ 7915 return little_endian_read_32(event, 12); 7916 } 7917 7918 /** 7919 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_CLEAR_REGISTERED_FAULTS 7920 * @param event packet 7921 * @return element_index 7922 * @note: btstack_type 1 7923 */ 7924 static inline uint8_t mesh_subevent_health_clear_registered_faults_get_element_index(const uint8_t * event){ 7925 return event[3]; 7926 } 7927 /** 7928 * @brief Get field company_id from event MESH_SUBEVENT_HEALTH_CLEAR_REGISTERED_FAULTS 7929 * @param event packet 7930 * @return company_id 7931 * @note: btstack_type 2 7932 */ 7933 static inline uint16_t mesh_subevent_health_clear_registered_faults_get_company_id(const uint8_t * event){ 7934 return little_endian_read_16(event, 4); 7935 } 7936 7937 /** 7938 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7939 * @param event packet 7940 * @return element_index 7941 * @note: btstack_type 1 7942 */ 7943 static inline uint8_t mesh_subevent_health_perform_test_get_element_index(const uint8_t * event){ 7944 return event[3]; 7945 } 7946 /** 7947 * @brief Get field model_identifier from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7948 * @param event packet 7949 * @return model_identifier 7950 * @note: btstack_type 4 7951 */ 7952 static inline uint32_t mesh_subevent_health_perform_test_get_model_identifier(const uint8_t * event){ 7953 return little_endian_read_32(event, 4); 7954 } 7955 /** 7956 * @brief Get field dest from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7957 * @param event packet 7958 * @return dest 7959 * @note: btstack_type 2 7960 */ 7961 static inline uint16_t mesh_subevent_health_perform_test_get_dest(const uint8_t * event){ 7962 return little_endian_read_16(event, 8); 7963 } 7964 /** 7965 * @brief Get field netkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7966 * @param event packet 7967 * @return netkey_index 7968 * @note: btstack_type 2 7969 */ 7970 static inline uint16_t mesh_subevent_health_perform_test_get_netkey_index(const uint8_t * event){ 7971 return little_endian_read_16(event, 10); 7972 } 7973 /** 7974 * @brief Get field appkey_index from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7975 * @param event packet 7976 * @return appkey_index 7977 * @note: btstack_type 2 7978 */ 7979 static inline uint16_t mesh_subevent_health_perform_test_get_appkey_index(const uint8_t * event){ 7980 return little_endian_read_16(event, 12); 7981 } 7982 /** 7983 * @brief Get field company_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7984 * @param event packet 7985 * @return company_id 7986 * @note: btstack_type 2 7987 */ 7988 static inline uint16_t mesh_subevent_health_perform_test_get_company_id(const uint8_t * event){ 7989 return little_endian_read_16(event, 14); 7990 } 7991 /** 7992 * @brief Get field test_id from event MESH_SUBEVENT_HEALTH_PERFORM_TEST 7993 * @param event packet 7994 * @return test_id 7995 * @note: btstack_type 1 7996 */ 7997 static inline uint8_t mesh_subevent_health_perform_test_get_test_id(const uint8_t * event){ 7998 return event[16]; 7999 } 8000 8001 /** 8002 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_FAST_PERIOD_DIVISOR_CHANGED 8003 * @param event packet 8004 * @return element_index 8005 * @note: btstack_type 1 8006 */ 8007 static inline uint8_t mesh_subevent_health_fast_period_divisor_changed_get_element_index(const uint8_t * event){ 8008 return event[3]; 8009 } 8010 /** 8011 * @brief Get field fast_period_divisor from event MESH_SUBEVENT_HEALTH_FAST_PERIOD_DIVISOR_CHANGED 8012 * @param event packet 8013 * @return fast_period_divisor 8014 * @note: btstack_type 1 8015 */ 8016 static inline uint8_t mesh_subevent_health_fast_period_divisor_changed_get_fast_period_divisor(const uint8_t * event){ 8017 return event[4]; 8018 } 8019 8020 /** 8021 * @brief Get field element_index from event MESH_SUBEVENT_HEALTH_ATTENTION_TIMER_CHANGED 8022 * @param event packet 8023 * @return element_index 8024 * @note: btstack_type 1 8025 */ 8026 static inline uint8_t mesh_subevent_health_attention_timer_changed_get_element_index(const uint8_t * event){ 8027 return event[3]; 8028 } 8029 8030 8031 8032 /* API_END */ 8033 8034 #if defined __cplusplus 8035 } 8036 #endif 8037 8038 #endif // BTSTACK_EVENT_H 8039