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 ancs event 74 * @param event packet 75 * @return subevent_code 76 */ 77 static inline uint8_t hci_event_ancs_meta_get_subevent_code(const uint8_t * event){ 78 return event[2]; 79 } 80 /*** 81 * @brief Get subevent code for avdtp event 82 * @param event packet 83 * @return subevent_code 84 */ 85 static inline uint8_t hci_event_avdtp_meta_get_subevent_code(const uint8_t * event){ 86 return event[2]; 87 } 88 /*** 89 * @brief Get subevent code for a2dp event 90 * @param event packet 91 * @return subevent_code 92 */ 93 static inline uint8_t hci_event_a2dp_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 goep event 106 * @param event packet 107 * @return subevent_code 108 */ 109 static inline uint8_t hci_event_goep_meta_get_subevent_code(const uint8_t * event){ 110 return event[2]; 111 } 112 /*** 113 * @brief Get subevent code for hfp event 114 * @param event packet 115 * @return subevent_code 116 */ 117 static inline uint8_t hci_event_hfp_meta_get_subevent_code(const uint8_t * event){ 118 return event[2]; 119 } 120 /*** 121 * @brief Get subevent code for hsp event 122 * @param event packet 123 * @return subevent_code 124 */ 125 static inline uint8_t hci_event_hsp_meta_get_subevent_code(const uint8_t * event){ 126 return event[2]; 127 } 128 /*** 129 * @brief Get subevent code for pbap event 130 * @param event packet 131 * @return subevent_code 132 */ 133 static inline uint8_t hci_event_pbap_meta_get_subevent_code(const uint8_t * event){ 134 return event[2]; 135 } 136 /*** 137 * @brief Get subevent code for le event 138 * @param event packet 139 * @return subevent_code 140 */ 141 static inline uint8_t hci_event_le_meta_get_subevent_code(const uint8_t * event){ 142 return event[2]; 143 } 144 /*** 145 * @brief Get subevent code for hid event 146 * @param event packet 147 * @return subevent_code 148 */ 149 static inline uint8_t hci_event_hid_meta_get_subevent_code(const uint8_t * event){ 150 return event[2]; 151 } 152 /*** 153 * @brief Get subevent code for hids event 154 * @param event packet 155 * @return subevent_code 156 */ 157 static inline uint8_t hci_event_hids_meta_get_subevent_code(const uint8_t * event){ 158 return event[2]; 159 } 160 /** 161 * @brief Get field status from event HCI_EVENT_INQUIRY_COMPLETE 162 * @param event packet 163 * @return status 164 * @note: btstack_type 1 165 */ 166 static inline uint8_t hci_event_inquiry_complete_get_status(const uint8_t * event){ 167 return event[2]; 168 } 169 170 /** 171 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT 172 * @param event packet 173 * @return num_responses 174 * @note: btstack_type 1 175 */ 176 static inline uint8_t hci_event_inquiry_result_get_num_responses(const uint8_t * event){ 177 return event[2]; 178 } 179 /** 180 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT 181 * @param event packet 182 * @param Pointer to storage for bd_addr 183 * @note: btstack_type B 184 */ 185 static inline void hci_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 186 reverse_bd_addr(&event[3], bd_addr); 187 } 188 /** 189 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT 190 * @param event packet 191 * @return page_scan_repetition_mode 192 * @note: btstack_type 1 193 */ 194 static inline uint8_t hci_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 195 return event[9]; 196 } 197 /** 198 * @brief Get field reserved1 from event HCI_EVENT_INQUIRY_RESULT 199 * @param event packet 200 * @return reserved1 201 * @note: btstack_type 1 202 */ 203 static inline uint8_t hci_event_inquiry_result_get_reserved1(const uint8_t * event){ 204 return event[10]; 205 } 206 /** 207 * @brief Get field reserved2 from event HCI_EVENT_INQUIRY_RESULT 208 * @param event packet 209 * @return reserved2 210 * @note: btstack_type 1 211 */ 212 static inline uint8_t hci_event_inquiry_result_get_reserved2(const uint8_t * event){ 213 return event[11]; 214 } 215 /** 216 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT 217 * @param event packet 218 * @return class_of_device 219 * @note: btstack_type 3 220 */ 221 static inline uint32_t hci_event_inquiry_result_get_class_of_device(const uint8_t * event){ 222 return little_endian_read_24(event, 12); 223 } 224 /** 225 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT 226 * @param event packet 227 * @return clock_offset 228 * @note: btstack_type 2 229 */ 230 static inline uint16_t hci_event_inquiry_result_get_clock_offset(const uint8_t * event){ 231 return little_endian_read_16(event, 15); 232 } 233 234 /** 235 * @brief Get field status from event HCI_EVENT_CONNECTION_COMPLETE 236 * @param event packet 237 * @return status 238 * @note: btstack_type 1 239 */ 240 static inline uint8_t hci_event_connection_complete_get_status(const uint8_t * event){ 241 return event[2]; 242 } 243 /** 244 * @brief Get field connection_handle from event HCI_EVENT_CONNECTION_COMPLETE 245 * @param event packet 246 * @return connection_handle 247 * @note: btstack_type 2 248 */ 249 static inline uint16_t hci_event_connection_complete_get_connection_handle(const uint8_t * event){ 250 return little_endian_read_16(event, 3); 251 } 252 /** 253 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_COMPLETE 254 * @param event packet 255 * @param Pointer to storage for bd_addr 256 * @note: btstack_type B 257 */ 258 static inline void hci_event_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 259 reverse_bd_addr(&event[5], bd_addr); 260 } 261 /** 262 * @brief Get field link_type from event HCI_EVENT_CONNECTION_COMPLETE 263 * @param event packet 264 * @return link_type 265 * @note: btstack_type 1 266 */ 267 static inline uint8_t hci_event_connection_complete_get_link_type(const uint8_t * event){ 268 return event[11]; 269 } 270 /** 271 * @brief Get field encryption_enabled from event HCI_EVENT_CONNECTION_COMPLETE 272 * @param event packet 273 * @return encryption_enabled 274 * @note: btstack_type 1 275 */ 276 static inline uint8_t hci_event_connection_complete_get_encryption_enabled(const uint8_t * event){ 277 return event[12]; 278 } 279 280 /** 281 * @brief Get field bd_addr from event HCI_EVENT_CONNECTION_REQUEST 282 * @param event packet 283 * @param Pointer to storage for bd_addr 284 * @note: btstack_type B 285 */ 286 static inline void hci_event_connection_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 287 reverse_bd_addr(&event[2], bd_addr); 288 } 289 /** 290 * @brief Get field class_of_device from event HCI_EVENT_CONNECTION_REQUEST 291 * @param event packet 292 * @return class_of_device 293 * @note: btstack_type 3 294 */ 295 static inline uint32_t hci_event_connection_request_get_class_of_device(const uint8_t * event){ 296 return little_endian_read_24(event, 8); 297 } 298 /** 299 * @brief Get field link_type from event HCI_EVENT_CONNECTION_REQUEST 300 * @param event packet 301 * @return link_type 302 * @note: btstack_type 1 303 */ 304 static inline uint8_t hci_event_connection_request_get_link_type(const uint8_t * event){ 305 return event[11]; 306 } 307 308 /** 309 * @brief Get field status from event HCI_EVENT_DISCONNECTION_COMPLETE 310 * @param event packet 311 * @return status 312 * @note: btstack_type 1 313 */ 314 static inline uint8_t hci_event_disconnection_complete_get_status(const uint8_t * event){ 315 return event[2]; 316 } 317 /** 318 * @brief Get field connection_handle from event HCI_EVENT_DISCONNECTION_COMPLETE 319 * @param event packet 320 * @return connection_handle 321 * @note: btstack_type 2 322 */ 323 static inline uint16_t hci_event_disconnection_complete_get_connection_handle(const uint8_t * event){ 324 return little_endian_read_16(event, 3); 325 } 326 /** 327 * @brief Get field reason from event HCI_EVENT_DISCONNECTION_COMPLETE 328 * @param event packet 329 * @return reason 330 * @note: btstack_type 1 331 */ 332 static inline uint8_t hci_event_disconnection_complete_get_reason(const uint8_t * event){ 333 return event[5]; 334 } 335 336 /** 337 * @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT 338 * @param event packet 339 * @return status 340 * @note: btstack_type 1 341 */ 342 static inline uint8_t hci_event_authentication_complete_event_get_status(const uint8_t * event){ 343 return event[2]; 344 } 345 /** 346 * @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT 347 * @param event packet 348 * @return connection_handle 349 * @note: btstack_type 2 350 */ 351 static inline uint16_t hci_event_authentication_complete_event_get_connection_handle(const uint8_t * event){ 352 return little_endian_read_16(event, 3); 353 } 354 355 /** 356 * @brief Get field status from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 357 * @param event packet 358 * @return status 359 * @note: btstack_type 1 360 */ 361 static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){ 362 return event[2]; 363 } 364 /** 365 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 366 * @param event packet 367 * @param Pointer to storage for bd_addr 368 * @note: btstack_type B 369 */ 370 static inline void hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 371 reverse_bd_addr(&event[3], bd_addr); 372 } 373 /** 374 * @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 375 * @param event packet 376 * @return remote_name 377 * @note: btstack_type N 378 */ 379 static inline const char * hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){ 380 return (const char *) &event[9]; 381 } 382 383 /** 384 * @brief Get field status from event HCI_EVENT_ENCRYPTION_CHANGE 385 * @param event packet 386 * @return status 387 * @note: btstack_type 1 388 */ 389 static inline uint8_t hci_event_encryption_change_get_status(const uint8_t * event){ 390 return event[2]; 391 } 392 /** 393 * @brief Get field connection_handle from event HCI_EVENT_ENCRYPTION_CHANGE 394 * @param event packet 395 * @return connection_handle 396 * @note: btstack_type 2 397 */ 398 static inline uint16_t hci_event_encryption_change_get_connection_handle(const uint8_t * event){ 399 return little_endian_read_16(event, 3); 400 } 401 /** 402 * @brief Get field encryption_enabled from event HCI_EVENT_ENCRYPTION_CHANGE 403 * @param event packet 404 * @return encryption_enabled 405 * @note: btstack_type 1 406 */ 407 static inline uint8_t hci_event_encryption_change_get_encryption_enabled(const uint8_t * event){ 408 return event[5]; 409 } 410 411 /** 412 * @brief Get field status from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 413 * @param event packet 414 * @return status 415 * @note: btstack_type 1 416 */ 417 static inline uint8_t hci_event_change_connection_link_key_complete_get_status(const uint8_t * event){ 418 return event[2]; 419 } 420 /** 421 * @brief Get field connection_handle from event HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 422 * @param event packet 423 * @return connection_handle 424 * @note: btstack_type 2 425 */ 426 static inline uint16_t hci_event_change_connection_link_key_complete_get_connection_handle(const uint8_t * event){ 427 return little_endian_read_16(event, 3); 428 } 429 430 /** 431 * @brief Get field status from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 432 * @param event packet 433 * @return status 434 * @note: btstack_type 1 435 */ 436 static inline uint8_t hci_event_master_link_key_complete_get_status(const uint8_t * event){ 437 return event[2]; 438 } 439 /** 440 * @brief Get field connection_handle from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 441 * @param event packet 442 * @return connection_handle 443 * @note: btstack_type 2 444 */ 445 static inline uint16_t hci_event_master_link_key_complete_get_connection_handle(const uint8_t * event){ 446 return little_endian_read_16(event, 3); 447 } 448 /** 449 * @brief Get field key_flag from event HCI_EVENT_MASTER_LINK_KEY_COMPLETE 450 * @param event packet 451 * @return key_flag 452 * @note: btstack_type 1 453 */ 454 static inline uint8_t hci_event_master_link_key_complete_get_key_flag(const uint8_t * event){ 455 return event[5]; 456 } 457 458 /** 459 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_COMPLETE 460 * @param event packet 461 * @return num_hci_command_packets 462 * @note: btstack_type 1 463 */ 464 static inline uint8_t hci_event_command_complete_get_num_hci_command_packets(const uint8_t * event){ 465 return event[2]; 466 } 467 /** 468 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_COMPLETE 469 * @param event packet 470 * @return command_opcode 471 * @note: btstack_type 2 472 */ 473 static inline uint16_t hci_event_command_complete_get_command_opcode(const uint8_t * event){ 474 return little_endian_read_16(event, 3); 475 } 476 /** 477 * @brief Get field return_parameters from event HCI_EVENT_COMMAND_COMPLETE 478 * @param event packet 479 * @return return_parameters 480 * @note: btstack_type R 481 */ 482 static inline const uint8_t * hci_event_command_complete_get_return_parameters(const uint8_t * event){ 483 return &event[5]; 484 } 485 486 /** 487 * @brief Get field status from event HCI_EVENT_COMMAND_STATUS 488 * @param event packet 489 * @return status 490 * @note: btstack_type 1 491 */ 492 static inline uint8_t hci_event_command_status_get_status(const uint8_t * event){ 493 return event[2]; 494 } 495 /** 496 * @brief Get field num_hci_command_packets from event HCI_EVENT_COMMAND_STATUS 497 * @param event packet 498 * @return num_hci_command_packets 499 * @note: btstack_type 1 500 */ 501 static inline uint8_t hci_event_command_status_get_num_hci_command_packets(const uint8_t * event){ 502 return event[3]; 503 } 504 /** 505 * @brief Get field command_opcode from event HCI_EVENT_COMMAND_STATUS 506 * @param event packet 507 * @return command_opcode 508 * @note: btstack_type 2 509 */ 510 static inline uint16_t hci_event_command_status_get_command_opcode(const uint8_t * event){ 511 return little_endian_read_16(event, 4); 512 } 513 514 /** 515 * @brief Get field hardware_code from event HCI_EVENT_HARDWARE_ERROR 516 * @param event packet 517 * @return hardware_code 518 * @note: btstack_type 1 519 */ 520 static inline uint8_t hci_event_hardware_error_get_hardware_code(const uint8_t * event){ 521 return event[2]; 522 } 523 524 /** 525 * @brief Get field status from event HCI_EVENT_ROLE_CHANGE 526 * @param event packet 527 * @return status 528 * @note: btstack_type 1 529 */ 530 static inline uint8_t hci_event_role_change_get_status(const uint8_t * event){ 531 return event[2]; 532 } 533 /** 534 * @brief Get field bd_addr from event HCI_EVENT_ROLE_CHANGE 535 * @param event packet 536 * @param Pointer to storage for bd_addr 537 * @note: btstack_type B 538 */ 539 static inline void hci_event_role_change_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 540 reverse_bd_addr(&event[3], bd_addr); 541 } 542 /** 543 * @brief Get field role from event HCI_EVENT_ROLE_CHANGE 544 * @param event packet 545 * @return role 546 * @note: btstack_type 1 547 */ 548 static inline uint8_t hci_event_role_change_get_role(const uint8_t * event){ 549 return event[9]; 550 } 551 552 /** 553 * @brief Get field status from event HCI_EVENT_MODE_CHANGE_EVENT 554 * @param event packet 555 * @return status 556 * @note: btstack_type 1 557 */ 558 static inline uint8_t hci_event_mode_change_event_get_status(const uint8_t * event){ 559 return event[2]; 560 } 561 /** 562 * @brief Get field handle from event HCI_EVENT_MODE_CHANGE_EVENT 563 * @param event packet 564 * @return handle 565 * @note: btstack_type H 566 */ 567 static inline hci_con_handle_t hci_event_mode_change_event_get_handle(const uint8_t * event){ 568 return little_endian_read_16(event, 3); 569 } 570 /** 571 * @brief Get field mode from event HCI_EVENT_MODE_CHANGE_EVENT 572 * @param event packet 573 * @return mode 574 * @note: btstack_type 1 575 */ 576 static inline uint8_t hci_event_mode_change_event_get_mode(const uint8_t * event){ 577 return event[5]; 578 } 579 /** 580 * @brief Get field interval from event HCI_EVENT_MODE_CHANGE_EVENT 581 * @param event packet 582 * @return interval 583 * @note: btstack_type 2 584 */ 585 static inline uint16_t hci_event_mode_change_event_get_interval(const uint8_t * event){ 586 return little_endian_read_16(event, 6); 587 } 588 589 /** 590 * @brief Get field bd_addr from event HCI_EVENT_PIN_CODE_REQUEST 591 * @param event packet 592 * @param Pointer to storage for bd_addr 593 * @note: btstack_type B 594 */ 595 static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 596 reverse_bd_addr(&event[2], bd_addr); 597 } 598 599 /** 600 * @brief Get field bd_addr from event HCI_EVENT_LINK_KEY_REQUEST 601 * @param event packet 602 * @param Pointer to storage for bd_addr 603 * @note: btstack_type B 604 */ 605 static inline void hci_event_link_key_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 606 reverse_bd_addr(&event[2], bd_addr); 607 } 608 609 /** 610 * @brief Get field link_type from event HCI_EVENT_DATA_BUFFER_OVERFLOW 611 * @param event packet 612 * @return link_type 613 * @note: btstack_type 1 614 */ 615 static inline uint8_t hci_event_data_buffer_overflow_get_link_type(const uint8_t * event){ 616 return event[2]; 617 } 618 619 /** 620 * @brief Get field handle from event HCI_EVENT_MAX_SLOTS_CHANGED 621 * @param event packet 622 * @return handle 623 * @note: btstack_type H 624 */ 625 static inline hci_con_handle_t hci_event_max_slots_changed_get_handle(const uint8_t * event){ 626 return little_endian_read_16(event, 2); 627 } 628 /** 629 * @brief Get field lmp_max_slots from event HCI_EVENT_MAX_SLOTS_CHANGED 630 * @param event packet 631 * @return lmp_max_slots 632 * @note: btstack_type 1 633 */ 634 static inline uint8_t hci_event_max_slots_changed_get_lmp_max_slots(const uint8_t * event){ 635 return event[4]; 636 } 637 638 /** 639 * @brief Get field status from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 640 * @param event packet 641 * @return status 642 * @note: btstack_type 1 643 */ 644 static inline uint8_t hci_event_read_clock_offset_complete_get_status(const uint8_t * event){ 645 return event[2]; 646 } 647 /** 648 * @brief Get field handle from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 649 * @param event packet 650 * @return handle 651 * @note: btstack_type H 652 */ 653 static inline hci_con_handle_t hci_event_read_clock_offset_complete_get_handle(const uint8_t * event){ 654 return little_endian_read_16(event, 3); 655 } 656 /** 657 * @brief Get field clock_offset from event HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 658 * @param event packet 659 * @return clock_offset 660 * @note: btstack_type 2 661 */ 662 static inline uint16_t hci_event_read_clock_offset_complete_get_clock_offset(const uint8_t * event){ 663 return little_endian_read_16(event, 5); 664 } 665 666 /** 667 * @brief Get field status from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 668 * @param event packet 669 * @return status 670 * @note: btstack_type 1 671 */ 672 static inline uint8_t hci_event_connection_packet_type_changed_get_status(const uint8_t * event){ 673 return event[2]; 674 } 675 /** 676 * @brief Get field handle from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 677 * @param event packet 678 * @return handle 679 * @note: btstack_type H 680 */ 681 static inline hci_con_handle_t hci_event_connection_packet_type_changed_get_handle(const uint8_t * event){ 682 return little_endian_read_16(event, 3); 683 } 684 /** 685 * @brief Get field packet_types from event HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 686 * @param event packet 687 * @return packet_types 688 * @note: btstack_type 2 689 */ 690 static inline uint16_t hci_event_connection_packet_type_changed_get_packet_types(const uint8_t * event){ 691 return little_endian_read_16(event, 5); 692 } 693 694 /** 695 * @brief Get field num_responses from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 696 * @param event packet 697 * @return num_responses 698 * @note: btstack_type 1 699 */ 700 static inline uint8_t hci_event_inquiry_result_with_rssi_get_num_responses(const uint8_t * event){ 701 return event[2]; 702 } 703 /** 704 * @brief Get field bd_addr from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 705 * @param event packet 706 * @param Pointer to storage for bd_addr 707 * @note: btstack_type B 708 */ 709 static inline void hci_event_inquiry_result_with_rssi_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 710 reverse_bd_addr(&event[3], bd_addr); 711 } 712 /** 713 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 714 * @param event packet 715 * @return page_scan_repetition_mode 716 * @note: btstack_type 1 717 */ 718 static inline uint8_t hci_event_inquiry_result_with_rssi_get_page_scan_repetition_mode(const uint8_t * event){ 719 return event[9]; 720 } 721 /** 722 * @brief Get field reserved from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 723 * @param event packet 724 * @return reserved 725 * @note: btstack_type 1 726 */ 727 static inline uint8_t hci_event_inquiry_result_with_rssi_get_reserved(const uint8_t * event){ 728 return event[10]; 729 } 730 /** 731 * @brief Get field class_of_device from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 732 * @param event packet 733 * @return class_of_device 734 * @note: btstack_type 3 735 */ 736 static inline uint32_t hci_event_inquiry_result_with_rssi_get_class_of_device(const uint8_t * event){ 737 return little_endian_read_24(event, 11); 738 } 739 /** 740 * @brief Get field clock_offset from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 741 * @param event packet 742 * @return clock_offset 743 * @note: btstack_type 2 744 */ 745 static inline uint16_t hci_event_inquiry_result_with_rssi_get_clock_offset(const uint8_t * event){ 746 return little_endian_read_16(event, 14); 747 } 748 /** 749 * @brief Get field rssi from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 750 * @param event packet 751 * @return rssi 752 * @note: btstack_type 1 753 */ 754 static inline uint8_t hci_event_inquiry_result_with_rssi_get_rssi(const uint8_t * event){ 755 return event[16]; 756 } 757 758 /** 759 * @brief Get field status from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 760 * @param event packet 761 * @return status 762 * @note: btstack_type 1 763 */ 764 static inline uint8_t hci_event_synchronous_connection_complete_get_status(const uint8_t * event){ 765 return event[2]; 766 } 767 /** 768 * @brief Get field handle from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 769 * @param event packet 770 * @return handle 771 * @note: btstack_type H 772 */ 773 static inline hci_con_handle_t hci_event_synchronous_connection_complete_get_handle(const uint8_t * event){ 774 return little_endian_read_16(event, 3); 775 } 776 /** 777 * @brief Get field bd_addr from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 778 * @param event packet 779 * @param Pointer to storage for bd_addr 780 * @note: btstack_type B 781 */ 782 static inline void hci_event_synchronous_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 783 reverse_bd_addr(&event[5], bd_addr); 784 } 785 /** 786 * @brief Get field link_type from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 787 * @param event packet 788 * @return link_type 789 * @note: btstack_type 1 790 */ 791 static inline uint8_t hci_event_synchronous_connection_complete_get_link_type(const uint8_t * event){ 792 return event[11]; 793 } 794 /** 795 * @brief Get field transmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 796 * @param event packet 797 * @return transmission_interval 798 * @note: btstack_type 1 799 */ 800 static inline uint8_t hci_event_synchronous_connection_complete_get_transmission_interval(const uint8_t * event){ 801 return event[12]; 802 } 803 /** 804 * @brief Get field retransmission_interval from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 805 * @param event packet 806 * @return retransmission_interval 807 * @note: btstack_type 1 808 */ 809 static inline uint8_t hci_event_synchronous_connection_complete_get_retransmission_interval(const uint8_t * event){ 810 return event[13]; 811 } 812 /** 813 * @brief Get field rx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 814 * @param event packet 815 * @return rx_packet_length 816 * @note: btstack_type 2 817 */ 818 static inline uint16_t hci_event_synchronous_connection_complete_get_rx_packet_length(const uint8_t * event){ 819 return little_endian_read_16(event, 14); 820 } 821 /** 822 * @brief Get field tx_packet_length from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 823 * @param event packet 824 * @return tx_packet_length 825 * @note: btstack_type 2 826 */ 827 static inline uint16_t hci_event_synchronous_connection_complete_get_tx_packet_length(const uint8_t * event){ 828 return little_endian_read_16(event, 16); 829 } 830 /** 831 * @brief Get field air_mode from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 832 * @param event packet 833 * @return air_mode 834 * @note: btstack_type 1 835 */ 836 static inline uint8_t hci_event_synchronous_connection_complete_get_air_mode(const uint8_t * event){ 837 return event[18]; 838 } 839 840 /** 841 * @brief Get field num_responses from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 842 * @param event packet 843 * @return num_responses 844 * @note: btstack_type 1 845 */ 846 static inline uint8_t hci_event_extended_inquiry_response_get_num_responses(const uint8_t * event){ 847 return event[2]; 848 } 849 /** 850 * @brief Get field bd_addr from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 851 * @param event packet 852 * @param Pointer to storage for bd_addr 853 * @note: btstack_type B 854 */ 855 static inline void hci_event_extended_inquiry_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 856 reverse_bd_addr(&event[3], bd_addr); 857 } 858 /** 859 * @brief Get field page_scan_repetition_mode from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 860 * @param event packet 861 * @return page_scan_repetition_mode 862 * @note: btstack_type 1 863 */ 864 static inline uint8_t hci_event_extended_inquiry_response_get_page_scan_repetition_mode(const uint8_t * event){ 865 return event[9]; 866 } 867 /** 868 * @brief Get field reserved from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 869 * @param event packet 870 * @return reserved 871 * @note: btstack_type 1 872 */ 873 static inline uint8_t hci_event_extended_inquiry_response_get_reserved(const uint8_t * event){ 874 return event[10]; 875 } 876 /** 877 * @brief Get field class_of_device from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 878 * @param event packet 879 * @return class_of_device 880 * @note: btstack_type 3 881 */ 882 static inline uint32_t hci_event_extended_inquiry_response_get_class_of_device(const uint8_t * event){ 883 return little_endian_read_24(event, 11); 884 } 885 /** 886 * @brief Get field clock_offset from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 887 * @param event packet 888 * @return clock_offset 889 * @note: btstack_type 2 890 */ 891 static inline uint16_t hci_event_extended_inquiry_response_get_clock_offset(const uint8_t * event){ 892 return little_endian_read_16(event, 14); 893 } 894 /** 895 * @brief Get field rssi from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 896 * @param event packet 897 * @return rssi 898 * @note: btstack_type 1 899 */ 900 static inline uint8_t hci_event_extended_inquiry_response_get_rssi(const uint8_t * event){ 901 return event[16]; 902 } 903 904 /** 905 * @brief Get field status from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 906 * @param event packet 907 * @return status 908 * @note: btstack_type 1 909 */ 910 static inline uint8_t hci_event_encryption_key_refresh_complete_get_status(const uint8_t * event){ 911 return event[2]; 912 } 913 /** 914 * @brief Get field handle from event HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 915 * @param event packet 916 * @return handle 917 * @note: btstack_type H 918 */ 919 static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_handle(const uint8_t * event){ 920 return little_endian_read_16(event, 3); 921 } 922 923 /** 924 * @brief Get field bd_addr from event HCI_EVENT_USER_CONFIRMATION_REQUEST 925 * @param event packet 926 * @param Pointer to storage for bd_addr 927 * @note: btstack_type B 928 */ 929 static inline void hci_event_user_confirmation_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 930 reverse_bd_addr(&event[2], bd_addr); 931 } 932 /** 933 * @brief Get field numeric_value from event HCI_EVENT_USER_CONFIRMATION_REQUEST 934 * @param event packet 935 * @return numeric_value 936 * @note: btstack_type 4 937 */ 938 static inline uint32_t hci_event_user_confirmation_request_get_numeric_value(const uint8_t * event){ 939 return little_endian_read_32(event, 8); 940 } 941 942 /** 943 * @brief Get field bd_addr from event HCI_EVENT_USER_PASSKEY_REQUEST 944 * @param event packet 945 * @param Pointer to storage for bd_addr 946 * @note: btstack_type B 947 */ 948 static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 949 reverse_bd_addr(&event[2], bd_addr); 950 } 951 952 /** 953 * @brief Get field bd_addr from event HCI_EVENT_REMOTE_OOB_DATA_REQUEST 954 * @param event packet 955 * @param Pointer to storage for bd_addr 956 * @note: btstack_type B 957 */ 958 static inline void hci_event_remote_oob_data_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 959 reverse_bd_addr(&event[2], bd_addr); 960 } 961 962 /** 963 * @brief Get field status from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 964 * @param event packet 965 * @return status 966 * @note: btstack_type 1 967 */ 968 static inline uint8_t hci_event_simple_pairing_complete_get_status(const uint8_t * event){ 969 return event[2]; 970 } 971 /** 972 * @brief Get field bd_addr from event HCI_EVENT_SIMPLE_PAIRING_COMPLETE 973 * @param event packet 974 * @param Pointer to storage for bd_addr 975 * @note: btstack_type B 976 */ 977 static inline void hci_event_simple_pairing_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 978 reverse_bd_addr(&event[3], bd_addr); 979 } 980 981 /** 982 * @brief Get field state from event BTSTACK_EVENT_STATE 983 * @param event packet 984 * @return state 985 * @note: btstack_type 1 986 */ 987 static inline uint8_t btstack_event_state_get_state(const uint8_t * event){ 988 return event[2]; 989 } 990 991 /** 992 * @brief Get field number_connections from event BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 993 * @param event packet 994 * @return number_connections 995 * @note: btstack_type 1 996 */ 997 static inline uint8_t btstack_event_nr_connections_changed_get_number_connections(const uint8_t * event){ 998 return event[2]; 999 } 1000 1001 1002 /** 1003 * @brief Get field discoverable from event BTSTACK_EVENT_DISCOVERABLE_ENABLED 1004 * @param event packet 1005 * @return discoverable 1006 * @note: btstack_type 1 1007 */ 1008 static inline uint8_t btstack_event_discoverable_enabled_get_discoverable(const uint8_t * event){ 1009 return event[2]; 1010 } 1011 1012 /** 1013 * @brief Get field active from event HCI_EVENT_TRANSPORT_SLEEP_MODE 1014 * @param event packet 1015 * @return active 1016 * @note: btstack_type 1 1017 */ 1018 static inline uint8_t hci_event_transport_sleep_mode_get_active(const uint8_t * event){ 1019 return event[2]; 1020 } 1021 1022 /** 1023 * @brief Get field handle from event HCI_EVENT_SCO_CAN_SEND_NOW 1024 * @param event packet 1025 * @param Pointer to storage for handle 1026 * @note: btstack_type B 1027 */ 1028 static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){ 1029 reverse_bd_addr(&event[2], handle); 1030 } 1031 1032 /** 1033 * @brief Get field status from event L2CAP_EVENT_CHANNEL_OPENED 1034 * @param event packet 1035 * @return status 1036 * @note: btstack_type 1 1037 */ 1038 static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * event){ 1039 return event[2]; 1040 } 1041 /** 1042 * @brief Get field address from event L2CAP_EVENT_CHANNEL_OPENED 1043 * @param event packet 1044 * @param Pointer to storage for address 1045 * @note: btstack_type B 1046 */ 1047 static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1048 reverse_bd_addr(&event[3], address); 1049 } 1050 /** 1051 * @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED 1052 * @param event packet 1053 * @return handle 1054 * @note: btstack_type H 1055 */ 1056 static inline hci_con_handle_t l2cap_event_channel_opened_get_handle(const uint8_t * event){ 1057 return little_endian_read_16(event, 9); 1058 } 1059 /** 1060 * @brief Get field psm from event L2CAP_EVENT_CHANNEL_OPENED 1061 * @param event packet 1062 * @return psm 1063 * @note: btstack_type 2 1064 */ 1065 static inline uint16_t l2cap_event_channel_opened_get_psm(const uint8_t * event){ 1066 return little_endian_read_16(event, 11); 1067 } 1068 /** 1069 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_OPENED 1070 * @param event packet 1071 * @return local_cid 1072 * @note: btstack_type 2 1073 */ 1074 static inline uint16_t l2cap_event_channel_opened_get_local_cid(const uint8_t * event){ 1075 return little_endian_read_16(event, 13); 1076 } 1077 /** 1078 * @brief Get field remote_cid from event L2CAP_EVENT_CHANNEL_OPENED 1079 * @param event packet 1080 * @return remote_cid 1081 * @note: btstack_type 2 1082 */ 1083 static inline uint16_t l2cap_event_channel_opened_get_remote_cid(const uint8_t * event){ 1084 return little_endian_read_16(event, 15); 1085 } 1086 /** 1087 * @brief Get field local_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1088 * @param event packet 1089 * @return local_mtu 1090 * @note: btstack_type 2 1091 */ 1092 static inline uint16_t l2cap_event_channel_opened_get_local_mtu(const uint8_t * event){ 1093 return little_endian_read_16(event, 17); 1094 } 1095 /** 1096 * @brief Get field remote_mtu from event L2CAP_EVENT_CHANNEL_OPENED 1097 * @param event packet 1098 * @return remote_mtu 1099 * @note: btstack_type 2 1100 */ 1101 static inline uint16_t l2cap_event_channel_opened_get_remote_mtu(const uint8_t * event){ 1102 return little_endian_read_16(event, 19); 1103 } 1104 /** 1105 * @brief Get field flush_timeout from event L2CAP_EVENT_CHANNEL_OPENED 1106 * @param event packet 1107 * @return flush_timeout 1108 * @note: btstack_type 2 1109 */ 1110 static inline uint16_t l2cap_event_channel_opened_get_flush_timeout(const uint8_t * event){ 1111 return little_endian_read_16(event, 21); 1112 } 1113 /** 1114 * @brief Get field incoming from event L2CAP_EVENT_CHANNEL_OPENED 1115 * @param event packet 1116 * @return incoming 1117 * @note: btstack_type 1 1118 */ 1119 static inline uint8_t l2cap_event_channel_opened_get_incoming(const uint8_t * event){ 1120 return event[23]; 1121 } 1122 1123 /** 1124 * @brief Get field local_cid from event L2CAP_EVENT_CHANNEL_CLOSED 1125 * @param event packet 1126 * @return local_cid 1127 * @note: btstack_type 2 1128 */ 1129 static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t * event){ 1130 return little_endian_read_16(event, 2); 1131 } 1132 1133 /** 1134 * @brief Get field address from event L2CAP_EVENT_INCOMING_CONNECTION 1135 * @param event packet 1136 * @param Pointer to storage for address 1137 * @note: btstack_type B 1138 */ 1139 static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1140 reverse_bd_addr(&event[2], address); 1141 } 1142 /** 1143 * @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION 1144 * @param event packet 1145 * @return handle 1146 * @note: btstack_type H 1147 */ 1148 static inline hci_con_handle_t l2cap_event_incoming_connection_get_handle(const uint8_t * event){ 1149 return little_endian_read_16(event, 8); 1150 } 1151 /** 1152 * @brief Get field psm from event L2CAP_EVENT_INCOMING_CONNECTION 1153 * @param event packet 1154 * @return psm 1155 * @note: btstack_type 2 1156 */ 1157 static inline uint16_t l2cap_event_incoming_connection_get_psm(const uint8_t * event){ 1158 return little_endian_read_16(event, 10); 1159 } 1160 /** 1161 * @brief Get field local_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1162 * @param event packet 1163 * @return local_cid 1164 * @note: btstack_type 2 1165 */ 1166 static inline uint16_t l2cap_event_incoming_connection_get_local_cid(const uint8_t * event){ 1167 return little_endian_read_16(event, 12); 1168 } 1169 /** 1170 * @brief Get field remote_cid from event L2CAP_EVENT_INCOMING_CONNECTION 1171 * @param event packet 1172 * @return remote_cid 1173 * @note: btstack_type 2 1174 */ 1175 static inline uint16_t l2cap_event_incoming_connection_get_remote_cid(const uint8_t * event){ 1176 return little_endian_read_16(event, 14); 1177 } 1178 1179 /** 1180 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1181 * @param event packet 1182 * @return handle 1183 * @note: btstack_type H 1184 */ 1185 static inline hci_con_handle_t l2cap_event_connection_parameter_update_request_get_handle(const uint8_t * event){ 1186 return little_endian_read_16(event, 2); 1187 } 1188 /** 1189 * @brief Get field interval_min from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1190 * @param event packet 1191 * @return interval_min 1192 * @note: btstack_type 2 1193 */ 1194 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_min(const uint8_t * event){ 1195 return little_endian_read_16(event, 4); 1196 } 1197 /** 1198 * @brief Get field interval_max from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1199 * @param event packet 1200 * @return interval_max 1201 * @note: btstack_type 2 1202 */ 1203 static inline uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(const uint8_t * event){ 1204 return little_endian_read_16(event, 6); 1205 } 1206 /** 1207 * @brief Get field latencey from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1208 * @param event packet 1209 * @return latencey 1210 * @note: btstack_type 2 1211 */ 1212 static inline uint16_t l2cap_event_connection_parameter_update_request_get_latencey(const uint8_t * event){ 1213 return little_endian_read_16(event, 8); 1214 } 1215 /** 1216 * @brief Get field timeout_multiplier from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 1217 * @param event packet 1218 * @return timeout_multiplier 1219 * @note: btstack_type 2 1220 */ 1221 static inline uint16_t l2cap_event_connection_parameter_update_request_get_timeout_multiplier(const uint8_t * event){ 1222 return little_endian_read_16(event, 10); 1223 } 1224 1225 /** 1226 * @brief Get field handle from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1227 * @param event packet 1228 * @return handle 1229 * @note: btstack_type H 1230 */ 1231 static inline hci_con_handle_t l2cap_event_connection_parameter_update_response_get_handle(const uint8_t * event){ 1232 return little_endian_read_16(event, 2); 1233 } 1234 /** 1235 * @brief Get field result from event L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 1236 * @param event packet 1237 * @return result 1238 * @note: btstack_type 2 1239 */ 1240 static inline uint16_t l2cap_event_connection_parameter_update_response_get_result(const uint8_t * event){ 1241 return little_endian_read_16(event, 4); 1242 } 1243 1244 /** 1245 * @brief Get field local_cid from event L2CAP_EVENT_CAN_SEND_NOW 1246 * @param event packet 1247 * @return local_cid 1248 * @note: btstack_type 2 1249 */ 1250 static inline uint16_t l2cap_event_can_send_now_get_local_cid(const uint8_t * event){ 1251 return little_endian_read_16(event, 2); 1252 } 1253 1254 /** 1255 * @brief Get field address_type from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1256 * @param event packet 1257 * @return address_type 1258 * @note: btstack_type 1 1259 */ 1260 static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const uint8_t * event){ 1261 return event[2]; 1262 } 1263 /** 1264 * @brief Get field address from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1265 * @param event packet 1266 * @param Pointer to storage for address 1267 * @note: btstack_type B 1268 */ 1269 static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){ 1270 reverse_bd_addr(&event[3], address); 1271 } 1272 /** 1273 * @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1274 * @param event packet 1275 * @return handle 1276 * @note: btstack_type H 1277 */ 1278 static inline hci_con_handle_t l2cap_event_le_incoming_connection_get_handle(const uint8_t * event){ 1279 return little_endian_read_16(event, 9); 1280 } 1281 /** 1282 * @brief Get field psm from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1283 * @param event packet 1284 * @return psm 1285 * @note: btstack_type 2 1286 */ 1287 static inline uint16_t l2cap_event_le_incoming_connection_get_psm(const uint8_t * event){ 1288 return little_endian_read_16(event, 11); 1289 } 1290 /** 1291 * @brief Get field local_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1292 * @param event packet 1293 * @return local_cid 1294 * @note: btstack_type 2 1295 */ 1296 static inline uint16_t l2cap_event_le_incoming_connection_get_local_cid(const uint8_t * event){ 1297 return little_endian_read_16(event, 13); 1298 } 1299 /** 1300 * @brief Get field remote_cid from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1301 * @param event packet 1302 * @return remote_cid 1303 * @note: btstack_type 2 1304 */ 1305 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_cid(const uint8_t * event){ 1306 return little_endian_read_16(event, 15); 1307 } 1308 /** 1309 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_INCOMING_CONNECTION 1310 * @param event packet 1311 * @return remote_mtu 1312 * @note: btstack_type 2 1313 */ 1314 static inline uint16_t l2cap_event_le_incoming_connection_get_remote_mtu(const uint8_t * event){ 1315 return little_endian_read_16(event, 17); 1316 } 1317 1318 /** 1319 * @brief Get field status from event L2CAP_EVENT_LE_CHANNEL_OPENED 1320 * @param event packet 1321 * @return status 1322 * @note: btstack_type 1 1323 */ 1324 static inline uint8_t l2cap_event_le_channel_opened_get_status(const uint8_t * event){ 1325 return event[2]; 1326 } 1327 /** 1328 * @brief Get field address_type from event L2CAP_EVENT_LE_CHANNEL_OPENED 1329 * @param event packet 1330 * @return address_type 1331 * @note: btstack_type 1 1332 */ 1333 static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8_t * event){ 1334 return event[3]; 1335 } 1336 /** 1337 * @brief Get field address from event L2CAP_EVENT_LE_CHANNEL_OPENED 1338 * @param event packet 1339 * @param Pointer to storage for address 1340 * @note: btstack_type B 1341 */ 1342 static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){ 1343 reverse_bd_addr(&event[4], address); 1344 } 1345 /** 1346 * @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED 1347 * @param event packet 1348 * @return handle 1349 * @note: btstack_type H 1350 */ 1351 static inline hci_con_handle_t l2cap_event_le_channel_opened_get_handle(const uint8_t * event){ 1352 return little_endian_read_16(event, 10); 1353 } 1354 /** 1355 * @brief Get field incoming from event L2CAP_EVENT_LE_CHANNEL_OPENED 1356 * @param event packet 1357 * @return incoming 1358 * @note: btstack_type 1 1359 */ 1360 static inline uint8_t l2cap_event_le_channel_opened_get_incoming(const uint8_t * event){ 1361 return event[12]; 1362 } 1363 /** 1364 * @brief Get field psm from event L2CAP_EVENT_LE_CHANNEL_OPENED 1365 * @param event packet 1366 * @return psm 1367 * @note: btstack_type 2 1368 */ 1369 static inline uint16_t l2cap_event_le_channel_opened_get_psm(const uint8_t * event){ 1370 return little_endian_read_16(event, 13); 1371 } 1372 /** 1373 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1374 * @param event packet 1375 * @return local_cid 1376 * @note: btstack_type 2 1377 */ 1378 static inline uint16_t l2cap_event_le_channel_opened_get_local_cid(const uint8_t * event){ 1379 return little_endian_read_16(event, 15); 1380 } 1381 /** 1382 * @brief Get field remote_cid from event L2CAP_EVENT_LE_CHANNEL_OPENED 1383 * @param event packet 1384 * @return remote_cid 1385 * @note: btstack_type 2 1386 */ 1387 static inline uint16_t l2cap_event_le_channel_opened_get_remote_cid(const uint8_t * event){ 1388 return little_endian_read_16(event, 17); 1389 } 1390 /** 1391 * @brief Get field local_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1392 * @param event packet 1393 * @return local_mtu 1394 * @note: btstack_type 2 1395 */ 1396 static inline uint16_t l2cap_event_le_channel_opened_get_local_mtu(const uint8_t * event){ 1397 return little_endian_read_16(event, 19); 1398 } 1399 /** 1400 * @brief Get field remote_mtu from event L2CAP_EVENT_LE_CHANNEL_OPENED 1401 * @param event packet 1402 * @return remote_mtu 1403 * @note: btstack_type 2 1404 */ 1405 static inline uint16_t l2cap_event_le_channel_opened_get_remote_mtu(const uint8_t * event){ 1406 return little_endian_read_16(event, 21); 1407 } 1408 1409 /** 1410 * @brief Get field local_cid from event L2CAP_EVENT_LE_CHANNEL_CLOSED 1411 * @param event packet 1412 * @return local_cid 1413 * @note: btstack_type 2 1414 */ 1415 static inline uint16_t l2cap_event_le_channel_closed_get_local_cid(const uint8_t * event){ 1416 return little_endian_read_16(event, 2); 1417 } 1418 1419 /** 1420 * @brief Get field local_cid from event L2CAP_EVENT_LE_CAN_SEND_NOW 1421 * @param event packet 1422 * @return local_cid 1423 * @note: btstack_type 2 1424 */ 1425 static inline uint16_t l2cap_event_le_can_send_now_get_local_cid(const uint8_t * event){ 1426 return little_endian_read_16(event, 2); 1427 } 1428 1429 /** 1430 * @brief Get field local_cid from event L2CAP_EVENT_LE_PACKET_SENT 1431 * @param event packet 1432 * @return local_cid 1433 * @note: btstack_type 2 1434 */ 1435 static inline uint16_t l2cap_event_le_packet_sent_get_local_cid(const uint8_t * event){ 1436 return little_endian_read_16(event, 2); 1437 } 1438 1439 /** 1440 * @brief Get field status from event RFCOMM_EVENT_CHANNEL_OPENED 1441 * @param event packet 1442 * @return status 1443 * @note: btstack_type 1 1444 */ 1445 static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * event){ 1446 return event[2]; 1447 } 1448 /** 1449 * @brief Get field bd_addr from event RFCOMM_EVENT_CHANNEL_OPENED 1450 * @param event packet 1451 * @param Pointer to storage for bd_addr 1452 * @note: btstack_type B 1453 */ 1454 static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1455 reverse_bd_addr(&event[3], bd_addr); 1456 } 1457 /** 1458 * @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED 1459 * @param event packet 1460 * @return con_handle 1461 * @note: btstack_type 2 1462 */ 1463 static inline uint16_t rfcomm_event_channel_opened_get_con_handle(const uint8_t * event){ 1464 return little_endian_read_16(event, 9); 1465 } 1466 /** 1467 * @brief Get field server_channel from event RFCOMM_EVENT_CHANNEL_OPENED 1468 * @param event packet 1469 * @return server_channel 1470 * @note: btstack_type 1 1471 */ 1472 static inline uint8_t rfcomm_event_channel_opened_get_server_channel(const uint8_t * event){ 1473 return event[11]; 1474 } 1475 /** 1476 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_OPENED 1477 * @param event packet 1478 * @return rfcomm_cid 1479 * @note: btstack_type 2 1480 */ 1481 static inline uint16_t rfcomm_event_channel_opened_get_rfcomm_cid(const uint8_t * event){ 1482 return little_endian_read_16(event, 12); 1483 } 1484 /** 1485 * @brief Get field max_frame_size from event RFCOMM_EVENT_CHANNEL_OPENED 1486 * @param event packet 1487 * @return max_frame_size 1488 * @note: btstack_type 2 1489 */ 1490 static inline uint16_t rfcomm_event_channel_opened_get_max_frame_size(const uint8_t * event){ 1491 return little_endian_read_16(event, 14); 1492 } 1493 /** 1494 * @brief Get field incoming from event RFCOMM_EVENT_CHANNEL_OPENED 1495 * @param event packet 1496 * @return incoming 1497 * @note: btstack_type 1 1498 */ 1499 static inline uint8_t rfcomm_event_channel_opened_get_incoming(const uint8_t * event){ 1500 return event[16]; 1501 } 1502 1503 /** 1504 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CHANNEL_CLOSED 1505 * @param event packet 1506 * @return rfcomm_cid 1507 * @note: btstack_type 2 1508 */ 1509 static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t * event){ 1510 return little_endian_read_16(event, 2); 1511 } 1512 1513 /** 1514 * @brief Get field bd_addr from event RFCOMM_EVENT_INCOMING_CONNECTION 1515 * @param event packet 1516 * @param Pointer to storage for bd_addr 1517 * @note: btstack_type B 1518 */ 1519 static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 1520 reverse_bd_addr(&event[2], bd_addr); 1521 } 1522 /** 1523 * @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION 1524 * @param event packet 1525 * @return server_channel 1526 * @note: btstack_type 1 1527 */ 1528 static inline uint8_t rfcomm_event_incoming_connection_get_server_channel(const uint8_t * event){ 1529 return event[8]; 1530 } 1531 /** 1532 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_INCOMING_CONNECTION 1533 * @param event packet 1534 * @return rfcomm_cid 1535 * @note: btstack_type 2 1536 */ 1537 static inline uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t * event){ 1538 return little_endian_read_16(event, 9); 1539 } 1540 1541 /** 1542 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1543 * @param event packet 1544 * @return rfcomm_cid 1545 * @note: btstack_type 2 1546 */ 1547 static inline uint16_t rfcomm_event_remote_line_status_get_rfcomm_cid(const uint8_t * event){ 1548 return little_endian_read_16(event, 2); 1549 } 1550 /** 1551 * @brief Get field line_status from event RFCOMM_EVENT_REMOTE_LINE_STATUS 1552 * @param event packet 1553 * @return line_status 1554 * @note: btstack_type 1 1555 */ 1556 static inline uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t * event){ 1557 return event[4]; 1558 } 1559 1560 /** 1561 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1562 * @param event packet 1563 * @return rfcomm_cid 1564 * @note: btstack_type 2 1565 */ 1566 static inline uint16_t rfcomm_event_remote_modem_status_get_rfcomm_cid(const uint8_t * event){ 1567 return little_endian_read_16(event, 2); 1568 } 1569 /** 1570 * @brief Get field modem_status from event RFCOMM_EVENT_REMOTE_MODEM_STATUS 1571 * @param event packet 1572 * @return modem_status 1573 * @note: btstack_type 1 1574 */ 1575 static inline uint8_t rfcomm_event_remote_modem_status_get_modem_status(const uint8_t * event){ 1576 return event[4]; 1577 } 1578 1579 /** 1580 * @brief Get field rfcomm_cid from event RFCOMM_EVENT_CAN_SEND_NOW 1581 * @param event packet 1582 * @return rfcomm_cid 1583 * @note: btstack_type 2 1584 */ 1585 static inline uint16_t rfcomm_event_can_send_now_get_rfcomm_cid(const uint8_t * event){ 1586 return little_endian_read_16(event, 2); 1587 } 1588 1589 /** 1590 * @brief Get field status from event SDP_EVENT_QUERY_COMPLETE 1591 * @param event packet 1592 * @return status 1593 * @note: btstack_type 1 1594 */ 1595 static inline uint8_t sdp_event_query_complete_get_status(const uint8_t * event){ 1596 return event[2]; 1597 } 1598 1599 /** 1600 * @brief Get field rfcomm_channel from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1601 * @param event packet 1602 * @return rfcomm_channel 1603 * @note: btstack_type 1 1604 */ 1605 static inline uint8_t sdp_event_query_rfcomm_service_get_rfcomm_channel(const uint8_t * event){ 1606 return event[2]; 1607 } 1608 /** 1609 * @brief Get field name from event SDP_EVENT_QUERY_RFCOMM_SERVICE 1610 * @param event packet 1611 * @return name 1612 * @note: btstack_type T 1613 */ 1614 static inline const char * sdp_event_query_rfcomm_service_get_name(const uint8_t * event){ 1615 return (const char *) &event[3]; 1616 } 1617 1618 /** 1619 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1620 * @param event packet 1621 * @return record_id 1622 * @note: btstack_type 2 1623 */ 1624 static inline uint16_t sdp_event_query_attribute_byte_get_record_id(const uint8_t * event){ 1625 return little_endian_read_16(event, 2); 1626 } 1627 /** 1628 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1629 * @param event packet 1630 * @return attribute_id 1631 * @note: btstack_type 2 1632 */ 1633 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_id(const uint8_t * event){ 1634 return little_endian_read_16(event, 4); 1635 } 1636 /** 1637 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1638 * @param event packet 1639 * @return attribute_length 1640 * @note: btstack_type 2 1641 */ 1642 static inline uint16_t sdp_event_query_attribute_byte_get_attribute_length(const uint8_t * event){ 1643 return little_endian_read_16(event, 6); 1644 } 1645 /** 1646 * @brief Get field data_offset from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1647 * @param event packet 1648 * @return data_offset 1649 * @note: btstack_type 2 1650 */ 1651 static inline uint16_t sdp_event_query_attribute_byte_get_data_offset(const uint8_t * event){ 1652 return little_endian_read_16(event, 8); 1653 } 1654 /** 1655 * @brief Get field data from event SDP_EVENT_QUERY_ATTRIBUTE_BYTE 1656 * @param event packet 1657 * @return data 1658 * @note: btstack_type 1 1659 */ 1660 static inline uint8_t sdp_event_query_attribute_byte_get_data(const uint8_t * event){ 1661 return event[10]; 1662 } 1663 1664 /** 1665 * @brief Get field record_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1666 * @param event packet 1667 * @return record_id 1668 * @note: btstack_type 2 1669 */ 1670 static inline uint16_t sdp_event_query_attribute_value_get_record_id(const uint8_t * event){ 1671 return little_endian_read_16(event, 2); 1672 } 1673 /** 1674 * @brief Get field attribute_id from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1675 * @param event packet 1676 * @return attribute_id 1677 * @note: btstack_type 2 1678 */ 1679 static inline uint16_t sdp_event_query_attribute_value_get_attribute_id(const uint8_t * event){ 1680 return little_endian_read_16(event, 4); 1681 } 1682 /** 1683 * @brief Get field attribute_length from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1684 * @param event packet 1685 * @return attribute_length 1686 * @note: btstack_type L 1687 */ 1688 static inline int sdp_event_query_attribute_value_get_attribute_length(const uint8_t * event){ 1689 return little_endian_read_16(event, 6); 1690 } 1691 /** 1692 * @brief Get field attribute_value from event SDP_EVENT_QUERY_ATTRIBUTE_VALUE 1693 * @param event packet 1694 * @return attribute_value 1695 * @note: btstack_type V 1696 */ 1697 static inline const uint8_t * sdp_event_query_attribute_value_get_attribute_value(const uint8_t * event){ 1698 return &event[8]; 1699 } 1700 1701 /** 1702 * @brief Get field total_count from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1703 * @param event packet 1704 * @return total_count 1705 * @note: btstack_type 2 1706 */ 1707 static inline uint16_t sdp_event_query_service_record_handle_get_total_count(const uint8_t * event){ 1708 return little_endian_read_16(event, 2); 1709 } 1710 /** 1711 * @brief Get field record_index from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1712 * @param event packet 1713 * @return record_index 1714 * @note: btstack_type 2 1715 */ 1716 static inline uint16_t sdp_event_query_service_record_handle_get_record_index(const uint8_t * event){ 1717 return little_endian_read_16(event, 4); 1718 } 1719 /** 1720 * @brief Get field record_handle from event SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 1721 * @param event packet 1722 * @return record_handle 1723 * @note: btstack_type 4 1724 */ 1725 static inline uint32_t sdp_event_query_service_record_handle_get_record_handle(const uint8_t * event){ 1726 return little_endian_read_32(event, 6); 1727 } 1728 1729 #ifdef ENABLE_BLE 1730 /** 1731 * @brief Get field handle from event GATT_EVENT_QUERY_COMPLETE 1732 * @param event packet 1733 * @return handle 1734 * @note: btstack_type H 1735 */ 1736 static inline hci_con_handle_t gatt_event_query_complete_get_handle(const uint8_t * event){ 1737 return little_endian_read_16(event, 2); 1738 } 1739 /** 1740 * @brief Get field status from event GATT_EVENT_QUERY_COMPLETE 1741 * @param event packet 1742 * @return status 1743 * @note: btstack_type 1 1744 */ 1745 static inline uint8_t gatt_event_query_complete_get_status(const uint8_t * event){ 1746 return event[4]; 1747 } 1748 #endif 1749 1750 #ifdef ENABLE_BLE 1751 /** 1752 * @brief Get field handle from event GATT_EVENT_SERVICE_QUERY_RESULT 1753 * @param event packet 1754 * @return handle 1755 * @note: btstack_type H 1756 */ 1757 static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const uint8_t * event){ 1758 return little_endian_read_16(event, 2); 1759 } 1760 /** 1761 * @brief Get field service from event GATT_EVENT_SERVICE_QUERY_RESULT 1762 * @param event packet 1763 * @param Pointer to storage for service 1764 * @note: btstack_type X 1765 */ 1766 static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 1767 gatt_client_deserialize_service(event, 4, service); 1768 } 1769 #endif 1770 1771 #ifdef ENABLE_BLE 1772 /** 1773 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1774 * @param event packet 1775 * @return handle 1776 * @note: btstack_type H 1777 */ 1778 static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle(const uint8_t * event){ 1779 return little_endian_read_16(event, 2); 1780 } 1781 /** 1782 * @brief Get field characteristic from event GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 1783 * @param event packet 1784 * @param Pointer to storage for characteristic 1785 * @note: btstack_type Y 1786 */ 1787 static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){ 1788 gatt_client_deserialize_characteristic(event, 4, characteristic); 1789 } 1790 #endif 1791 1792 #ifdef ENABLE_BLE 1793 /** 1794 * @brief Get field handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1795 * @param event packet 1796 * @return handle 1797 * @note: btstack_type H 1798 */ 1799 static inline hci_con_handle_t gatt_event_included_service_query_result_get_handle(const uint8_t * event){ 1800 return little_endian_read_16(event, 2); 1801 } 1802 /** 1803 * @brief Get field include_handle from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1804 * @param event packet 1805 * @return include_handle 1806 * @note: btstack_type 2 1807 */ 1808 static inline uint16_t gatt_event_included_service_query_result_get_include_handle(const uint8_t * event){ 1809 return little_endian_read_16(event, 4); 1810 } 1811 /** 1812 * @brief Get field service from event GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 1813 * @param event packet 1814 * @param Pointer to storage for service 1815 * @note: btstack_type X 1816 */ 1817 static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){ 1818 gatt_client_deserialize_service(event, 6, service); 1819 } 1820 #endif 1821 1822 #ifdef ENABLE_BLE 1823 /** 1824 * @brief Get field handle from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 1825 * @param event packet 1826 * @return handle 1827 * @note: btstack_type H 1828 */ 1829 static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_result_get_handle(const uint8_t * event){ 1830 return little_endian_read_16(event, 2); 1831 } 1832 /** 1833 * @brief Get field characteristic_descriptor from event GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 1834 * @param event packet 1835 * @param Pointer to storage for characteristic_descriptor 1836 * @note: btstack_type Z 1837 */ 1838 static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){ 1839 gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor); 1840 } 1841 #endif 1842 1843 #ifdef ENABLE_BLE 1844 /** 1845 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1846 * @param event packet 1847 * @return handle 1848 * @note: btstack_type H 1849 */ 1850 static inline hci_con_handle_t gatt_event_characteristic_value_query_result_get_handle(const uint8_t * event){ 1851 return little_endian_read_16(event, 2); 1852 } 1853 /** 1854 * @brief Get field value_handle from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1855 * @param event packet 1856 * @return value_handle 1857 * @note: btstack_type 2 1858 */ 1859 static inline uint16_t gatt_event_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 1860 return little_endian_read_16(event, 4); 1861 } 1862 /** 1863 * @brief Get field value_length from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1864 * @param event packet 1865 * @return value_length 1866 * @note: btstack_type L 1867 */ 1868 static inline int gatt_event_characteristic_value_query_result_get_value_length(const uint8_t * event){ 1869 return little_endian_read_16(event, 6); 1870 } 1871 /** 1872 * @brief Get field value from event GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 1873 * @param event packet 1874 * @return value 1875 * @note: btstack_type V 1876 */ 1877 static inline const uint8_t * gatt_event_characteristic_value_query_result_get_value(const uint8_t * event){ 1878 return &event[8]; 1879 } 1880 #endif 1881 1882 #ifdef ENABLE_BLE 1883 /** 1884 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1885 * @param event packet 1886 * @return handle 1887 * @note: btstack_type H 1888 */ 1889 static inline hci_con_handle_t gatt_event_long_characteristic_value_query_result_get_handle(const uint8_t * event){ 1890 return little_endian_read_16(event, 2); 1891 } 1892 /** 1893 * @brief Get field value_handle from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1894 * @param event packet 1895 * @return value_handle 1896 * @note: btstack_type 2 1897 */ 1898 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_handle(const uint8_t * event){ 1899 return little_endian_read_16(event, 4); 1900 } 1901 /** 1902 * @brief Get field value_offset from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1903 * @param event packet 1904 * @return value_offset 1905 * @note: btstack_type 2 1906 */ 1907 static inline uint16_t gatt_event_long_characteristic_value_query_result_get_value_offset(const uint8_t * event){ 1908 return little_endian_read_16(event, 6); 1909 } 1910 /** 1911 * @brief Get field value_length from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1912 * @param event packet 1913 * @return value_length 1914 * @note: btstack_type L 1915 */ 1916 static inline int gatt_event_long_characteristic_value_query_result_get_value_length(const uint8_t * event){ 1917 return little_endian_read_16(event, 8); 1918 } 1919 /** 1920 * @brief Get field value from event GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 1921 * @param event packet 1922 * @return value 1923 * @note: btstack_type V 1924 */ 1925 static inline const uint8_t * gatt_event_long_characteristic_value_query_result_get_value(const uint8_t * event){ 1926 return &event[10]; 1927 } 1928 #endif 1929 1930 #ifdef ENABLE_BLE 1931 /** 1932 * @brief Get field handle from event GATT_EVENT_NOTIFICATION 1933 * @param event packet 1934 * @return handle 1935 * @note: btstack_type H 1936 */ 1937 static inline hci_con_handle_t gatt_event_notification_get_handle(const uint8_t * event){ 1938 return little_endian_read_16(event, 2); 1939 } 1940 /** 1941 * @brief Get field value_handle from event GATT_EVENT_NOTIFICATION 1942 * @param event packet 1943 * @return value_handle 1944 * @note: btstack_type 2 1945 */ 1946 static inline uint16_t gatt_event_notification_get_value_handle(const uint8_t * event){ 1947 return little_endian_read_16(event, 4); 1948 } 1949 /** 1950 * @brief Get field value_length from event GATT_EVENT_NOTIFICATION 1951 * @param event packet 1952 * @return value_length 1953 * @note: btstack_type L 1954 */ 1955 static inline int gatt_event_notification_get_value_length(const uint8_t * event){ 1956 return little_endian_read_16(event, 6); 1957 } 1958 /** 1959 * @brief Get field value from event GATT_EVENT_NOTIFICATION 1960 * @param event packet 1961 * @return value 1962 * @note: btstack_type V 1963 */ 1964 static inline const uint8_t * gatt_event_notification_get_value(const uint8_t * event){ 1965 return &event[8]; 1966 } 1967 #endif 1968 1969 #ifdef ENABLE_BLE 1970 /** 1971 * @brief Get field handle from event GATT_EVENT_INDICATION 1972 * @param event packet 1973 * @return handle 1974 * @note: btstack_type H 1975 */ 1976 static inline hci_con_handle_t gatt_event_indication_get_handle(const uint8_t * event){ 1977 return little_endian_read_16(event, 2); 1978 } 1979 /** 1980 * @brief Get field value_handle from event GATT_EVENT_INDICATION 1981 * @param event packet 1982 * @return value_handle 1983 * @note: btstack_type 2 1984 */ 1985 static inline uint16_t gatt_event_indication_get_value_handle(const uint8_t * event){ 1986 return little_endian_read_16(event, 4); 1987 } 1988 /** 1989 * @brief Get field value_length from event GATT_EVENT_INDICATION 1990 * @param event packet 1991 * @return value_length 1992 * @note: btstack_type L 1993 */ 1994 static inline int gatt_event_indication_get_value_length(const uint8_t * event){ 1995 return little_endian_read_16(event, 6); 1996 } 1997 /** 1998 * @brief Get field value from event GATT_EVENT_INDICATION 1999 * @param event packet 2000 * @return value 2001 * @note: btstack_type V 2002 */ 2003 static inline const uint8_t * gatt_event_indication_get_value(const uint8_t * event){ 2004 return &event[8]; 2005 } 2006 #endif 2007 2008 #ifdef ENABLE_BLE 2009 /** 2010 * @brief Get field handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2011 * @param event packet 2012 * @return handle 2013 * @note: btstack_type H 2014 */ 2015 static inline hci_con_handle_t gatt_event_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2016 return little_endian_read_16(event, 2); 2017 } 2018 /** 2019 * @brief Get field descriptor_handle from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2020 * @param event packet 2021 * @return descriptor_handle 2022 * @note: btstack_type 2 2023 */ 2024 static inline uint16_t gatt_event_characteristic_descriptor_query_result_get_descriptor_handle(const uint8_t * event){ 2025 return little_endian_read_16(event, 4); 2026 } 2027 /** 2028 * @brief Get field descriptor_length from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2029 * @param event packet 2030 * @return descriptor_length 2031 * @note: btstack_type L 2032 */ 2033 static inline int gatt_event_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2034 return little_endian_read_16(event, 6); 2035 } 2036 /** 2037 * @brief Get field descriptor from event GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2038 * @param event packet 2039 * @return descriptor 2040 * @note: btstack_type V 2041 */ 2042 static inline const uint8_t * gatt_event_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2043 return &event[8]; 2044 } 2045 #endif 2046 2047 #ifdef ENABLE_BLE 2048 /** 2049 * @brief Get field handle from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2050 * @param event packet 2051 * @return handle 2052 * @note: btstack_type H 2053 */ 2054 static inline hci_con_handle_t gatt_event_long_characteristic_descriptor_query_result_get_handle(const uint8_t * event){ 2055 return little_endian_read_16(event, 2); 2056 } 2057 /** 2058 * @brief Get field descriptor_offset from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2059 * @param event packet 2060 * @return descriptor_offset 2061 * @note: btstack_type 2 2062 */ 2063 static inline uint16_t gatt_event_long_characteristic_descriptor_query_result_get_descriptor_offset(const uint8_t * event){ 2064 return little_endian_read_16(event, 4); 2065 } 2066 /** 2067 * @brief Get field descriptor_length from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2068 * @param event packet 2069 * @return descriptor_length 2070 * @note: btstack_type L 2071 */ 2072 static inline int gatt_event_long_characteristic_descriptor_query_result_get_descriptor_length(const uint8_t * event){ 2073 return little_endian_read_16(event, 6); 2074 } 2075 /** 2076 * @brief Get field descriptor from event GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 2077 * @param event packet 2078 * @return descriptor 2079 * @note: btstack_type V 2080 */ 2081 static inline const uint8_t * gatt_event_long_characteristic_descriptor_query_result_get_descriptor(const uint8_t * event){ 2082 return &event[8]; 2083 } 2084 #endif 2085 2086 #ifdef ENABLE_BLE 2087 /** 2088 * @brief Get field handle from event GATT_EVENT_MTU 2089 * @param event packet 2090 * @return handle 2091 * @note: btstack_type H 2092 */ 2093 static inline hci_con_handle_t gatt_event_mtu_get_handle(const uint8_t * event){ 2094 return little_endian_read_16(event, 2); 2095 } 2096 /** 2097 * @brief Get field MTU from event GATT_EVENT_MTU 2098 * @param event packet 2099 * @return MTU 2100 * @note: btstack_type 2 2101 */ 2102 static inline uint16_t gatt_event_mtu_get_MTU(const uint8_t * event){ 2103 return little_endian_read_16(event, 4); 2104 } 2105 #endif 2106 2107 /** 2108 * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2109 * @param event packet 2110 * @return handle 2111 * @note: btstack_type H 2112 */ 2113 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){ 2114 return little_endian_read_16(event, 2); 2115 } 2116 /** 2117 * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2118 * @param event packet 2119 * @return MTU 2120 * @note: btstack_type 2 2121 */ 2122 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){ 2123 return little_endian_read_16(event, 4); 2124 } 2125 2126 /** 2127 * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2128 * @param event packet 2129 * @return status 2130 * @note: btstack_type 1 2131 */ 2132 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){ 2133 return event[2]; 2134 } 2135 /** 2136 * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2137 * @param event packet 2138 * @return conn_handle 2139 * @note: btstack_type H 2140 */ 2141 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){ 2142 return little_endian_read_16(event, 3); 2143 } 2144 /** 2145 * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2146 * @param event packet 2147 * @return attribute_handle 2148 * @note: btstack_type 2 2149 */ 2150 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){ 2151 return little_endian_read_16(event, 5); 2152 } 2153 2154 2155 /** 2156 * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED 2157 * @param event packet 2158 * @return status 2159 * @note: btstack_type 1 2160 */ 2161 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){ 2162 return event[2]; 2163 } 2164 /** 2165 * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED 2166 * @param event packet 2167 * @return service_uuid 2168 * @note: btstack_type 2 2169 */ 2170 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){ 2171 return little_endian_read_16(event, 3); 2172 } 2173 2174 /** 2175 * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED 2176 * @param event packet 2177 * @return status 2178 * @note: btstack_type 1 2179 */ 2180 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){ 2181 return event[2]; 2182 } 2183 /** 2184 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED 2185 * @param event packet 2186 * @return bnep_cid 2187 * @note: btstack_type 2 2188 */ 2189 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){ 2190 return little_endian_read_16(event, 3); 2191 } 2192 /** 2193 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED 2194 * @param event packet 2195 * @return source_uuid 2196 * @note: btstack_type 2 2197 */ 2198 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){ 2199 return little_endian_read_16(event, 5); 2200 } 2201 /** 2202 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED 2203 * @param event packet 2204 * @return destination_uuid 2205 * @note: btstack_type 2 2206 */ 2207 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){ 2208 return little_endian_read_16(event, 7); 2209 } 2210 /** 2211 * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED 2212 * @param event packet 2213 * @return mtu 2214 * @note: btstack_type 2 2215 */ 2216 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){ 2217 return little_endian_read_16(event, 9); 2218 } 2219 /** 2220 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED 2221 * @param event packet 2222 * @param Pointer to storage for remote_address 2223 * @note: btstack_type B 2224 */ 2225 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2226 reverse_bd_addr(&event[11], remote_address); 2227 } 2228 2229 /** 2230 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED 2231 * @param event packet 2232 * @return bnep_cid 2233 * @note: btstack_type 2 2234 */ 2235 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){ 2236 return little_endian_read_16(event, 2); 2237 } 2238 /** 2239 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2240 * @param event packet 2241 * @return source_uuid 2242 * @note: btstack_type 2 2243 */ 2244 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){ 2245 return little_endian_read_16(event, 4); 2246 } 2247 /** 2248 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2249 * @param event packet 2250 * @return destination_uuid 2251 * @note: btstack_type 2 2252 */ 2253 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){ 2254 return little_endian_read_16(event, 6); 2255 } 2256 /** 2257 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED 2258 * @param event packet 2259 * @param Pointer to storage for remote_address 2260 * @note: btstack_type B 2261 */ 2262 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2263 reverse_bd_addr(&event[8], remote_address); 2264 } 2265 2266 /** 2267 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT 2268 * @param event packet 2269 * @return bnep_cid 2270 * @note: btstack_type 2 2271 */ 2272 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){ 2273 return little_endian_read_16(event, 2); 2274 } 2275 /** 2276 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2277 * @param event packet 2278 * @return source_uuid 2279 * @note: btstack_type 2 2280 */ 2281 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){ 2282 return little_endian_read_16(event, 4); 2283 } 2284 /** 2285 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2286 * @param event packet 2287 * @return destination_uuid 2288 * @note: btstack_type 2 2289 */ 2290 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){ 2291 return little_endian_read_16(event, 6); 2292 } 2293 /** 2294 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT 2295 * @param event packet 2296 * @param Pointer to storage for remote_address 2297 * @note: btstack_type B 2298 */ 2299 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2300 reverse_bd_addr(&event[8], remote_address); 2301 } 2302 /** 2303 * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT 2304 * @param event packet 2305 * @return channel_state 2306 * @note: btstack_type 1 2307 */ 2308 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){ 2309 return event[14]; 2310 } 2311 2312 /** 2313 * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW 2314 * @param event packet 2315 * @return bnep_cid 2316 * @note: btstack_type 2 2317 */ 2318 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){ 2319 return little_endian_read_16(event, 2); 2320 } 2321 /** 2322 * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW 2323 * @param event packet 2324 * @return source_uuid 2325 * @note: btstack_type 2 2326 */ 2327 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){ 2328 return little_endian_read_16(event, 4); 2329 } 2330 /** 2331 * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW 2332 * @param event packet 2333 * @return destination_uuid 2334 * @note: btstack_type 2 2335 */ 2336 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){ 2337 return little_endian_read_16(event, 6); 2338 } 2339 /** 2340 * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW 2341 * @param event packet 2342 * @param Pointer to storage for remote_address 2343 * @note: btstack_type B 2344 */ 2345 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2346 reverse_bd_addr(&event[8], remote_address); 2347 } 2348 2349 #ifdef ENABLE_BLE 2350 /** 2351 * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST 2352 * @param event packet 2353 * @return handle 2354 * @note: btstack_type H 2355 */ 2356 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){ 2357 return little_endian_read_16(event, 2); 2358 } 2359 /** 2360 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST 2361 * @param event packet 2362 * @return addr_type 2363 * @note: btstack_type 1 2364 */ 2365 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){ 2366 return event[4]; 2367 } 2368 /** 2369 * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST 2370 * @param event packet 2371 * @param Pointer to storage for address 2372 * @note: btstack_type B 2373 */ 2374 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){ 2375 reverse_bd_addr(&event[5], address); 2376 } 2377 #endif 2378 2379 #ifdef ENABLE_BLE 2380 /** 2381 * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL 2382 * @param event packet 2383 * @return handle 2384 * @note: btstack_type H 2385 */ 2386 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){ 2387 return little_endian_read_16(event, 2); 2388 } 2389 /** 2390 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL 2391 * @param event packet 2392 * @return addr_type 2393 * @note: btstack_type 1 2394 */ 2395 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){ 2396 return event[4]; 2397 } 2398 /** 2399 * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL 2400 * @param event packet 2401 * @param Pointer to storage for address 2402 * @note: btstack_type B 2403 */ 2404 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2405 reverse_bd_addr(&event[5], address); 2406 } 2407 #endif 2408 2409 #ifdef ENABLE_BLE 2410 /** 2411 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2412 * @param event packet 2413 * @return handle 2414 * @note: btstack_type H 2415 */ 2416 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){ 2417 return little_endian_read_16(event, 2); 2418 } 2419 /** 2420 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2421 * @param event packet 2422 * @return addr_type 2423 * @note: btstack_type 1 2424 */ 2425 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){ 2426 return event[4]; 2427 } 2428 /** 2429 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2430 * @param event packet 2431 * @param Pointer to storage for address 2432 * @note: btstack_type B 2433 */ 2434 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){ 2435 reverse_bd_addr(&event[5], address); 2436 } 2437 /** 2438 * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2439 * @param event packet 2440 * @return passkey 2441 * @note: btstack_type 4 2442 */ 2443 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){ 2444 return little_endian_read_32(event, 11); 2445 } 2446 #endif 2447 2448 #ifdef ENABLE_BLE 2449 /** 2450 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2451 * @param event packet 2452 * @return handle 2453 * @note: btstack_type H 2454 */ 2455 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){ 2456 return little_endian_read_16(event, 2); 2457 } 2458 /** 2459 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2460 * @param event packet 2461 * @return addr_type 2462 * @note: btstack_type 1 2463 */ 2464 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){ 2465 return event[4]; 2466 } 2467 /** 2468 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2469 * @param event packet 2470 * @param Pointer to storage for address 2471 * @note: btstack_type B 2472 */ 2473 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2474 reverse_bd_addr(&event[5], address); 2475 } 2476 #endif 2477 2478 #ifdef ENABLE_BLE 2479 /** 2480 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER 2481 * @param event packet 2482 * @return handle 2483 * @note: btstack_type H 2484 */ 2485 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){ 2486 return little_endian_read_16(event, 2); 2487 } 2488 /** 2489 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER 2490 * @param event packet 2491 * @return addr_type 2492 * @note: btstack_type 1 2493 */ 2494 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){ 2495 return event[4]; 2496 } 2497 /** 2498 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER 2499 * @param event packet 2500 * @param Pointer to storage for address 2501 * @note: btstack_type B 2502 */ 2503 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){ 2504 reverse_bd_addr(&event[5], address); 2505 } 2506 #endif 2507 2508 #ifdef ENABLE_BLE 2509 /** 2510 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL 2511 * @param event packet 2512 * @return handle 2513 * @note: btstack_type H 2514 */ 2515 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){ 2516 return little_endian_read_16(event, 2); 2517 } 2518 /** 2519 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL 2520 * @param event packet 2521 * @return addr_type 2522 * @note: btstack_type 1 2523 */ 2524 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){ 2525 return event[4]; 2526 } 2527 /** 2528 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL 2529 * @param event packet 2530 * @param Pointer to storage for address 2531 * @note: btstack_type B 2532 */ 2533 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2534 reverse_bd_addr(&event[5], address); 2535 } 2536 #endif 2537 2538 #ifdef ENABLE_BLE 2539 /** 2540 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2541 * @param event packet 2542 * @return handle 2543 * @note: btstack_type H 2544 */ 2545 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){ 2546 return little_endian_read_16(event, 2); 2547 } 2548 /** 2549 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2550 * @param event packet 2551 * @return addr_type 2552 * @note: btstack_type 1 2553 */ 2554 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){ 2555 return event[4]; 2556 } 2557 /** 2558 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2559 * @param event packet 2560 * @param Pointer to storage for address 2561 * @note: btstack_type B 2562 */ 2563 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){ 2564 reverse_bd_addr(&event[5], address); 2565 } 2566 /** 2567 * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2568 * @param event packet 2569 * @return passkey 2570 * @note: btstack_type 4 2571 */ 2572 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){ 2573 return little_endian_read_32(event, 11); 2574 } 2575 #endif 2576 2577 #ifdef ENABLE_BLE 2578 /** 2579 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2580 * @param event packet 2581 * @return handle 2582 * @note: btstack_type H 2583 */ 2584 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){ 2585 return little_endian_read_16(event, 2); 2586 } 2587 /** 2588 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2589 * @param event packet 2590 * @return addr_type 2591 * @note: btstack_type 1 2592 */ 2593 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){ 2594 return event[4]; 2595 } 2596 /** 2597 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2598 * @param event packet 2599 * @param Pointer to storage for address 2600 * @note: btstack_type B 2601 */ 2602 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2603 reverse_bd_addr(&event[5], address); 2604 } 2605 #endif 2606 2607 #ifdef ENABLE_BLE 2608 /** 2609 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2610 * @param event packet 2611 * @return handle 2612 * @note: btstack_type H 2613 */ 2614 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){ 2615 return little_endian_read_16(event, 2); 2616 } 2617 /** 2618 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2619 * @param event packet 2620 * @return addr_type 2621 * @note: btstack_type 1 2622 */ 2623 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){ 2624 return event[4]; 2625 } 2626 /** 2627 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2628 * @param event packet 2629 * @param Pointer to storage for address 2630 * @note: btstack_type B 2631 */ 2632 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){ 2633 reverse_bd_addr(&event[5], address); 2634 } 2635 #endif 2636 2637 #ifdef ENABLE_BLE 2638 /** 2639 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2640 * @param event packet 2641 * @return handle 2642 * @note: btstack_type H 2643 */ 2644 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){ 2645 return little_endian_read_16(event, 2); 2646 } 2647 /** 2648 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2649 * @param event packet 2650 * @return addr_type 2651 * @note: btstack_type 1 2652 */ 2653 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){ 2654 return event[4]; 2655 } 2656 /** 2657 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2658 * @param event packet 2659 * @param Pointer to storage for address 2660 * @note: btstack_type B 2661 */ 2662 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){ 2663 reverse_bd_addr(&event[5], address); 2664 } 2665 #endif 2666 2667 #ifdef ENABLE_BLE 2668 /** 2669 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2670 * @param event packet 2671 * @return handle 2672 * @note: btstack_type H 2673 */ 2674 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){ 2675 return little_endian_read_16(event, 2); 2676 } 2677 /** 2678 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2679 * @param event packet 2680 * @return addr_type 2681 * @note: btstack_type 1 2682 */ 2683 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){ 2684 return event[4]; 2685 } 2686 /** 2687 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2688 * @param event packet 2689 * @param Pointer to storage for address 2690 * @note: btstack_type B 2691 */ 2692 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){ 2693 reverse_bd_addr(&event[5], address); 2694 } 2695 /** 2696 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2697 * @param event packet 2698 * @return identity_addr_type 2699 * @note: btstack_type 1 2700 */ 2701 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){ 2702 return event[11]; 2703 } 2704 /** 2705 * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2706 * @param event packet 2707 * @param Pointer to storage for identity_address 2708 * @note: btstack_type B 2709 */ 2710 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2711 reverse_bd_addr(&event[12], identity_address); 2712 } 2713 /** 2714 * @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2715 * @param event packet 2716 * @return index 2717 * @note: btstack_type 2 2718 */ 2719 static inline uint16_t sm_event_identity_resolving_succeeded_get_index(const uint8_t * event){ 2720 return little_endian_read_16(event, 18); 2721 } 2722 #endif 2723 2724 #ifdef ENABLE_BLE 2725 /** 2726 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST 2727 * @param event packet 2728 * @return handle 2729 * @note: btstack_type H 2730 */ 2731 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){ 2732 return little_endian_read_16(event, 2); 2733 } 2734 /** 2735 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST 2736 * @param event packet 2737 * @return addr_type 2738 * @note: btstack_type 1 2739 */ 2740 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){ 2741 return event[4]; 2742 } 2743 /** 2744 * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST 2745 * @param event packet 2746 * @param Pointer to storage for address 2747 * @note: btstack_type B 2748 */ 2749 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){ 2750 reverse_bd_addr(&event[5], address); 2751 } 2752 #endif 2753 2754 #ifdef ENABLE_BLE 2755 /** 2756 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT 2757 * @param event packet 2758 * @return handle 2759 * @note: btstack_type H 2760 */ 2761 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){ 2762 return little_endian_read_16(event, 2); 2763 } 2764 /** 2765 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT 2766 * @param event packet 2767 * @return addr_type 2768 * @note: btstack_type 1 2769 */ 2770 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){ 2771 return event[4]; 2772 } 2773 /** 2774 * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT 2775 * @param event packet 2776 * @param Pointer to storage for address 2777 * @note: btstack_type B 2778 */ 2779 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){ 2780 reverse_bd_addr(&event[5], address); 2781 } 2782 /** 2783 * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT 2784 * @param event packet 2785 * @return authorization_result 2786 * @note: btstack_type 1 2787 */ 2788 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){ 2789 return event[11]; 2790 } 2791 #endif 2792 2793 #ifdef ENABLE_BLE 2794 /** 2795 * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION 2796 * @param event packet 2797 * @return handle 2798 * @note: btstack_type H 2799 */ 2800 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){ 2801 return little_endian_read_16(event, 2); 2802 } 2803 /** 2804 * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION 2805 * @param event packet 2806 * @return action 2807 * @note: btstack_type 1 2808 */ 2809 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){ 2810 return event[4]; 2811 } 2812 #endif 2813 2814 #ifdef ENABLE_BLE 2815 /** 2816 * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED 2817 * @param event packet 2818 * @return handle 2819 * @note: btstack_type H 2820 */ 2821 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){ 2822 return little_endian_read_16(event, 2); 2823 } 2824 /** 2825 * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED 2826 * @param event packet 2827 * @return addr_type 2828 * @note: btstack_type 1 2829 */ 2830 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){ 2831 return event[4]; 2832 } 2833 /** 2834 * @brief Get field address from event SM_EVENT_IDENTITY_CREATED 2835 * @param event packet 2836 * @param Pointer to storage for address 2837 * @note: btstack_type B 2838 */ 2839 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){ 2840 reverse_bd_addr(&event[5], address); 2841 } 2842 /** 2843 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED 2844 * @param event packet 2845 * @return identity_addr_type 2846 * @note: btstack_type 1 2847 */ 2848 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){ 2849 return event[11]; 2850 } 2851 /** 2852 * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED 2853 * @param event packet 2854 * @param Pointer to storage for identity_address 2855 * @note: btstack_type B 2856 */ 2857 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2858 reverse_bd_addr(&event[12], identity_address); 2859 } 2860 /** 2861 * @brief Get field index from event SM_EVENT_IDENTITY_CREATED 2862 * @param event packet 2863 * @return index 2864 * @note: btstack_type 1 2865 */ 2866 static inline uint8_t sm_event_identity_created_get_index(const uint8_t * event){ 2867 return event[18]; 2868 } 2869 #endif 2870 2871 /** 2872 * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL 2873 * @param event packet 2874 * @return handle 2875 * @note: btstack_type H 2876 */ 2877 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){ 2878 return little_endian_read_16(event, 2); 2879 } 2880 /** 2881 * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL 2882 * @param event packet 2883 * @return security_level 2884 * @note: btstack_type 1 2885 */ 2886 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){ 2887 return event[4]; 2888 } 2889 2890 /** 2891 * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 2892 * @param event packet 2893 * @return status 2894 * @note: btstack_type 1 2895 */ 2896 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){ 2897 return event[2]; 2898 } 2899 /** 2900 * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 2901 * @param event packet 2902 * @param Pointer to storage for address 2903 * @note: btstack_type B 2904 */ 2905 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){ 2906 reverse_bd_addr(&event[3], address); 2907 } 2908 2909 /** 2910 * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT 2911 * @param event packet 2912 * @return advertising_event_type 2913 * @note: btstack_type 1 2914 */ 2915 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){ 2916 return event[2]; 2917 } 2918 /** 2919 * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT 2920 * @param event packet 2921 * @return address_type 2922 * @note: btstack_type 1 2923 */ 2924 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){ 2925 return event[3]; 2926 } 2927 /** 2928 * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT 2929 * @param event packet 2930 * @param Pointer to storage for address 2931 * @note: btstack_type B 2932 */ 2933 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){ 2934 reverse_bd_addr(&event[4], address); 2935 } 2936 /** 2937 * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT 2938 * @param event packet 2939 * @return rssi 2940 * @note: btstack_type 1 2941 */ 2942 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){ 2943 return event[10]; 2944 } 2945 /** 2946 * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT 2947 * @param event packet 2948 * @return data_length 2949 * @note: btstack_type J 2950 */ 2951 static inline int gap_event_advertising_report_get_data_length(const uint8_t * event){ 2952 return event[11]; 2953 } 2954 /** 2955 * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT 2956 * @param event packet 2957 * @return data 2958 * @note: btstack_type V 2959 */ 2960 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){ 2961 return &event[12]; 2962 } 2963 2964 /** 2965 * @brief Get field bd_addr from event GAP_EVENT_INQUIRY_RESULT 2966 * @param event packet 2967 * @param Pointer to storage for bd_addr 2968 * @note: btstack_type B 2969 */ 2970 static inline void gap_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 2971 reverse_bd_addr(&event[2], bd_addr); 2972 } 2973 /** 2974 * @brief Get field page_scan_repetition_mode from event GAP_EVENT_INQUIRY_RESULT 2975 * @param event packet 2976 * @return page_scan_repetition_mode 2977 * @note: btstack_type 1 2978 */ 2979 static inline uint8_t gap_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 2980 return event[8]; 2981 } 2982 /** 2983 * @brief Get field class_of_device from event GAP_EVENT_INQUIRY_RESULT 2984 * @param event packet 2985 * @return class_of_device 2986 * @note: btstack_type 3 2987 */ 2988 static inline uint32_t gap_event_inquiry_result_get_class_of_device(const uint8_t * event){ 2989 return little_endian_read_24(event, 9); 2990 } 2991 /** 2992 * @brief Get field clock_offset from event GAP_EVENT_INQUIRY_RESULT 2993 * @param event packet 2994 * @return clock_offset 2995 * @note: btstack_type 2 2996 */ 2997 static inline uint16_t gap_event_inquiry_result_get_clock_offset(const uint8_t * event){ 2998 return little_endian_read_16(event, 12); 2999 } 3000 /** 3001 * @brief Get field rssi_available from event GAP_EVENT_INQUIRY_RESULT 3002 * @param event packet 3003 * @return rssi_available 3004 * @note: btstack_type 1 3005 */ 3006 static inline uint8_t gap_event_inquiry_result_get_rssi_available(const uint8_t * event){ 3007 return event[14]; 3008 } 3009 /** 3010 * @brief Get field rssi from event GAP_EVENT_INQUIRY_RESULT 3011 * @param event packet 3012 * @return rssi 3013 * @note: btstack_type 1 3014 */ 3015 static inline uint8_t gap_event_inquiry_result_get_rssi(const uint8_t * event){ 3016 return event[15]; 3017 } 3018 /** 3019 * @brief Get field name_available from event GAP_EVENT_INQUIRY_RESULT 3020 * @param event packet 3021 * @return name_available 3022 * @note: btstack_type 1 3023 */ 3024 static inline uint8_t gap_event_inquiry_result_get_name_available(const uint8_t * event){ 3025 return event[16]; 3026 } 3027 /** 3028 * @brief Get field name_len from event GAP_EVENT_INQUIRY_RESULT 3029 * @param event packet 3030 * @return name_len 3031 * @note: btstack_type J 3032 */ 3033 static inline int gap_event_inquiry_result_get_name_len(const uint8_t * event){ 3034 return event[17]; 3035 } 3036 /** 3037 * @brief Get field name from event GAP_EVENT_INQUIRY_RESULT 3038 * @param event packet 3039 * @return name 3040 * @note: btstack_type V 3041 */ 3042 static inline const uint8_t * gap_event_inquiry_result_get_name(const uint8_t * event){ 3043 return &event[18]; 3044 } 3045 3046 /** 3047 * @brief Get field status from event GAP_EVENT_INQUIRY_COMPLETE 3048 * @param event packet 3049 * @return status 3050 * @note: btstack_type 1 3051 */ 3052 static inline uint8_t gap_event_inquiry_complete_get_status(const uint8_t * event){ 3053 return event[2]; 3054 } 3055 3056 /** 3057 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3058 * @param event packet 3059 * @return status 3060 * @note: btstack_type 1 3061 */ 3062 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){ 3063 return event[3]; 3064 } 3065 /** 3066 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3067 * @param event packet 3068 * @return connection_handle 3069 * @note: btstack_type H 3070 */ 3071 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){ 3072 return little_endian_read_16(event, 4); 3073 } 3074 /** 3075 * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3076 * @param event packet 3077 * @return role 3078 * @note: btstack_type 1 3079 */ 3080 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){ 3081 return event[6]; 3082 } 3083 /** 3084 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3085 * @param event packet 3086 * @return peer_address_type 3087 * @note: btstack_type 1 3088 */ 3089 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){ 3090 return event[7]; 3091 } 3092 /** 3093 * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3094 * @param event packet 3095 * @param Pointer to storage for peer_address 3096 * @note: btstack_type B 3097 */ 3098 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){ 3099 reverse_bd_addr(&event[8], peer_address); 3100 } 3101 /** 3102 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3103 * @param event packet 3104 * @return conn_interval 3105 * @note: btstack_type 2 3106 */ 3107 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){ 3108 return little_endian_read_16(event, 14); 3109 } 3110 /** 3111 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3112 * @param event packet 3113 * @return conn_latency 3114 * @note: btstack_type 2 3115 */ 3116 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){ 3117 return little_endian_read_16(event, 16); 3118 } 3119 /** 3120 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3121 * @param event packet 3122 * @return supervision_timeout 3123 * @note: btstack_type 2 3124 */ 3125 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){ 3126 return little_endian_read_16(event, 18); 3127 } 3128 /** 3129 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3130 * @param event packet 3131 * @return master_clock_accuracy 3132 * @note: btstack_type 1 3133 */ 3134 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3135 return event[20]; 3136 } 3137 3138 /** 3139 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3140 * @param event packet 3141 * @return status 3142 * @note: btstack_type 1 3143 */ 3144 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){ 3145 return event[3]; 3146 } 3147 /** 3148 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3149 * @param event packet 3150 * @return connection_handle 3151 * @note: btstack_type H 3152 */ 3153 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){ 3154 return little_endian_read_16(event, 4); 3155 } 3156 /** 3157 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3158 * @param event packet 3159 * @return conn_interval 3160 * @note: btstack_type 2 3161 */ 3162 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){ 3163 return little_endian_read_16(event, 6); 3164 } 3165 /** 3166 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3167 * @param event packet 3168 * @return conn_latency 3169 * @note: btstack_type 2 3170 */ 3171 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){ 3172 return little_endian_read_16(event, 8); 3173 } 3174 /** 3175 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3176 * @param event packet 3177 * @return supervision_timeout 3178 * @note: btstack_type 2 3179 */ 3180 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){ 3181 return little_endian_read_16(event, 10); 3182 } 3183 3184 /** 3185 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3186 * @param event packet 3187 * @return connection_handle 3188 * @note: btstack_type H 3189 */ 3190 static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){ 3191 return little_endian_read_16(event, 3); 3192 } 3193 /** 3194 * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3195 * @param event packet 3196 * @return random_number 3197 * @note: btstack_type D 3198 */ 3199 static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){ 3200 return (const uint8_t *) &event[5]; 3201 } 3202 /** 3203 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3204 * @param event packet 3205 * @return encryption_diversifier 3206 * @note: btstack_type 2 3207 */ 3208 static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){ 3209 return little_endian_read_16(event, 13); 3210 } 3211 3212 /** 3213 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3214 * @param event packet 3215 * @return connection_handle 3216 * @note: btstack_type H 3217 */ 3218 static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){ 3219 return little_endian_read_16(event, 3); 3220 } 3221 /** 3222 * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3223 * @param event packet 3224 * @return random_number 3225 * @note: btstack_type D 3226 */ 3227 static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){ 3228 return (const uint8_t *) &event[5]; 3229 } 3230 /** 3231 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3232 * @param event packet 3233 * @return encryption_diversifier 3234 * @note: btstack_type 2 3235 */ 3236 static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){ 3237 return little_endian_read_16(event, 13); 3238 } 3239 3240 /** 3241 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3242 * @param event packet 3243 * @return connection_handle 3244 * @note: btstack_type H 3245 */ 3246 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){ 3247 return little_endian_read_16(event, 3); 3248 } 3249 /** 3250 * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3251 * @param event packet 3252 * @return interval_min 3253 * @note: btstack_type 2 3254 */ 3255 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){ 3256 return little_endian_read_16(event, 5); 3257 } 3258 /** 3259 * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3260 * @param event packet 3261 * @return interval_max 3262 * @note: btstack_type 2 3263 */ 3264 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){ 3265 return little_endian_read_16(event, 7); 3266 } 3267 /** 3268 * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3269 * @param event packet 3270 * @return latency 3271 * @note: btstack_type 2 3272 */ 3273 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){ 3274 return little_endian_read_16(event, 9); 3275 } 3276 /** 3277 * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3278 * @param event packet 3279 * @return timeout 3280 * @note: btstack_type 2 3281 */ 3282 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){ 3283 return little_endian_read_16(event, 11); 3284 } 3285 3286 /** 3287 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3288 * @param event packet 3289 * @return connection_handle 3290 * @note: btstack_type H 3291 */ 3292 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){ 3293 return little_endian_read_16(event, 3); 3294 } 3295 /** 3296 * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3297 * @param event packet 3298 * @return max_tx_octets 3299 * @note: btstack_type 2 3300 */ 3301 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){ 3302 return little_endian_read_16(event, 5); 3303 } 3304 /** 3305 * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3306 * @param event packet 3307 * @return max_tx_time 3308 * @note: btstack_type 2 3309 */ 3310 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){ 3311 return little_endian_read_16(event, 7); 3312 } 3313 /** 3314 * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3315 * @param event packet 3316 * @return max_rx_octets 3317 * @note: btstack_type 2 3318 */ 3319 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){ 3320 return little_endian_read_16(event, 9); 3321 } 3322 /** 3323 * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3324 * @param event packet 3325 * @return max_rx_time 3326 * @note: btstack_type 2 3327 */ 3328 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){ 3329 return little_endian_read_16(event, 11); 3330 } 3331 3332 /** 3333 * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3334 * @param event packet 3335 * @return status 3336 * @note: btstack_type 1 3337 */ 3338 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){ 3339 return event[3]; 3340 } 3341 /** 3342 * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3343 * @param event packet 3344 * @param Pointer to storage for dhkey_x 3345 * @note: btstack_type Q 3346 */ 3347 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){ 3348 reverse_bytes(&event[4], dhkey_x, 32); 3349 } 3350 /** 3351 * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3352 * @param event packet 3353 * @param Pointer to storage for dhkey_y 3354 * @note: btstack_type Q 3355 */ 3356 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){ 3357 reverse_bytes(&event[36], dhkey_y, 32); 3358 } 3359 3360 /** 3361 * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3362 * @param event packet 3363 * @return status 3364 * @note: btstack_type 1 3365 */ 3366 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){ 3367 return event[3]; 3368 } 3369 /** 3370 * @brief Get field dhkey from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3371 * @param event packet 3372 * @param Pointer to storage for dhkey 3373 * @note: btstack_type Q 3374 */ 3375 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey(const uint8_t * event, uint8_t * dhkey){ 3376 reverse_bytes(&event[4], dhkey, 32); 3377 } 3378 3379 /** 3380 * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3381 * @param event packet 3382 * @return status 3383 * @note: btstack_type 1 3384 */ 3385 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){ 3386 return event[3]; 3387 } 3388 /** 3389 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3390 * @param event packet 3391 * @return connection_handle 3392 * @note: btstack_type H 3393 */ 3394 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){ 3395 return little_endian_read_16(event, 4); 3396 } 3397 /** 3398 * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3399 * @param event packet 3400 * @return role 3401 * @note: btstack_type 1 3402 */ 3403 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){ 3404 return event[6]; 3405 } 3406 /** 3407 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3408 * @param event packet 3409 * @return peer_address_type 3410 * @note: btstack_type 1 3411 */ 3412 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){ 3413 return event[7]; 3414 } 3415 /** 3416 * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3417 * @param event packet 3418 * @param Pointer to storage for perr_addresss 3419 * @note: btstack_type B 3420 */ 3421 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){ 3422 reverse_bd_addr(&event[8], perr_addresss); 3423 } 3424 /** 3425 * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3426 * @param event packet 3427 * @param Pointer to storage for local_resolvable_private_addres 3428 * @note: btstack_type B 3429 */ 3430 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){ 3431 reverse_bd_addr(&event[14], local_resolvable_private_addres); 3432 } 3433 /** 3434 * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3435 * @param event packet 3436 * @param Pointer to storage for peer_resolvable_private_addres 3437 * @note: btstack_type B 3438 */ 3439 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){ 3440 reverse_bd_addr(&event[20], peer_resolvable_private_addres); 3441 } 3442 /** 3443 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3444 * @param event packet 3445 * @return conn_interval 3446 * @note: btstack_type 2 3447 */ 3448 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){ 3449 return little_endian_read_16(event, 26); 3450 } 3451 /** 3452 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3453 * @param event packet 3454 * @return conn_latency 3455 * @note: btstack_type 2 3456 */ 3457 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){ 3458 return little_endian_read_16(event, 28); 3459 } 3460 /** 3461 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3462 * @param event packet 3463 * @return supervision_timeout 3464 * @note: btstack_type 2 3465 */ 3466 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){ 3467 return little_endian_read_16(event, 30); 3468 } 3469 /** 3470 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3471 * @param event packet 3472 * @return master_clock_accuracy 3473 * @note: btstack_type 1 3474 */ 3475 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3476 return event[32]; 3477 } 3478 3479 /** 3480 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 3481 * @param event packet 3482 * @return status 3483 * @note: btstack_type 1 3484 */ 3485 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){ 3486 return event[3]; 3487 } 3488 3489 /** 3490 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 3491 * @param event packet 3492 * @return status 3493 * @note: btstack_type 1 3494 */ 3495 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){ 3496 return event[3]; 3497 } 3498 3499 /** 3500 * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3501 * @param event packet 3502 * @return status 3503 * @note: btstack_type 1 3504 */ 3505 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){ 3506 return event[3]; 3507 } 3508 /** 3509 * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3510 * @param event packet 3511 * @return handle 3512 * @note: btstack_type H 3513 */ 3514 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){ 3515 return little_endian_read_16(event, 4); 3516 } 3517 3518 /** 3519 * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 3520 * @param event packet 3521 * @return status 3522 * @note: btstack_type 1 3523 */ 3524 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){ 3525 return event[3]; 3526 } 3527 3528 3529 /** 3530 * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 3531 * @param event packet 3532 * @return gain 3533 * @note: btstack_type 1 3534 */ 3535 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){ 3536 return event[3]; 3537 } 3538 3539 /** 3540 * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 3541 * @param event packet 3542 * @return gain 3543 * @note: btstack_type 1 3544 */ 3545 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){ 3546 return event[3]; 3547 } 3548 3549 /** 3550 * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND 3551 * @param event packet 3552 * @return value_length 3553 * @note: btstack_type J 3554 */ 3555 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){ 3556 return event[3]; 3557 } 3558 /** 3559 * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND 3560 * @param event packet 3561 * @return value 3562 * @note: btstack_type V 3563 */ 3564 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){ 3565 return &event[4]; 3566 } 3567 3568 /** 3569 * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION 3570 * @param event packet 3571 * @return value_length 3572 * @note: btstack_type J 3573 */ 3574 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){ 3575 return event[3]; 3576 } 3577 /** 3578 * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION 3579 * @param event packet 3580 * @return value 3581 * @note: btstack_type V 3582 */ 3583 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){ 3584 return &event[4]; 3585 } 3586 3587 /** 3588 * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3589 * @param event packet 3590 * @return status 3591 * @note: btstack_type 1 3592 */ 3593 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){ 3594 return event[3]; 3595 } 3596 /** 3597 * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3598 * @param event packet 3599 * @return con_handle 3600 * @note: btstack_type H 3601 */ 3602 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){ 3603 return little_endian_read_16(event, 4); 3604 } 3605 /** 3606 * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3607 * @param event packet 3608 * @param Pointer to storage for bd_addr 3609 * @note: btstack_type B 3610 */ 3611 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3612 reverse_bd_addr(&event[6], bd_addr); 3613 } 3614 3615 3616 /** 3617 * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3618 * @param event packet 3619 * @return status 3620 * @note: btstack_type 1 3621 */ 3622 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ 3623 return event[3]; 3624 } 3625 /** 3626 * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3627 * @param event packet 3628 * @return handle 3629 * @note: btstack_type H 3630 */ 3631 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){ 3632 return little_endian_read_16(event, 4); 3633 } 3634 /** 3635 * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3636 * @param event packet 3637 * @param Pointer to storage for bd_addr 3638 * @note: btstack_type B 3639 */ 3640 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3641 reverse_bd_addr(&event[6], bd_addr); 3642 } 3643 /** 3644 * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3645 * @param event packet 3646 * @return negotiated_codec 3647 * @note: btstack_type 1 3648 */ 3649 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){ 3650 return event[12]; 3651 } 3652 3653 3654 /** 3655 * @brief Get field status from event HFP_SUBEVENT_COMPLETE 3656 * @param event packet 3657 * @return status 3658 * @note: btstack_type 1 3659 */ 3660 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){ 3661 return event[3]; 3662 } 3663 3664 /** 3665 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3666 * @param event packet 3667 * @return indicator_index 3668 * @note: btstack_type 1 3669 */ 3670 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){ 3671 return event[3]; 3672 } 3673 /** 3674 * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3675 * @param event packet 3676 * @return indicator_status 3677 * @note: btstack_type 1 3678 */ 3679 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){ 3680 return event[4]; 3681 } 3682 /** 3683 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3684 * @param event packet 3685 * @return indicator_name 3686 * @note: btstack_type T 3687 */ 3688 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){ 3689 return (const char *) &event[5]; 3690 } 3691 3692 /** 3693 * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3694 * @param event packet 3695 * @return network_operator_mode 3696 * @note: btstack_type 1 3697 */ 3698 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){ 3699 return event[3]; 3700 } 3701 /** 3702 * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3703 * @param event packet 3704 * @return network_operator_format 3705 * @note: btstack_type 1 3706 */ 3707 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){ 3708 return event[4]; 3709 } 3710 /** 3711 * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3712 * @param event packet 3713 * @return network_operator_name 3714 * @note: btstack_type T 3715 */ 3716 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){ 3717 return (const char *) &event[5]; 3718 } 3719 3720 /** 3721 * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 3722 * @param event packet 3723 * @return error 3724 * @note: btstack_type 1 3725 */ 3726 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){ 3727 return event[3]; 3728 } 3729 3730 3731 3732 3733 /** 3734 * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 3735 * @param event packet 3736 * @return number 3737 * @note: btstack_type T 3738 */ 3739 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){ 3740 return (const char *) &event[3]; 3741 } 3742 3743 3744 /** 3745 * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 3746 * @param event packet 3747 * @return number 3748 * @note: btstack_type T 3749 */ 3750 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){ 3751 return (const char *) &event[3]; 3752 } 3753 3754 /** 3755 * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 3756 * @param event packet 3757 * @return dtmf 3758 * @note: btstack_type T 3759 */ 3760 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){ 3761 return (const char *) &event[3]; 3762 } 3763 3764 3765 3766 3767 /** 3768 * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME 3769 * @param event packet 3770 * @return status 3771 * @note: btstack_type 1 3772 */ 3773 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){ 3774 return event[3]; 3775 } 3776 /** 3777 * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME 3778 * @param event packet 3779 * @return gain 3780 * @note: btstack_type 1 3781 */ 3782 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){ 3783 return event[4]; 3784 } 3785 3786 /** 3787 * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME 3788 * @param event packet 3789 * @return status 3790 * @note: btstack_type 1 3791 */ 3792 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){ 3793 return event[3]; 3794 } 3795 /** 3796 * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME 3797 * @param event packet 3798 * @return gain 3799 * @note: btstack_type 1 3800 */ 3801 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){ 3802 return event[4]; 3803 } 3804 3805 /** 3806 * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 3807 * @param event packet 3808 * @return type 3809 * @note: btstack_type 1 3810 */ 3811 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){ 3812 return event[3]; 3813 } 3814 /** 3815 * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 3816 * @param event packet 3817 * @return number 3818 * @note: btstack_type T 3819 */ 3820 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){ 3821 return (const char *) &event[4]; 3822 } 3823 3824 /** 3825 * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 3826 * @param event packet 3827 * @return type 3828 * @note: btstack_type 1 3829 */ 3830 static inline uint8_t hfp_subevent_calling_line_identification_notification_get_type(const uint8_t * event){ 3831 return event[3]; 3832 } 3833 /** 3834 * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 3835 * @param event packet 3836 * @return number 3837 * @note: btstack_type T 3838 */ 3839 static inline const char * hfp_subevent_calling_line_identification_notification_get_number(const uint8_t * event){ 3840 return (const char *) &event[4]; 3841 } 3842 3843 /** 3844 * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3845 * @param event packet 3846 * @return clcc_idx 3847 * @note: btstack_type 1 3848 */ 3849 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){ 3850 return event[3]; 3851 } 3852 /** 3853 * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3854 * @param event packet 3855 * @return clcc_dir 3856 * @note: btstack_type 1 3857 */ 3858 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){ 3859 return event[4]; 3860 } 3861 /** 3862 * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3863 * @param event packet 3864 * @return clcc_status 3865 * @note: btstack_type 1 3866 */ 3867 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){ 3868 return event[5]; 3869 } 3870 /** 3871 * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3872 * @param event packet 3873 * @return clcc_mpty 3874 * @note: btstack_type 1 3875 */ 3876 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 3877 return event[6]; 3878 } 3879 /** 3880 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3881 * @param event packet 3882 * @return bnip_type 3883 * @note: btstack_type 1 3884 */ 3885 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 3886 return event[7]; 3887 } 3888 /** 3889 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3890 * @param event packet 3891 * @return bnip_number 3892 * @note: btstack_type T 3893 */ 3894 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 3895 return (const char *) &event[8]; 3896 } 3897 3898 /** 3899 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3900 * @param event packet 3901 * @return status 3902 * @note: btstack_type 1 3903 */ 3904 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 3905 return event[3]; 3906 } 3907 /** 3908 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3909 * @param event packet 3910 * @return bnip_type 3911 * @note: btstack_type 1 3912 */ 3913 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 3914 return event[4]; 3915 } 3916 /** 3917 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3918 * @param event packet 3919 * @return bnip_number 3920 * @note: btstack_type T 3921 */ 3922 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 3923 return (const char *) &event[5]; 3924 } 3925 3926 /** 3927 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 3928 * @param event packet 3929 * @return value 3930 * @note: btstack_type T 3931 */ 3932 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 3933 return (const char *) &event[3]; 3934 } 3935 3936 #ifdef ENABLE_BLE 3937 /** 3938 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 3939 * @param event packet 3940 * @return handle 3941 * @note: btstack_type H 3942 */ 3943 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 3944 return little_endian_read_16(event, 3); 3945 } 3946 #endif 3947 3948 #ifdef ENABLE_BLE 3949 /** 3950 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3951 * @param event packet 3952 * @return handle 3953 * @note: btstack_type H 3954 */ 3955 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 3956 return little_endian_read_16(event, 3); 3957 } 3958 /** 3959 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3960 * @param event packet 3961 * @return attribute_id 3962 * @note: btstack_type 2 3963 */ 3964 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 3965 return little_endian_read_16(event, 5); 3966 } 3967 /** 3968 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3969 * @param event packet 3970 * @return text 3971 * @note: btstack_type T 3972 */ 3973 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 3974 return (const char *) &event[7]; 3975 } 3976 #endif 3977 3978 #ifdef ENABLE_BLE 3979 /** 3980 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 3981 * @param event packet 3982 * @return handle 3983 * @note: btstack_type H 3984 */ 3985 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 3986 return little_endian_read_16(event, 3); 3987 } 3988 #endif 3989 3990 /** 3991 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 3992 * @param event packet 3993 * @return avdtp_cid 3994 * @note: btstack_type 2 3995 */ 3996 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 3997 return little_endian_read_16(event, 3); 3998 } 3999 /** 4000 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4001 * @param event packet 4002 * @return local_seid 4003 * @note: btstack_type 1 4004 */ 4005 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 4006 return event[5]; 4007 } 4008 /** 4009 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4010 * @param event packet 4011 * @return signal_identifier 4012 * @note: btstack_type 1 4013 */ 4014 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 4015 return event[6]; 4016 } 4017 4018 /** 4019 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4020 * @param event packet 4021 * @return avdtp_cid 4022 * @note: btstack_type 2 4023 */ 4024 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 4025 return little_endian_read_16(event, 3); 4026 } 4027 /** 4028 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4029 * @param event packet 4030 * @return local_seid 4031 * @note: btstack_type 1 4032 */ 4033 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 4034 return event[5]; 4035 } 4036 /** 4037 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 4038 * @param event packet 4039 * @return signal_identifier 4040 * @note: btstack_type 1 4041 */ 4042 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 4043 return event[6]; 4044 } 4045 4046 /** 4047 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4048 * @param event packet 4049 * @return avdtp_cid 4050 * @note: btstack_type 2 4051 */ 4052 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 4053 return little_endian_read_16(event, 3); 4054 } 4055 /** 4056 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4057 * @param event packet 4058 * @return local_seid 4059 * @note: btstack_type 1 4060 */ 4061 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 4062 return event[5]; 4063 } 4064 /** 4065 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4066 * @param event packet 4067 * @return signal_identifier 4068 * @note: btstack_type 1 4069 */ 4070 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 4071 return event[6]; 4072 } 4073 4074 /** 4075 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4076 * @param event packet 4077 * @return avdtp_cid 4078 * @note: btstack_type 2 4079 */ 4080 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 4081 return little_endian_read_16(event, 3); 4082 } 4083 /** 4084 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4085 * @param event packet 4086 * @param Pointer to storage for bd_addr 4087 * @note: btstack_type B 4088 */ 4089 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4090 reverse_bd_addr(&event[5], bd_addr); 4091 } 4092 /** 4093 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4094 * @param event packet 4095 * @return status 4096 * @note: btstack_type 1 4097 */ 4098 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 4099 return event[11]; 4100 } 4101 4102 /** 4103 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 4104 * @param event packet 4105 * @return avdtp_cid 4106 * @note: btstack_type 2 4107 */ 4108 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 4109 return little_endian_read_16(event, 3); 4110 } 4111 4112 /** 4113 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4114 * @param event packet 4115 * @return avdtp_cid 4116 * @note: btstack_type 2 4117 */ 4118 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 4119 return little_endian_read_16(event, 3); 4120 } 4121 /** 4122 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4123 * @param event packet 4124 * @return remote_seid 4125 * @note: btstack_type 1 4126 */ 4127 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 4128 return event[5]; 4129 } 4130 /** 4131 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4132 * @param event packet 4133 * @return in_use 4134 * @note: btstack_type 1 4135 */ 4136 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 4137 return event[6]; 4138 } 4139 /** 4140 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4141 * @param event packet 4142 * @return media_type 4143 * @note: btstack_type 1 4144 */ 4145 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 4146 return event[7]; 4147 } 4148 /** 4149 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4150 * @param event packet 4151 * @return sep_type 4152 * @note: btstack_type 1 4153 */ 4154 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 4155 return event[8]; 4156 } 4157 4158 /** 4159 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4160 * @param event packet 4161 * @return avdtp_cid 4162 * @note: btstack_type 2 4163 */ 4164 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 4165 return little_endian_read_16(event, 3); 4166 } 4167 /** 4168 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4169 * @param event packet 4170 * @return local_seid 4171 * @note: btstack_type 1 4172 */ 4173 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_local_seid(const uint8_t * event){ 4174 return event[5]; 4175 } 4176 /** 4177 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4178 * @param event packet 4179 * @return remote_seid 4180 * @note: btstack_type 1 4181 */ 4182 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 4183 return event[6]; 4184 } 4185 /** 4186 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4187 * @param event packet 4188 * @return media_type 4189 * @note: btstack_type 1 4190 */ 4191 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 4192 return event[7]; 4193 } 4194 /** 4195 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4196 * @param event packet 4197 * @return sampling_frequency_bitmap 4198 * @note: btstack_type 1 4199 */ 4200 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4201 return event[8]; 4202 } 4203 /** 4204 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4205 * @param event packet 4206 * @return channel_mode_bitmap 4207 * @note: btstack_type 1 4208 */ 4209 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 4210 return event[9]; 4211 } 4212 /** 4213 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4214 * @param event packet 4215 * @return block_length_bitmap 4216 * @note: btstack_type 1 4217 */ 4218 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 4219 return event[10]; 4220 } 4221 /** 4222 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4223 * @param event packet 4224 * @return subbands_bitmap 4225 * @note: btstack_type 1 4226 */ 4227 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 4228 return event[11]; 4229 } 4230 /** 4231 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4232 * @param event packet 4233 * @return allocation_method_bitmap 4234 * @note: btstack_type 1 4235 */ 4236 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 4237 return event[12]; 4238 } 4239 /** 4240 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4241 * @param event packet 4242 * @return min_bitpool_value 4243 * @note: btstack_type 1 4244 */ 4245 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 4246 return event[13]; 4247 } 4248 /** 4249 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4250 * @param event packet 4251 * @return max_bitpool_value 4252 * @note: btstack_type 1 4253 */ 4254 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 4255 return event[14]; 4256 } 4257 4258 /** 4259 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4260 * @param event packet 4261 * @return avdtp_cid 4262 * @note: btstack_type 2 4263 */ 4264 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 4265 return little_endian_read_16(event, 3); 4266 } 4267 /** 4268 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4269 * @param event packet 4270 * @return local_seid 4271 * @note: btstack_type 1 4272 */ 4273 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_local_seid(const uint8_t * event){ 4274 return event[5]; 4275 } 4276 /** 4277 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4278 * @param event packet 4279 * @return remote_seid 4280 * @note: btstack_type 1 4281 */ 4282 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 4283 return event[6]; 4284 } 4285 /** 4286 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4287 * @param event packet 4288 * @return media_type 4289 * @note: btstack_type 1 4290 */ 4291 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 4292 return event[7]; 4293 } 4294 /** 4295 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4296 * @param event packet 4297 * @return media_codec_type 4298 * @note: btstack_type 2 4299 */ 4300 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 4301 return little_endian_read_16(event, 8); 4302 } 4303 /** 4304 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4305 * @param event packet 4306 * @return media_codec_information_len 4307 * @note: btstack_type L 4308 */ 4309 static inline int avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 4310 return little_endian_read_16(event, 10); 4311 } 4312 /** 4313 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4314 * @param event packet 4315 * @return media_codec_information 4316 * @note: btstack_type V 4317 */ 4318 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 4319 return &event[12]; 4320 } 4321 4322 /** 4323 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4324 * @param event packet 4325 * @return avdtp_cid 4326 * @note: btstack_type 2 4327 */ 4328 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 4329 return little_endian_read_16(event, 3); 4330 } 4331 /** 4332 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4333 * @param event packet 4334 * @return local_seid 4335 * @note: btstack_type 1 4336 */ 4337 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_local_seid(const uint8_t * event){ 4338 return event[5]; 4339 } 4340 /** 4341 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4342 * @param event packet 4343 * @return remote_seid 4344 * @note: btstack_type 1 4345 */ 4346 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 4347 return event[6]; 4348 } 4349 4350 /** 4351 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4352 * @param event packet 4353 * @return avdtp_cid 4354 * @note: btstack_type 2 4355 */ 4356 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4357 return little_endian_read_16(event, 3); 4358 } 4359 /** 4360 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4361 * @param event packet 4362 * @return local_seid 4363 * @note: btstack_type 1 4364 */ 4365 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_local_seid(const uint8_t * event){ 4366 return event[5]; 4367 } 4368 /** 4369 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4370 * @param event packet 4371 * @return remote_seid 4372 * @note: btstack_type 1 4373 */ 4374 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 4375 return event[6]; 4376 } 4377 4378 /** 4379 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4380 * @param event packet 4381 * @return avdtp_cid 4382 * @note: btstack_type 2 4383 */ 4384 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 4385 return little_endian_read_16(event, 3); 4386 } 4387 /** 4388 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4389 * @param event packet 4390 * @return local_seid 4391 * @note: btstack_type 1 4392 */ 4393 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_local_seid(const uint8_t * event){ 4394 return event[5]; 4395 } 4396 /** 4397 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4398 * @param event packet 4399 * @return remote_seid 4400 * @note: btstack_type 1 4401 */ 4402 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 4403 return event[6]; 4404 } 4405 /** 4406 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4407 * @param event packet 4408 * @return recovery_type 4409 * @note: btstack_type 1 4410 */ 4411 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 4412 return event[7]; 4413 } 4414 /** 4415 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4416 * @param event packet 4417 * @return maximum_recovery_window_size 4418 * @note: btstack_type 1 4419 */ 4420 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 4421 return event[8]; 4422 } 4423 /** 4424 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4425 * @param event packet 4426 * @return maximum_number_media_packets 4427 * @note: btstack_type 1 4428 */ 4429 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 4430 return event[9]; 4431 } 4432 4433 /** 4434 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4435 * @param event packet 4436 * @return avdtp_cid 4437 * @note: btstack_type 2 4438 */ 4439 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 4440 return little_endian_read_16(event, 3); 4441 } 4442 /** 4443 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4444 * @param event packet 4445 * @return local_seid 4446 * @note: btstack_type 1 4447 */ 4448 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_local_seid(const uint8_t * event){ 4449 return event[5]; 4450 } 4451 /** 4452 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4453 * @param event packet 4454 * @return remote_seid 4455 * @note: btstack_type 1 4456 */ 4457 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 4458 return event[6]; 4459 } 4460 /** 4461 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4462 * @param event packet 4463 * @return cp_type 4464 * @note: btstack_type 2 4465 */ 4466 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 4467 return little_endian_read_16(event, 7); 4468 } 4469 /** 4470 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4471 * @param event packet 4472 * @return cp_type_value_len 4473 * @note: btstack_type L 4474 */ 4475 static inline int avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 4476 return little_endian_read_16(event, 9); 4477 } 4478 /** 4479 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4480 * @param event packet 4481 * @return cp_type_value 4482 * @note: btstack_type V 4483 */ 4484 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 4485 return &event[11]; 4486 } 4487 4488 /** 4489 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4490 * @param event packet 4491 * @return avdtp_cid 4492 * @note: btstack_type 2 4493 */ 4494 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 4495 return little_endian_read_16(event, 3); 4496 } 4497 /** 4498 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4499 * @param event packet 4500 * @return local_seid 4501 * @note: btstack_type 1 4502 */ 4503 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_local_seid(const uint8_t * event){ 4504 return event[5]; 4505 } 4506 /** 4507 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4508 * @param event packet 4509 * @return remote_seid 4510 * @note: btstack_type 1 4511 */ 4512 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 4513 return event[6]; 4514 } 4515 /** 4516 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4517 * @param event packet 4518 * @return fragmentation 4519 * @note: btstack_type 1 4520 */ 4521 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 4522 return event[7]; 4523 } 4524 /** 4525 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4526 * @param event packet 4527 * @return transport_identifiers_num 4528 * @note: btstack_type 1 4529 */ 4530 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 4531 return event[8]; 4532 } 4533 /** 4534 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4535 * @param event packet 4536 * @return transport_session_identifier_1 4537 * @note: btstack_type 1 4538 */ 4539 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 4540 return event[9]; 4541 } 4542 /** 4543 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4544 * @param event packet 4545 * @return transport_session_identifier_2 4546 * @note: btstack_type 1 4547 */ 4548 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 4549 return event[10]; 4550 } 4551 /** 4552 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4553 * @param event packet 4554 * @return transport_session_identifier_3 4555 * @note: btstack_type 1 4556 */ 4557 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 4558 return event[11]; 4559 } 4560 /** 4561 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4562 * @param event packet 4563 * @return tcid_1 4564 * @note: btstack_type 1 4565 */ 4566 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 4567 return event[12]; 4568 } 4569 /** 4570 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4571 * @param event packet 4572 * @return tcid_2 4573 * @note: btstack_type 1 4574 */ 4575 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 4576 return event[13]; 4577 } 4578 /** 4579 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4580 * @param event packet 4581 * @return tcid_3 4582 * @note: btstack_type 1 4583 */ 4584 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 4585 return event[14]; 4586 } 4587 4588 /** 4589 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4590 * @param event packet 4591 * @return avdtp_cid 4592 * @note: btstack_type 2 4593 */ 4594 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4595 return little_endian_read_16(event, 3); 4596 } 4597 /** 4598 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4599 * @param event packet 4600 * @return local_seid 4601 * @note: btstack_type 1 4602 */ 4603 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_local_seid(const uint8_t * event){ 4604 return event[5]; 4605 } 4606 /** 4607 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4608 * @param event packet 4609 * @return remote_seid 4610 * @note: btstack_type 1 4611 */ 4612 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 4613 return event[6]; 4614 } 4615 4616 /** 4617 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4618 * @param event packet 4619 * @return avdtp_cid 4620 * @note: btstack_type 2 4621 */ 4622 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 4623 return little_endian_read_16(event, 3); 4624 } 4625 /** 4626 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4627 * @param event packet 4628 * @return local_seid 4629 * @note: btstack_type 1 4630 */ 4631 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_local_seid(const uint8_t * event){ 4632 return event[5]; 4633 } 4634 /** 4635 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4636 * @param event packet 4637 * @return remote_seid 4638 * @note: btstack_type 1 4639 */ 4640 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 4641 return event[6]; 4642 } 4643 /** 4644 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4645 * @param event packet 4646 * @return back_ch 4647 * @note: btstack_type 1 4648 */ 4649 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 4650 return event[7]; 4651 } 4652 /** 4653 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4654 * @param event packet 4655 * @return media 4656 * @note: btstack_type 1 4657 */ 4658 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 4659 return event[8]; 4660 } 4661 /** 4662 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4663 * @param event packet 4664 * @return recovery 4665 * @note: btstack_type 1 4666 */ 4667 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 4668 return event[9]; 4669 } 4670 4671 /** 4672 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4673 * @param event packet 4674 * @return avdtp_cid 4675 * @note: btstack_type 2 4676 */ 4677 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 4678 return little_endian_read_16(event, 3); 4679 } 4680 /** 4681 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4682 * @param event packet 4683 * @return local_seid 4684 * @note: btstack_type 1 4685 */ 4686 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 4687 return event[5]; 4688 } 4689 /** 4690 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4691 * @param event packet 4692 * @return remote_seid 4693 * @note: btstack_type 1 4694 */ 4695 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 4696 return event[6]; 4697 } 4698 /** 4699 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4700 * @param event packet 4701 * @return reconfigure 4702 * @note: btstack_type 1 4703 */ 4704 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 4705 return event[7]; 4706 } 4707 /** 4708 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4709 * @param event packet 4710 * @return media_type 4711 * @note: btstack_type 1 4712 */ 4713 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 4714 return event[8]; 4715 } 4716 /** 4717 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4718 * @param event packet 4719 * @return sampling_frequency 4720 * @note: btstack_type 2 4721 */ 4722 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 4723 return little_endian_read_16(event, 9); 4724 } 4725 /** 4726 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4727 * @param event packet 4728 * @return channel_mode 4729 * @note: btstack_type 1 4730 */ 4731 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 4732 return event[11]; 4733 } 4734 /** 4735 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4736 * @param event packet 4737 * @return num_channels 4738 * @note: btstack_type 1 4739 */ 4740 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 4741 return event[12]; 4742 } 4743 /** 4744 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4745 * @param event packet 4746 * @return block_length 4747 * @note: btstack_type 1 4748 */ 4749 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 4750 return event[13]; 4751 } 4752 /** 4753 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4754 * @param event packet 4755 * @return subbands 4756 * @note: btstack_type 1 4757 */ 4758 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 4759 return event[14]; 4760 } 4761 /** 4762 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4763 * @param event packet 4764 * @return allocation_method 4765 * @note: btstack_type 1 4766 */ 4767 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 4768 return event[15]; 4769 } 4770 /** 4771 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4772 * @param event packet 4773 * @return min_bitpool_value 4774 * @note: btstack_type 1 4775 */ 4776 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 4777 return event[16]; 4778 } 4779 /** 4780 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4781 * @param event packet 4782 * @return max_bitpool_value 4783 * @note: btstack_type 1 4784 */ 4785 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 4786 return event[17]; 4787 } 4788 4789 /** 4790 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4791 * @param event packet 4792 * @return avdtp_cid 4793 * @note: btstack_type 2 4794 */ 4795 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 4796 return little_endian_read_16(event, 3); 4797 } 4798 /** 4799 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4800 * @param event packet 4801 * @return local_seid 4802 * @note: btstack_type 1 4803 */ 4804 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 4805 return event[5]; 4806 } 4807 /** 4808 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4809 * @param event packet 4810 * @return remote_seid 4811 * @note: btstack_type 1 4812 */ 4813 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 4814 return event[6]; 4815 } 4816 /** 4817 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4818 * @param event packet 4819 * @return reconfigure 4820 * @note: btstack_type 1 4821 */ 4822 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 4823 return event[7]; 4824 } 4825 /** 4826 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4827 * @param event packet 4828 * @return media_type 4829 * @note: btstack_type 1 4830 */ 4831 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 4832 return event[8]; 4833 } 4834 /** 4835 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4836 * @param event packet 4837 * @return media_codec_type 4838 * @note: btstack_type 2 4839 */ 4840 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 4841 return little_endian_read_16(event, 9); 4842 } 4843 /** 4844 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4845 * @param event packet 4846 * @return media_codec_information_len 4847 * @note: btstack_type L 4848 */ 4849 static inline int avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 4850 return little_endian_read_16(event, 11); 4851 } 4852 /** 4853 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4854 * @param event packet 4855 * @return media_codec_information 4856 * @note: btstack_type V 4857 */ 4858 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 4859 return &event[13]; 4860 } 4861 4862 /** 4863 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4864 * @param event packet 4865 * @return avdtp_cid 4866 * @note: btstack_type 2 4867 */ 4868 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 4869 return little_endian_read_16(event, 3); 4870 } 4871 /** 4872 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4873 * @param event packet 4874 * @param Pointer to storage for bd_addr 4875 * @note: btstack_type B 4876 */ 4877 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4878 reverse_bd_addr(&event[5], bd_addr); 4879 } 4880 /** 4881 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4882 * @param event packet 4883 * @return local_seid 4884 * @note: btstack_type 1 4885 */ 4886 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 4887 return event[11]; 4888 } 4889 /** 4890 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4891 * @param event packet 4892 * @return remote_seid 4893 * @note: btstack_type 1 4894 */ 4895 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 4896 return event[12]; 4897 } 4898 /** 4899 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4900 * @param event packet 4901 * @return status 4902 * @note: btstack_type 1 4903 */ 4904 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 4905 return event[13]; 4906 } 4907 4908 /** 4909 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 4910 * @param event packet 4911 * @return avdtp_cid 4912 * @note: btstack_type 2 4913 */ 4914 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 4915 return little_endian_read_16(event, 3); 4916 } 4917 /** 4918 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 4919 * @param event packet 4920 * @return local_seid 4921 * @note: btstack_type 1 4922 */ 4923 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 4924 return event[5]; 4925 } 4926 4927 /** 4928 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4929 * @param event packet 4930 * @return avdtp_cid 4931 * @note: btstack_type 2 4932 */ 4933 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 4934 return little_endian_read_16(event, 3); 4935 } 4936 /** 4937 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4938 * @param event packet 4939 * @return local_seid 4940 * @note: btstack_type 1 4941 */ 4942 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 4943 return event[5]; 4944 } 4945 /** 4946 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4947 * @param event packet 4948 * @return sequence_number 4949 * @note: btstack_type 2 4950 */ 4951 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 4952 return little_endian_read_16(event, 6); 4953 } 4954 4955 /** 4956 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4957 * @param event packet 4958 * @return a2dp_cid 4959 * @note: btstack_type 2 4960 */ 4961 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 4962 return little_endian_read_16(event, 3); 4963 } 4964 /** 4965 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4966 * @param event packet 4967 * @return local_seid 4968 * @note: btstack_type 1 4969 */ 4970 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 4971 return event[5]; 4972 } 4973 4974 /** 4975 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4976 * @param event packet 4977 * @return a2dp_cid 4978 * @note: btstack_type 2 4979 */ 4980 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 4981 return little_endian_read_16(event, 3); 4982 } 4983 /** 4984 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4985 * @param event packet 4986 * @return int_seid 4987 * @note: btstack_type 1 4988 */ 4989 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_int_seid(const uint8_t * event){ 4990 return event[5]; 4991 } 4992 /** 4993 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4994 * @param event packet 4995 * @return acp_seid 4996 * @note: btstack_type 1 4997 */ 4998 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_acp_seid(const uint8_t * event){ 4999 return event[6]; 5000 } 5001 /** 5002 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5003 * @param event packet 5004 * @return reconfigure 5005 * @note: btstack_type 1 5006 */ 5007 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 5008 return event[7]; 5009 } 5010 /** 5011 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5012 * @param event packet 5013 * @return media_type 5014 * @note: btstack_type 1 5015 */ 5016 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 5017 return event[8]; 5018 } 5019 /** 5020 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5021 * @param event packet 5022 * @return sampling_frequency 5023 * @note: btstack_type 2 5024 */ 5025 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5026 return little_endian_read_16(event, 9); 5027 } 5028 /** 5029 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5030 * @param event packet 5031 * @return channel_mode 5032 * @note: btstack_type 1 5033 */ 5034 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5035 return event[11]; 5036 } 5037 /** 5038 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5039 * @param event packet 5040 * @return num_channels 5041 * @note: btstack_type 1 5042 */ 5043 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5044 return event[12]; 5045 } 5046 /** 5047 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5048 * @param event packet 5049 * @return block_length 5050 * @note: btstack_type 1 5051 */ 5052 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5053 return event[13]; 5054 } 5055 /** 5056 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5057 * @param event packet 5058 * @return subbands 5059 * @note: btstack_type 1 5060 */ 5061 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5062 return event[14]; 5063 } 5064 /** 5065 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5066 * @param event packet 5067 * @return allocation_method 5068 * @note: btstack_type 1 5069 */ 5070 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5071 return event[15]; 5072 } 5073 /** 5074 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5075 * @param event packet 5076 * @return min_bitpool_value 5077 * @note: btstack_type 1 5078 */ 5079 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5080 return event[16]; 5081 } 5082 /** 5083 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5084 * @param event packet 5085 * @return max_bitpool_value 5086 * @note: btstack_type 1 5087 */ 5088 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5089 return event[17]; 5090 } 5091 5092 /** 5093 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5094 * @param event packet 5095 * @return a2dp_cid 5096 * @note: btstack_type 2 5097 */ 5098 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 5099 return little_endian_read_16(event, 3); 5100 } 5101 /** 5102 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5103 * @param event packet 5104 * @return int_seid 5105 * @note: btstack_type 1 5106 */ 5107 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_int_seid(const uint8_t * event){ 5108 return event[5]; 5109 } 5110 /** 5111 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5112 * @param event packet 5113 * @return acp_seid 5114 * @note: btstack_type 1 5115 */ 5116 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_acp_seid(const uint8_t * event){ 5117 return event[6]; 5118 } 5119 /** 5120 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5121 * @param event packet 5122 * @return reconfigure 5123 * @note: btstack_type 1 5124 */ 5125 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5126 return event[7]; 5127 } 5128 /** 5129 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5130 * @param event packet 5131 * @return media_type 5132 * @note: btstack_type 1 5133 */ 5134 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5135 return event[8]; 5136 } 5137 /** 5138 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5139 * @param event packet 5140 * @return media_codec_type 5141 * @note: btstack_type 2 5142 */ 5143 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5144 return little_endian_read_16(event, 9); 5145 } 5146 /** 5147 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5148 * @param event packet 5149 * @return media_codec_information_len 5150 * @note: btstack_type L 5151 */ 5152 static inline int a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5153 return little_endian_read_16(event, 11); 5154 } 5155 /** 5156 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5157 * @param event packet 5158 * @return media_codec_information 5159 * @note: btstack_type V 5160 */ 5161 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5162 return &event[13]; 5163 } 5164 5165 /** 5166 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5167 * @param event packet 5168 * @return a2dp_cid 5169 * @note: btstack_type 2 5170 */ 5171 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 5172 return little_endian_read_16(event, 3); 5173 } 5174 /** 5175 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5176 * @param event packet 5177 * @param Pointer to storage for bd_addr 5178 * @note: btstack_type B 5179 */ 5180 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5181 reverse_bd_addr(&event[5], bd_addr); 5182 } 5183 /** 5184 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5185 * @param event packet 5186 * @return local_seid 5187 * @note: btstack_type 1 5188 */ 5189 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 5190 return event[11]; 5191 } 5192 /** 5193 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5194 * @param event packet 5195 * @return remote_seid 5196 * @note: btstack_type 1 5197 */ 5198 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 5199 return event[12]; 5200 } 5201 /** 5202 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5203 * @param event packet 5204 * @return status 5205 * @note: btstack_type 1 5206 */ 5207 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 5208 return event[13]; 5209 } 5210 5211 /** 5212 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 5213 * @param event packet 5214 * @return a2dp_cid 5215 * @note: btstack_type 2 5216 */ 5217 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 5218 return little_endian_read_16(event, 3); 5219 } 5220 /** 5221 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 5222 * @param event packet 5223 * @return local_seid 5224 * @note: btstack_type 1 5225 */ 5226 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 5227 return event[5]; 5228 } 5229 5230 /** 5231 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5232 * @param event packet 5233 * @return a2dp_cid 5234 * @note: btstack_type 2 5235 */ 5236 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 5237 return little_endian_read_16(event, 3); 5238 } 5239 /** 5240 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5241 * @param event packet 5242 * @return local_seid 5243 * @note: btstack_type 1 5244 */ 5245 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 5246 return event[5]; 5247 } 5248 5249 /** 5250 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 5251 * @param event packet 5252 * @return a2dp_cid 5253 * @note: btstack_type 2 5254 */ 5255 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 5256 return little_endian_read_16(event, 3); 5257 } 5258 /** 5259 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 5260 * @param event packet 5261 * @return local_seid 5262 * @note: btstack_type 1 5263 */ 5264 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 5265 return event[5]; 5266 } 5267 5268 /** 5269 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 5270 * @param event packet 5271 * @return a2dp_cid 5272 * @note: btstack_type 2 5273 */ 5274 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 5275 return little_endian_read_16(event, 3); 5276 } 5277 /** 5278 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 5279 * @param event packet 5280 * @return local_seid 5281 * @note: btstack_type 1 5282 */ 5283 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 5284 return event[5]; 5285 } 5286 5287 /** 5288 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5289 * @param event packet 5290 * @return a2dp_cid 5291 * @note: btstack_type 2 5292 */ 5293 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 5294 return little_endian_read_16(event, 3); 5295 } 5296 /** 5297 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5298 * @param event packet 5299 * @return local_seid 5300 * @note: btstack_type 1 5301 */ 5302 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 5303 return event[5]; 5304 } 5305 /** 5306 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5307 * @param event packet 5308 * @return signal_identifier 5309 * @note: btstack_type 1 5310 */ 5311 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 5312 return event[6]; 5313 } 5314 5315 /** 5316 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 5317 * @param event packet 5318 * @return a2dp_cid 5319 * @note: btstack_type 2 5320 */ 5321 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 5322 return little_endian_read_16(event, 3); 5323 } 5324 /** 5325 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 5326 * @param event packet 5327 * @return local_seid 5328 * @note: btstack_type 1 5329 */ 5330 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 5331 return event[5]; 5332 } 5333 /** 5334 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 5335 * @param event packet 5336 * @return signal_identifier 5337 * @note: btstack_type 1 5338 */ 5339 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 5340 return event[6]; 5341 } 5342 5343 /** 5344 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5345 * @param event packet 5346 * @return a2dp_cid 5347 * @note: btstack_type 2 5348 */ 5349 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 5350 return little_endian_read_16(event, 3); 5351 } 5352 /** 5353 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5354 * @param event packet 5355 * @param Pointer to storage for bd_addr 5356 * @note: btstack_type B 5357 */ 5358 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5359 reverse_bd_addr(&event[5], bd_addr); 5360 } 5361 /** 5362 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5363 * @param event packet 5364 * @return status 5365 * @note: btstack_type 1 5366 */ 5367 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 5368 return event[11]; 5369 } 5370 5371 /** 5372 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 5373 * @param event packet 5374 * @return a2dp_cid 5375 * @note: btstack_type 2 5376 */ 5377 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 5378 return little_endian_read_16(event, 3); 5379 } 5380 5381 /** 5382 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5383 * @param event packet 5384 * @return status 5385 * @note: btstack_type 1 5386 */ 5387 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 5388 return event[3]; 5389 } 5390 /** 5391 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5392 * @param event packet 5393 * @param Pointer to storage for bd_addr 5394 * @note: btstack_type B 5395 */ 5396 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5397 reverse_bd_addr(&event[4], bd_addr); 5398 } 5399 /** 5400 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5401 * @param event packet 5402 * @return avrcp_cid 5403 * @note: btstack_type 2 5404 */ 5405 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 5406 return little_endian_read_16(event, 10); 5407 } 5408 5409 /** 5410 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 5411 * @param event packet 5412 * @return avrcp_cid 5413 * @note: btstack_type 2 5414 */ 5415 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 5416 return little_endian_read_16(event, 3); 5417 } 5418 5419 /** 5420 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5421 * @param event packet 5422 * @return avrcp_cid 5423 * @note: btstack_type 2 5424 */ 5425 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 5426 return little_endian_read_16(event, 3); 5427 } 5428 /** 5429 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5430 * @param event packet 5431 * @return command_type 5432 * @note: btstack_type 1 5433 */ 5434 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 5435 return event[5]; 5436 } 5437 /** 5438 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5439 * @param event packet 5440 * @return repeat_mode 5441 * @note: btstack_type 1 5442 */ 5443 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 5444 return event[6]; 5445 } 5446 /** 5447 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5448 * @param event packet 5449 * @return shuffle_mode 5450 * @note: btstack_type 1 5451 */ 5452 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 5453 return event[7]; 5454 } 5455 5456 /** 5457 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 5458 * @param event packet 5459 * @return avrcp_cid 5460 * @note: btstack_type 2 5461 */ 5462 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 5463 return little_endian_read_16(event, 3); 5464 } 5465 /** 5466 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 5467 * @param event packet 5468 * @return command_type 5469 * @note: btstack_type 1 5470 */ 5471 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 5472 return event[5]; 5473 } 5474 /** 5475 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 5476 * @param event packet 5477 * @return song_length 5478 * @note: btstack_type 4 5479 */ 5480 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 5481 return little_endian_read_32(event, 6); 5482 } 5483 /** 5484 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 5485 * @param event packet 5486 * @return song_position 5487 * @note: btstack_type 4 5488 */ 5489 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 5490 return little_endian_read_32(event, 10); 5491 } 5492 /** 5493 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 5494 * @param event packet 5495 * @return play_status 5496 * @note: btstack_type 1 5497 */ 5498 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 5499 return event[14]; 5500 } 5501 5502 /** 5503 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5504 * @param event packet 5505 * @return avrcp_cid 5506 * @note: btstack_type 2 5507 */ 5508 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 5509 return little_endian_read_16(event, 3); 5510 } 5511 /** 5512 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5513 * @param event packet 5514 * @return command_type 5515 * @note: btstack_type 1 5516 */ 5517 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 5518 return event[5]; 5519 } 5520 /** 5521 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5522 * @param event packet 5523 * @return play_status 5524 * @note: btstack_type 1 5525 */ 5526 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 5527 return event[6]; 5528 } 5529 5530 /** 5531 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5532 * @param event packet 5533 * @return avrcp_cid 5534 * @note: btstack_type 2 5535 */ 5536 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 5537 return little_endian_read_16(event, 3); 5538 } 5539 /** 5540 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5541 * @param event packet 5542 * @return command_type 5543 * @note: btstack_type 1 5544 */ 5545 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 5546 return event[5]; 5547 } 5548 5549 /** 5550 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5551 * @param event packet 5552 * @return avrcp_cid 5553 * @note: btstack_type 2 5554 */ 5555 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 5556 return little_endian_read_16(event, 3); 5557 } 5558 /** 5559 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5560 * @param event packet 5561 * @return command_type 5562 * @note: btstack_type 1 5563 */ 5564 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 5565 return event[5]; 5566 } 5567 5568 /** 5569 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5570 * @param event packet 5571 * @return avrcp_cid 5572 * @note: btstack_type 2 5573 */ 5574 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 5575 return little_endian_read_16(event, 3); 5576 } 5577 /** 5578 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5579 * @param event packet 5580 * @return command_type 5581 * @note: btstack_type 1 5582 */ 5583 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 5584 return event[5]; 5585 } 5586 5587 /** 5588 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5589 * @param event packet 5590 * @return avrcp_cid 5591 * @note: btstack_type 2 5592 */ 5593 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 5594 return little_endian_read_16(event, 3); 5595 } 5596 /** 5597 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5598 * @param event packet 5599 * @return command_type 5600 * @note: btstack_type 1 5601 */ 5602 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 5603 return event[5]; 5604 } 5605 /** 5606 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5607 * @param event packet 5608 * @return absolute_volume 5609 * @note: btstack_type 1 5610 */ 5611 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 5612 return event[6]; 5613 } 5614 5615 /** 5616 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5617 * @param event packet 5618 * @return avrcp_cid 5619 * @note: btstack_type 2 5620 */ 5621 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 5622 return little_endian_read_16(event, 3); 5623 } 5624 /** 5625 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5626 * @param event packet 5627 * @return command_type 5628 * @note: btstack_type 1 5629 */ 5630 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 5631 return event[5]; 5632 } 5633 /** 5634 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5635 * @param event packet 5636 * @return absolute_volume 5637 * @note: btstack_type 1 5638 */ 5639 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 5640 return event[6]; 5641 } 5642 5643 /** 5644 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5645 * @param event packet 5646 * @return avrcp_cid 5647 * @note: btstack_type 2 5648 */ 5649 static inline uint16_t avrcp_subevent_enable_notification_complete_get_avrcp_cid(const uint8_t * event){ 5650 return little_endian_read_16(event, 3); 5651 } 5652 /** 5653 * @brief Get field command_type from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5654 * @param event packet 5655 * @return command_type 5656 * @note: btstack_type 1 5657 */ 5658 static inline uint8_t avrcp_subevent_enable_notification_complete_get_command_type(const uint8_t * event){ 5659 return event[5]; 5660 } 5661 /** 5662 * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5663 * @param event packet 5664 * @return notification_id 5665 * @note: btstack_type 1 5666 */ 5667 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){ 5668 return event[6]; 5669 } 5670 5671 /** 5672 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 5673 * @param event packet 5674 * @return avrcp_cid 5675 * @note: btstack_type 2 5676 */ 5677 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 5678 return little_endian_read_16(event, 3); 5679 } 5680 /** 5681 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 5682 * @param event packet 5683 * @return command_type 5684 * @note: btstack_type 1 5685 */ 5686 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 5687 return event[5]; 5688 } 5689 /** 5690 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 5691 * @param event packet 5692 * @return operation_id 5693 * @note: btstack_type 1 5694 */ 5695 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 5696 return event[6]; 5697 } 5698 5699 /** 5700 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5701 * @param event packet 5702 * @return avrcp_cid 5703 * @note: btstack_type 2 5704 */ 5705 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 5706 return little_endian_read_16(event, 3); 5707 } 5708 /** 5709 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5710 * @param event packet 5711 * @return command_type 5712 * @note: btstack_type 1 5713 */ 5714 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 5715 return event[5]; 5716 } 5717 /** 5718 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5719 * @param event packet 5720 * @return operation_id 5721 * @note: btstack_type 1 5722 */ 5723 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 5724 return event[6]; 5725 } 5726 5727 /** 5728 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5729 * @param event packet 5730 * @return avrcp_cid 5731 * @note: btstack_type 2 5732 */ 5733 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 5734 return little_endian_read_16(event, 3); 5735 } 5736 /** 5737 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5738 * @param event packet 5739 * @return command_type 5740 * @note: btstack_type 1 5741 */ 5742 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 5743 return event[5]; 5744 } 5745 5746 /** 5747 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_COMPANY_IDS_QUERY 5748 * @param event packet 5749 * @return avrcp_cid 5750 * @note: btstack_type 2 5751 */ 5752 static inline uint16_t avrcp_subevent_company_ids_query_get_avrcp_cid(const uint8_t * event){ 5753 return little_endian_read_16(event, 3); 5754 } 5755 5756 /** 5757 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_EVENT_IDS_QUERY 5758 * @param event packet 5759 * @return avrcp_cid 5760 * @note: btstack_type 2 5761 */ 5762 static inline uint16_t avrcp_subevent_event_ids_query_get_avrcp_cid(const uint8_t * event){ 5763 return little_endian_read_16(event, 3); 5764 } 5765 5766 /** 5767 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 5768 * @param event packet 5769 * @return avrcp_cid 5770 * @note: btstack_type 2 5771 */ 5772 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 5773 return little_endian_read_16(event, 3); 5774 } 5775 5776 /** 5777 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 5778 * @param event packet 5779 * @return avrcp_cid 5780 * @note: btstack_type 2 5781 */ 5782 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 5783 return little_endian_read_16(event, 3); 5784 } 5785 /** 5786 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 5787 * @param event packet 5788 * @return operation_id 5789 * @note: btstack_type 1 5790 */ 5791 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 5792 return event[5]; 5793 } 5794 /** 5795 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 5796 * @param event packet 5797 * @return operands_length 5798 * @note: btstack_type 1 5799 */ 5800 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 5801 return event[6]; 5802 } 5803 /** 5804 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 5805 * @param event packet 5806 * @return operand 5807 * @note: btstack_type 1 5808 */ 5809 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 5810 return event[7]; 5811 } 5812 5813 /** 5814 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5815 * @param event packet 5816 * @return avrcp_cid 5817 * @note: btstack_type 2 5818 */ 5819 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 5820 return little_endian_read_16(event, 3); 5821 } 5822 /** 5823 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5824 * @param event packet 5825 * @return command_type 5826 * @note: btstack_type 1 5827 */ 5828 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 5829 return event[5]; 5830 } 5831 /** 5832 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5833 * @param event packet 5834 * @return track 5835 * @note: btstack_type 1 5836 */ 5837 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 5838 return event[6]; 5839 } 5840 5841 /** 5842 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5843 * @param event packet 5844 * @return avrcp_cid 5845 * @note: btstack_type 2 5846 */ 5847 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 5848 return little_endian_read_16(event, 3); 5849 } 5850 /** 5851 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5852 * @param event packet 5853 * @return command_type 5854 * @note: btstack_type 1 5855 */ 5856 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 5857 return event[5]; 5858 } 5859 /** 5860 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5861 * @param event packet 5862 * @return total_tracks 5863 * @note: btstack_type 1 5864 */ 5865 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 5866 return event[6]; 5867 } 5868 5869 /** 5870 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5871 * @param event packet 5872 * @return avrcp_cid 5873 * @note: btstack_type 2 5874 */ 5875 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 5876 return little_endian_read_16(event, 3); 5877 } 5878 /** 5879 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5880 * @param event packet 5881 * @return command_type 5882 * @note: btstack_type 1 5883 */ 5884 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 5885 return event[5]; 5886 } 5887 /** 5888 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5889 * @param event packet 5890 * @return song_length 5891 * @note: btstack_type 4 5892 */ 5893 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 5894 return little_endian_read_32(event, 6); 5895 } 5896 5897 /** 5898 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5899 * @param event packet 5900 * @return avrcp_cid 5901 * @note: btstack_type 2 5902 */ 5903 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 5904 return little_endian_read_16(event, 3); 5905 } 5906 /** 5907 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5908 * @param event packet 5909 * @return command_type 5910 * @note: btstack_type 1 5911 */ 5912 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 5913 return event[5]; 5914 } 5915 /** 5916 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5917 * @param event packet 5918 * @return value_len 5919 * @note: btstack_type J 5920 */ 5921 static inline int avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 5922 return event[6]; 5923 } 5924 /** 5925 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5926 * @param event packet 5927 * @return value 5928 * @note: btstack_type V 5929 */ 5930 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 5931 return &event[7]; 5932 } 5933 5934 /** 5935 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5936 * @param event packet 5937 * @return avrcp_cid 5938 * @note: btstack_type 2 5939 */ 5940 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 5941 return little_endian_read_16(event, 3); 5942 } 5943 /** 5944 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5945 * @param event packet 5946 * @return command_type 5947 * @note: btstack_type 1 5948 */ 5949 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 5950 return event[5]; 5951 } 5952 /** 5953 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5954 * @param event packet 5955 * @return value_len 5956 * @note: btstack_type J 5957 */ 5958 static inline int avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 5959 return event[6]; 5960 } 5961 /** 5962 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5963 * @param event packet 5964 * @return value 5965 * @note: btstack_type V 5966 */ 5967 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 5968 return &event[7]; 5969 } 5970 5971 /** 5972 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 5973 * @param event packet 5974 * @return avrcp_cid 5975 * @note: btstack_type 2 5976 */ 5977 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 5978 return little_endian_read_16(event, 3); 5979 } 5980 /** 5981 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 5982 * @param event packet 5983 * @return command_type 5984 * @note: btstack_type 1 5985 */ 5986 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 5987 return event[5]; 5988 } 5989 /** 5990 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 5991 * @param event packet 5992 * @return value_len 5993 * @note: btstack_type J 5994 */ 5995 static inline int avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 5996 return event[6]; 5997 } 5998 /** 5999 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6000 * @param event packet 6001 * @return value 6002 * @note: btstack_type V 6003 */ 6004 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 6005 return &event[7]; 6006 } 6007 6008 /** 6009 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6010 * @param event packet 6011 * @return avrcp_cid 6012 * @note: btstack_type 2 6013 */ 6014 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 6015 return little_endian_read_16(event, 3); 6016 } 6017 /** 6018 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6019 * @param event packet 6020 * @return command_type 6021 * @note: btstack_type 1 6022 */ 6023 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 6024 return event[5]; 6025 } 6026 /** 6027 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6028 * @param event packet 6029 * @return value_len 6030 * @note: btstack_type J 6031 */ 6032 static inline int avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 6033 return event[6]; 6034 } 6035 /** 6036 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6037 * @param event packet 6038 * @return value 6039 * @note: btstack_type V 6040 */ 6041 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 6042 return &event[7]; 6043 } 6044 6045 /** 6046 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6047 * @param event packet 6048 * @return avrcp_cid 6049 * @note: btstack_type 2 6050 */ 6051 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 6052 return little_endian_read_16(event, 3); 6053 } 6054 /** 6055 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6056 * @param event packet 6057 * @return command_type 6058 * @note: btstack_type 1 6059 */ 6060 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 6061 return event[5]; 6062 } 6063 /** 6064 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6065 * @param event packet 6066 * @return status 6067 * @note: btstack_type 1 6068 */ 6069 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 6070 return event[6]; 6071 } 6072 6073 /** 6074 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6075 * @param event packet 6076 * @param Pointer to storage for bd_addr 6077 * @note: btstack_type B 6078 */ 6079 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6080 reverse_bd_addr(&event[3], bd_addr); 6081 } 6082 /** 6083 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6084 * @param event packet 6085 * @return browsing_cid 6086 * @note: btstack_type 2 6087 */ 6088 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 6089 return little_endian_read_16(event, 9); 6090 } 6091 6092 /** 6093 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6094 * @param event packet 6095 * @return status 6096 * @note: btstack_type 1 6097 */ 6098 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 6099 return event[3]; 6100 } 6101 /** 6102 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6103 * @param event packet 6104 * @param Pointer to storage for bd_addr 6105 * @note: btstack_type B 6106 */ 6107 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6108 reverse_bd_addr(&event[4], bd_addr); 6109 } 6110 /** 6111 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6112 * @param event packet 6113 * @return browsing_cid 6114 * @note: btstack_type 2 6115 */ 6116 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 6117 return little_endian_read_16(event, 10); 6118 } 6119 6120 /** 6121 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 6122 * @param event packet 6123 * @return browsing_cid 6124 * @note: btstack_type 2 6125 */ 6126 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 6127 return little_endian_read_16(event, 3); 6128 } 6129 6130 /** 6131 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6132 * @param event packet 6133 * @return browsing_cid 6134 * @note: btstack_type 2 6135 */ 6136 static inline uint16_t avrcp_subevent_browsing_media_item_done_get_browsing_cid(const uint8_t * event){ 6137 return little_endian_read_16(event, 3); 6138 } 6139 /** 6140 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6141 * @param event packet 6142 * @return browsing_status 6143 * @note: btstack_type 1 6144 */ 6145 static inline uint8_t avrcp_subevent_browsing_media_item_done_get_browsing_status(const uint8_t * event){ 6146 return event[5]; 6147 } 6148 /** 6149 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6150 * @param event packet 6151 * @return bluetooth_status 6152 * @note: btstack_type 1 6153 */ 6154 static inline uint8_t avrcp_subevent_browsing_media_item_done_get_bluetooth_status(const uint8_t * event){ 6155 return event[6]; 6156 } 6157 6158 /** 6159 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 6160 * @param event packet 6161 * @return goep_cid 6162 * @note: btstack_type 2 6163 */ 6164 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 6165 return little_endian_read_16(event, 3); 6166 } 6167 /** 6168 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 6169 * @param event packet 6170 * @return status 6171 * @note: btstack_type 1 6172 */ 6173 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 6174 return event[5]; 6175 } 6176 /** 6177 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 6178 * @param event packet 6179 * @param Pointer to storage for bd_addr 6180 * @note: btstack_type B 6181 */ 6182 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6183 reverse_bd_addr(&event[6], bd_addr); 6184 } 6185 /** 6186 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 6187 * @param event packet 6188 * @return con_handle 6189 * @note: btstack_type H 6190 */ 6191 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6192 return little_endian_read_16(event, 12); 6193 } 6194 /** 6195 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 6196 * @param event packet 6197 * @return incoming 6198 * @note: btstack_type 1 6199 */ 6200 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 6201 return event[14]; 6202 } 6203 6204 /** 6205 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 6206 * @param event packet 6207 * @return goep_cid 6208 * @note: btstack_type 2 6209 */ 6210 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6211 return little_endian_read_16(event, 3); 6212 } 6213 6214 /** 6215 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 6216 * @param event packet 6217 * @return goep_cid 6218 * @note: btstack_type 2 6219 */ 6220 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 6221 return little_endian_read_16(event, 3); 6222 } 6223 6224 /** 6225 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 6226 * @param event packet 6227 * @return pbap_cid 6228 * @note: btstack_type 2 6229 */ 6230 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 6231 return little_endian_read_16(event, 3); 6232 } 6233 /** 6234 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 6235 * @param event packet 6236 * @return status 6237 * @note: btstack_type 1 6238 */ 6239 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 6240 return event[5]; 6241 } 6242 /** 6243 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 6244 * @param event packet 6245 * @param Pointer to storage for bd_addr 6246 * @note: btstack_type B 6247 */ 6248 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6249 reverse_bd_addr(&event[6], bd_addr); 6250 } 6251 /** 6252 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 6253 * @param event packet 6254 * @return con_handle 6255 * @note: btstack_type H 6256 */ 6257 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6258 return little_endian_read_16(event, 12); 6259 } 6260 /** 6261 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 6262 * @param event packet 6263 * @return incoming 6264 * @note: btstack_type 1 6265 */ 6266 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 6267 return event[14]; 6268 } 6269 6270 /** 6271 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 6272 * @param event packet 6273 * @return goep_cid 6274 * @note: btstack_type 2 6275 */ 6276 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6277 return little_endian_read_16(event, 3); 6278 } 6279 6280 /** 6281 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 6282 * @param event packet 6283 * @return goep_cid 6284 * @note: btstack_type 2 6285 */ 6286 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 6287 return little_endian_read_16(event, 3); 6288 } 6289 /** 6290 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 6291 * @param event packet 6292 * @return status 6293 * @note: btstack_type 1 6294 */ 6295 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 6296 return event[5]; 6297 } 6298 6299 /** 6300 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 6301 * @param event packet 6302 * @return hid_cid 6303 * @note: btstack_type 2 6304 */ 6305 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 6306 return little_endian_read_16(event, 3); 6307 } 6308 /** 6309 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 6310 * @param event packet 6311 * @return status 6312 * @note: btstack_type 1 6313 */ 6314 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 6315 return event[5]; 6316 } 6317 /** 6318 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 6319 * @param event packet 6320 * @param Pointer to storage for bd_addr 6321 * @note: btstack_type B 6322 */ 6323 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6324 reverse_bd_addr(&event[6], bd_addr); 6325 } 6326 /** 6327 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 6328 * @param event packet 6329 * @return con_handle 6330 * @note: btstack_type H 6331 */ 6332 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6333 return little_endian_read_16(event, 12); 6334 } 6335 /** 6336 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 6337 * @param event packet 6338 * @return incoming 6339 * @note: btstack_type 1 6340 */ 6341 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 6342 return event[14]; 6343 } 6344 6345 /** 6346 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 6347 * @param event packet 6348 * @return hid_cid 6349 * @note: btstack_type 2 6350 */ 6351 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 6352 return little_endian_read_16(event, 3); 6353 } 6354 6355 /** 6356 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 6357 * @param event packet 6358 * @return hid_cid 6359 * @note: btstack_type 2 6360 */ 6361 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 6362 return little_endian_read_16(event, 3); 6363 } 6364 6365 /** 6366 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 6367 * @param event packet 6368 * @return con_handle 6369 * @note: btstack_type 2 6370 */ 6371 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 6372 return little_endian_read_16(event, 3); 6373 } 6374 6375 /** 6376 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 6377 * @param event packet 6378 * @return con_handle 6379 * @note: btstack_type 2 6380 */ 6381 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 6382 return little_endian_read_16(event, 3); 6383 } 6384 /** 6385 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 6386 * @param event packet 6387 * @return protocol_mode 6388 * @note: btstack_type 1 6389 */ 6390 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 6391 return event[5]; 6392 } 6393 6394 /** 6395 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6396 * @param event packet 6397 * @return con_handle 6398 * @note: btstack_type 2 6399 */ 6400 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 6401 return little_endian_read_16(event, 3); 6402 } 6403 /** 6404 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6405 * @param event packet 6406 * @return enable 6407 * @note: btstack_type 1 6408 */ 6409 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 6410 return event[5]; 6411 } 6412 6413 /** 6414 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6415 * @param event packet 6416 * @return con_handle 6417 * @note: btstack_type 2 6418 */ 6419 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 6420 return little_endian_read_16(event, 3); 6421 } 6422 /** 6423 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6424 * @param event packet 6425 * @return enable 6426 * @note: btstack_type 1 6427 */ 6428 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 6429 return event[5]; 6430 } 6431 6432 /** 6433 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6434 * @param event packet 6435 * @return con_handle 6436 * @note: btstack_type 2 6437 */ 6438 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 6439 return little_endian_read_16(event, 3); 6440 } 6441 /** 6442 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6443 * @param event packet 6444 * @return enable 6445 * @note: btstack_type 1 6446 */ 6447 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 6448 return event[5]; 6449 } 6450 6451 6452 6453 /* API_END */ 6454 6455 #if defined __cplusplus 6456 } 6457 #endif 6458 6459 #endif // __BTSTACK_EVENT_H 6460