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 #ifdef ENABLE_BLE 2108 /** 2109 * @brief Get field handle from event GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE 2110 * @param event packet 2111 * @return handle 2112 * @note: btstack_type H 2113 */ 2114 static inline hci_con_handle_t gatt_event_can_write_without_response_get_handle(const uint8_t * event){ 2115 return little_endian_read_16(event, 2); 2116 } 2117 #endif 2118 2119 /** 2120 * @brief Get field handle from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2121 * @param event packet 2122 * @return handle 2123 * @note: btstack_type H 2124 */ 2125 static inline hci_con_handle_t att_event_mtu_exchange_complete_get_handle(const uint8_t * event){ 2126 return little_endian_read_16(event, 2); 2127 } 2128 /** 2129 * @brief Get field MTU from event ATT_EVENT_MTU_EXCHANGE_COMPLETE 2130 * @param event packet 2131 * @return MTU 2132 * @note: btstack_type 2 2133 */ 2134 static inline uint16_t att_event_mtu_exchange_complete_get_MTU(const uint8_t * event){ 2135 return little_endian_read_16(event, 4); 2136 } 2137 2138 /** 2139 * @brief Get field status from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2140 * @param event packet 2141 * @return status 2142 * @note: btstack_type 1 2143 */ 2144 static inline uint8_t att_event_handle_value_indication_complete_get_status(const uint8_t * event){ 2145 return event[2]; 2146 } 2147 /** 2148 * @brief Get field conn_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2149 * @param event packet 2150 * @return conn_handle 2151 * @note: btstack_type H 2152 */ 2153 static inline hci_con_handle_t att_event_handle_value_indication_complete_get_conn_handle(const uint8_t * event){ 2154 return little_endian_read_16(event, 3); 2155 } 2156 /** 2157 * @brief Get field attribute_handle from event ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 2158 * @param event packet 2159 * @return attribute_handle 2160 * @note: btstack_type 2 2161 */ 2162 static inline uint16_t att_event_handle_value_indication_complete_get_attribute_handle(const uint8_t * event){ 2163 return little_endian_read_16(event, 5); 2164 } 2165 2166 2167 /** 2168 * @brief Get field status from event BNEP_EVENT_SERVICE_REGISTERED 2169 * @param event packet 2170 * @return status 2171 * @note: btstack_type 1 2172 */ 2173 static inline uint8_t bnep_event_service_registered_get_status(const uint8_t * event){ 2174 return event[2]; 2175 } 2176 /** 2177 * @brief Get field service_uuid from event BNEP_EVENT_SERVICE_REGISTERED 2178 * @param event packet 2179 * @return service_uuid 2180 * @note: btstack_type 2 2181 */ 2182 static inline uint16_t bnep_event_service_registered_get_service_uuid(const uint8_t * event){ 2183 return little_endian_read_16(event, 3); 2184 } 2185 2186 /** 2187 * @brief Get field status from event BNEP_EVENT_CHANNEL_OPENED 2188 * @param event packet 2189 * @return status 2190 * @note: btstack_type 1 2191 */ 2192 static inline uint8_t bnep_event_channel_opened_get_status(const uint8_t * event){ 2193 return event[2]; 2194 } 2195 /** 2196 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_OPENED 2197 * @param event packet 2198 * @return bnep_cid 2199 * @note: btstack_type 2 2200 */ 2201 static inline uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t * event){ 2202 return little_endian_read_16(event, 3); 2203 } 2204 /** 2205 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_OPENED 2206 * @param event packet 2207 * @return source_uuid 2208 * @note: btstack_type 2 2209 */ 2210 static inline uint16_t bnep_event_channel_opened_get_source_uuid(const uint8_t * event){ 2211 return little_endian_read_16(event, 5); 2212 } 2213 /** 2214 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_OPENED 2215 * @param event packet 2216 * @return destination_uuid 2217 * @note: btstack_type 2 2218 */ 2219 static inline uint16_t bnep_event_channel_opened_get_destination_uuid(const uint8_t * event){ 2220 return little_endian_read_16(event, 7); 2221 } 2222 /** 2223 * @brief Get field mtu from event BNEP_EVENT_CHANNEL_OPENED 2224 * @param event packet 2225 * @return mtu 2226 * @note: btstack_type 2 2227 */ 2228 static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){ 2229 return little_endian_read_16(event, 9); 2230 } 2231 /** 2232 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_OPENED 2233 * @param event packet 2234 * @param Pointer to storage for remote_address 2235 * @note: btstack_type B 2236 */ 2237 static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2238 reverse_bd_addr(&event[11], remote_address); 2239 } 2240 2241 /** 2242 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_CLOSED 2243 * @param event packet 2244 * @return bnep_cid 2245 * @note: btstack_type 2 2246 */ 2247 static inline uint16_t bnep_event_channel_closed_get_bnep_cid(const uint8_t * event){ 2248 return little_endian_read_16(event, 2); 2249 } 2250 /** 2251 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2252 * @param event packet 2253 * @return source_uuid 2254 * @note: btstack_type 2 2255 */ 2256 static inline uint16_t bnep_event_channel_closed_get_source_uuid(const uint8_t * event){ 2257 return little_endian_read_16(event, 4); 2258 } 2259 /** 2260 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_CLOSED 2261 * @param event packet 2262 * @return destination_uuid 2263 * @note: btstack_type 2 2264 */ 2265 static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint8_t * event){ 2266 return little_endian_read_16(event, 6); 2267 } 2268 /** 2269 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_CLOSED 2270 * @param event packet 2271 * @param Pointer to storage for remote_address 2272 * @note: btstack_type B 2273 */ 2274 static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2275 reverse_bd_addr(&event[8], remote_address); 2276 } 2277 2278 /** 2279 * @brief Get field bnep_cid from event BNEP_EVENT_CHANNEL_TIMEOUT 2280 * @param event packet 2281 * @return bnep_cid 2282 * @note: btstack_type 2 2283 */ 2284 static inline uint16_t bnep_event_channel_timeout_get_bnep_cid(const uint8_t * event){ 2285 return little_endian_read_16(event, 2); 2286 } 2287 /** 2288 * @brief Get field source_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2289 * @param event packet 2290 * @return source_uuid 2291 * @note: btstack_type 2 2292 */ 2293 static inline uint16_t bnep_event_channel_timeout_get_source_uuid(const uint8_t * event){ 2294 return little_endian_read_16(event, 4); 2295 } 2296 /** 2297 * @brief Get field destination_uuid from event BNEP_EVENT_CHANNEL_TIMEOUT 2298 * @param event packet 2299 * @return destination_uuid 2300 * @note: btstack_type 2 2301 */ 2302 static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uint8_t * event){ 2303 return little_endian_read_16(event, 6); 2304 } 2305 /** 2306 * @brief Get field remote_address from event BNEP_EVENT_CHANNEL_TIMEOUT 2307 * @param event packet 2308 * @param Pointer to storage for remote_address 2309 * @note: btstack_type B 2310 */ 2311 static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2312 reverse_bd_addr(&event[8], remote_address); 2313 } 2314 /** 2315 * @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT 2316 * @param event packet 2317 * @return channel_state 2318 * @note: btstack_type 1 2319 */ 2320 static inline uint8_t bnep_event_channel_timeout_get_channel_state(const uint8_t * event){ 2321 return event[14]; 2322 } 2323 2324 /** 2325 * @brief Get field bnep_cid from event BNEP_EVENT_CAN_SEND_NOW 2326 * @param event packet 2327 * @return bnep_cid 2328 * @note: btstack_type 2 2329 */ 2330 static inline uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t * event){ 2331 return little_endian_read_16(event, 2); 2332 } 2333 /** 2334 * @brief Get field source_uuid from event BNEP_EVENT_CAN_SEND_NOW 2335 * @param event packet 2336 * @return source_uuid 2337 * @note: btstack_type 2 2338 */ 2339 static inline uint16_t bnep_event_can_send_now_get_source_uuid(const uint8_t * event){ 2340 return little_endian_read_16(event, 4); 2341 } 2342 /** 2343 * @brief Get field destination_uuid from event BNEP_EVENT_CAN_SEND_NOW 2344 * @param event packet 2345 * @return destination_uuid 2346 * @note: btstack_type 2 2347 */ 2348 static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_t * event){ 2349 return little_endian_read_16(event, 6); 2350 } 2351 /** 2352 * @brief Get field remote_address from event BNEP_EVENT_CAN_SEND_NOW 2353 * @param event packet 2354 * @param Pointer to storage for remote_address 2355 * @note: btstack_type B 2356 */ 2357 static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){ 2358 reverse_bd_addr(&event[8], remote_address); 2359 } 2360 2361 #ifdef ENABLE_BLE 2362 /** 2363 * @brief Get field handle from event SM_EVENT_JUST_WORKS_REQUEST 2364 * @param event packet 2365 * @return handle 2366 * @note: btstack_type H 2367 */ 2368 static inline hci_con_handle_t sm_event_just_works_request_get_handle(const uint8_t * event){ 2369 return little_endian_read_16(event, 2); 2370 } 2371 /** 2372 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_REQUEST 2373 * @param event packet 2374 * @return addr_type 2375 * @note: btstack_type 1 2376 */ 2377 static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t * event){ 2378 return event[4]; 2379 } 2380 /** 2381 * @brief Get field address from event SM_EVENT_JUST_WORKS_REQUEST 2382 * @param event packet 2383 * @param Pointer to storage for address 2384 * @note: btstack_type B 2385 */ 2386 static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){ 2387 reverse_bd_addr(&event[5], address); 2388 } 2389 #endif 2390 2391 #ifdef ENABLE_BLE 2392 /** 2393 * @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL 2394 * @param event packet 2395 * @return handle 2396 * @note: btstack_type H 2397 */ 2398 static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){ 2399 return little_endian_read_16(event, 2); 2400 } 2401 /** 2402 * @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL 2403 * @param event packet 2404 * @return addr_type 2405 * @note: btstack_type 1 2406 */ 2407 static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){ 2408 return event[4]; 2409 } 2410 /** 2411 * @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL 2412 * @param event packet 2413 * @param Pointer to storage for address 2414 * @note: btstack_type B 2415 */ 2416 static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2417 reverse_bd_addr(&event[5], address); 2418 } 2419 #endif 2420 2421 #ifdef ENABLE_BLE 2422 /** 2423 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2424 * @param event packet 2425 * @return handle 2426 * @note: btstack_type H 2427 */ 2428 static inline hci_con_handle_t sm_event_passkey_display_number_get_handle(const uint8_t * event){ 2429 return little_endian_read_16(event, 2); 2430 } 2431 /** 2432 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2433 * @param event packet 2434 * @return addr_type 2435 * @note: btstack_type 1 2436 */ 2437 static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_t * event){ 2438 return event[4]; 2439 } 2440 /** 2441 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2442 * @param event packet 2443 * @param Pointer to storage for address 2444 * @note: btstack_type B 2445 */ 2446 static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){ 2447 reverse_bd_addr(&event[5], address); 2448 } 2449 /** 2450 * @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER 2451 * @param event packet 2452 * @return passkey 2453 * @note: btstack_type 4 2454 */ 2455 static inline uint32_t sm_event_passkey_display_number_get_passkey(const uint8_t * event){ 2456 return little_endian_read_32(event, 11); 2457 } 2458 #endif 2459 2460 #ifdef ENABLE_BLE 2461 /** 2462 * @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2463 * @param event packet 2464 * @return handle 2465 * @note: btstack_type H 2466 */ 2467 static inline hci_con_handle_t sm_event_passkey_display_cancel_get_handle(const uint8_t * event){ 2468 return little_endian_read_16(event, 2); 2469 } 2470 /** 2471 * @brief Get field addr_type from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2472 * @param event packet 2473 * @return addr_type 2474 * @note: btstack_type 1 2475 */ 2476 static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_t * event){ 2477 return event[4]; 2478 } 2479 /** 2480 * @brief Get field address from event SM_EVENT_PASSKEY_DISPLAY_CANCEL 2481 * @param event packet 2482 * @param Pointer to storage for address 2483 * @note: btstack_type B 2484 */ 2485 static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2486 reverse_bd_addr(&event[5], address); 2487 } 2488 #endif 2489 2490 #ifdef ENABLE_BLE 2491 /** 2492 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_NUMBER 2493 * @param event packet 2494 * @return handle 2495 * @note: btstack_type H 2496 */ 2497 static inline hci_con_handle_t sm_event_passkey_input_number_get_handle(const uint8_t * event){ 2498 return little_endian_read_16(event, 2); 2499 } 2500 /** 2501 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_NUMBER 2502 * @param event packet 2503 * @return addr_type 2504 * @note: btstack_type 1 2505 */ 2506 static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t * event){ 2507 return event[4]; 2508 } 2509 /** 2510 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_NUMBER 2511 * @param event packet 2512 * @param Pointer to storage for address 2513 * @note: btstack_type B 2514 */ 2515 static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){ 2516 reverse_bd_addr(&event[5], address); 2517 } 2518 #endif 2519 2520 #ifdef ENABLE_BLE 2521 /** 2522 * @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL 2523 * @param event packet 2524 * @return handle 2525 * @note: btstack_type H 2526 */ 2527 static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){ 2528 return little_endian_read_16(event, 2); 2529 } 2530 /** 2531 * @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL 2532 * @param event packet 2533 * @return addr_type 2534 * @note: btstack_type 1 2535 */ 2536 static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){ 2537 return event[4]; 2538 } 2539 /** 2540 * @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL 2541 * @param event packet 2542 * @param Pointer to storage for address 2543 * @note: btstack_type B 2544 */ 2545 static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2546 reverse_bd_addr(&event[5], address); 2547 } 2548 #endif 2549 2550 #ifdef ENABLE_BLE 2551 /** 2552 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2553 * @param event packet 2554 * @return handle 2555 * @note: btstack_type H 2556 */ 2557 static inline hci_con_handle_t sm_event_numeric_comparison_request_get_handle(const uint8_t * event){ 2558 return little_endian_read_16(event, 2); 2559 } 2560 /** 2561 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2562 * @param event packet 2563 * @return addr_type 2564 * @note: btstack_type 1 2565 */ 2566 static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const uint8_t * event){ 2567 return event[4]; 2568 } 2569 /** 2570 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2571 * @param event packet 2572 * @param Pointer to storage for address 2573 * @note: btstack_type B 2574 */ 2575 static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){ 2576 reverse_bd_addr(&event[5], address); 2577 } 2578 /** 2579 * @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST 2580 * @param event packet 2581 * @return passkey 2582 * @note: btstack_type 4 2583 */ 2584 static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uint8_t * event){ 2585 return little_endian_read_32(event, 11); 2586 } 2587 #endif 2588 2589 #ifdef ENABLE_BLE 2590 /** 2591 * @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2592 * @param event packet 2593 * @return handle 2594 * @note: btstack_type H 2595 */ 2596 static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){ 2597 return little_endian_read_16(event, 2); 2598 } 2599 /** 2600 * @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2601 * @param event packet 2602 * @return addr_type 2603 * @note: btstack_type 1 2604 */ 2605 static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){ 2606 return event[4]; 2607 } 2608 /** 2609 * @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL 2610 * @param event packet 2611 * @param Pointer to storage for address 2612 * @note: btstack_type B 2613 */ 2614 static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){ 2615 reverse_bd_addr(&event[5], address); 2616 } 2617 #endif 2618 2619 #ifdef ENABLE_BLE 2620 /** 2621 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2622 * @param event packet 2623 * @return handle 2624 * @note: btstack_type H 2625 */ 2626 static inline hci_con_handle_t sm_event_identity_resolving_started_get_handle(const uint8_t * event){ 2627 return little_endian_read_16(event, 2); 2628 } 2629 /** 2630 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2631 * @param event packet 2632 * @return addr_type 2633 * @note: btstack_type 1 2634 */ 2635 static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const uint8_t * event){ 2636 return event[4]; 2637 } 2638 /** 2639 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_STARTED 2640 * @param event packet 2641 * @param Pointer to storage for address 2642 * @note: btstack_type B 2643 */ 2644 static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){ 2645 reverse_bd_addr(&event[5], address); 2646 } 2647 #endif 2648 2649 #ifdef ENABLE_BLE 2650 /** 2651 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2652 * @param event packet 2653 * @return handle 2654 * @note: btstack_type H 2655 */ 2656 static inline hci_con_handle_t sm_event_identity_resolving_failed_get_handle(const uint8_t * event){ 2657 return little_endian_read_16(event, 2); 2658 } 2659 /** 2660 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2661 * @param event packet 2662 * @return addr_type 2663 * @note: btstack_type 1 2664 */ 2665 static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uint8_t * event){ 2666 return event[4]; 2667 } 2668 /** 2669 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_FAILED 2670 * @param event packet 2671 * @param Pointer to storage for address 2672 * @note: btstack_type B 2673 */ 2674 static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){ 2675 reverse_bd_addr(&event[5], address); 2676 } 2677 #endif 2678 2679 #ifdef ENABLE_BLE 2680 /** 2681 * @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2682 * @param event packet 2683 * @return handle 2684 * @note: btstack_type H 2685 */ 2686 static inline hci_con_handle_t sm_event_identity_resolving_succeeded_get_handle(const uint8_t * event){ 2687 return little_endian_read_16(event, 2); 2688 } 2689 /** 2690 * @brief Get field addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2691 * @param event packet 2692 * @return addr_type 2693 * @note: btstack_type 1 2694 */ 2695 static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const uint8_t * event){ 2696 return event[4]; 2697 } 2698 /** 2699 * @brief Get field address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2700 * @param event packet 2701 * @param Pointer to storage for address 2702 * @note: btstack_type B 2703 */ 2704 static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){ 2705 reverse_bd_addr(&event[5], address); 2706 } 2707 /** 2708 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2709 * @param event packet 2710 * @return identity_addr_type 2711 * @note: btstack_type 1 2712 */ 2713 static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_type(const uint8_t * event){ 2714 return event[11]; 2715 } 2716 /** 2717 * @brief Get field identity_address from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2718 * @param event packet 2719 * @param Pointer to storage for identity_address 2720 * @note: btstack_type B 2721 */ 2722 static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2723 reverse_bd_addr(&event[12], identity_address); 2724 } 2725 /** 2726 * @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 2727 * @param event packet 2728 * @return index 2729 * @note: btstack_type 2 2730 */ 2731 static inline uint16_t sm_event_identity_resolving_succeeded_get_index(const uint8_t * event){ 2732 return little_endian_read_16(event, 18); 2733 } 2734 #endif 2735 2736 #ifdef ENABLE_BLE 2737 /** 2738 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_REQUEST 2739 * @param event packet 2740 * @return handle 2741 * @note: btstack_type H 2742 */ 2743 static inline hci_con_handle_t sm_event_authorization_request_get_handle(const uint8_t * event){ 2744 return little_endian_read_16(event, 2); 2745 } 2746 /** 2747 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_REQUEST 2748 * @param event packet 2749 * @return addr_type 2750 * @note: btstack_type 1 2751 */ 2752 static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t * event){ 2753 return event[4]; 2754 } 2755 /** 2756 * @brief Get field address from event SM_EVENT_AUTHORIZATION_REQUEST 2757 * @param event packet 2758 * @param Pointer to storage for address 2759 * @note: btstack_type B 2760 */ 2761 static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){ 2762 reverse_bd_addr(&event[5], address); 2763 } 2764 #endif 2765 2766 #ifdef ENABLE_BLE 2767 /** 2768 * @brief Get field handle from event SM_EVENT_AUTHORIZATION_RESULT 2769 * @param event packet 2770 * @return handle 2771 * @note: btstack_type H 2772 */ 2773 static inline hci_con_handle_t sm_event_authorization_result_get_handle(const uint8_t * event){ 2774 return little_endian_read_16(event, 2); 2775 } 2776 /** 2777 * @brief Get field addr_type from event SM_EVENT_AUTHORIZATION_RESULT 2778 * @param event packet 2779 * @return addr_type 2780 * @note: btstack_type 1 2781 */ 2782 static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t * event){ 2783 return event[4]; 2784 } 2785 /** 2786 * @brief Get field address from event SM_EVENT_AUTHORIZATION_RESULT 2787 * @param event packet 2788 * @param Pointer to storage for address 2789 * @note: btstack_type B 2790 */ 2791 static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){ 2792 reverse_bd_addr(&event[5], address); 2793 } 2794 /** 2795 * @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT 2796 * @param event packet 2797 * @return authorization_result 2798 * @note: btstack_type 1 2799 */ 2800 static inline uint8_t sm_event_authorization_result_get_authorization_result(const uint8_t * event){ 2801 return event[11]; 2802 } 2803 #endif 2804 2805 #ifdef ENABLE_BLE 2806 /** 2807 * @brief Get field handle from event SM_EVENT_KEYPRESS_NOTIFICATION 2808 * @param event packet 2809 * @return handle 2810 * @note: btstack_type H 2811 */ 2812 static inline hci_con_handle_t sm_event_keypress_notification_get_handle(const uint8_t * event){ 2813 return little_endian_read_16(event, 2); 2814 } 2815 /** 2816 * @brief Get field action from event SM_EVENT_KEYPRESS_NOTIFICATION 2817 * @param event packet 2818 * @return action 2819 * @note: btstack_type 1 2820 */ 2821 static inline uint8_t sm_event_keypress_notification_get_action(const uint8_t * event){ 2822 return event[4]; 2823 } 2824 #endif 2825 2826 #ifdef ENABLE_BLE 2827 /** 2828 * @brief Get field handle from event SM_EVENT_IDENTITY_CREATED 2829 * @param event packet 2830 * @return handle 2831 * @note: btstack_type H 2832 */ 2833 static inline hci_con_handle_t sm_event_identity_created_get_handle(const uint8_t * event){ 2834 return little_endian_read_16(event, 2); 2835 } 2836 /** 2837 * @brief Get field addr_type from event SM_EVENT_IDENTITY_CREATED 2838 * @param event packet 2839 * @return addr_type 2840 * @note: btstack_type 1 2841 */ 2842 static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * event){ 2843 return event[4]; 2844 } 2845 /** 2846 * @brief Get field address from event SM_EVENT_IDENTITY_CREATED 2847 * @param event packet 2848 * @param Pointer to storage for address 2849 * @note: btstack_type B 2850 */ 2851 static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){ 2852 reverse_bd_addr(&event[5], address); 2853 } 2854 /** 2855 * @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED 2856 * @param event packet 2857 * @return identity_addr_type 2858 * @note: btstack_type 1 2859 */ 2860 static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uint8_t * event){ 2861 return event[11]; 2862 } 2863 /** 2864 * @brief Get field identity_address from event SM_EVENT_IDENTITY_CREATED 2865 * @param event packet 2866 * @param Pointer to storage for identity_address 2867 * @note: btstack_type B 2868 */ 2869 static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){ 2870 reverse_bd_addr(&event[12], identity_address); 2871 } 2872 /** 2873 * @brief Get field index from event SM_EVENT_IDENTITY_CREATED 2874 * @param event packet 2875 * @return index 2876 * @note: btstack_type 1 2877 */ 2878 static inline uint8_t sm_event_identity_created_get_index(const uint8_t * event){ 2879 return event[18]; 2880 } 2881 #endif 2882 2883 /** 2884 * @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL 2885 * @param event packet 2886 * @return handle 2887 * @note: btstack_type H 2888 */ 2889 static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){ 2890 return little_endian_read_16(event, 2); 2891 } 2892 /** 2893 * @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL 2894 * @param event packet 2895 * @return security_level 2896 * @note: btstack_type 1 2897 */ 2898 static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){ 2899 return event[4]; 2900 } 2901 2902 /** 2903 * @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 2904 * @param event packet 2905 * @return status 2906 * @note: btstack_type 1 2907 */ 2908 static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){ 2909 return event[2]; 2910 } 2911 /** 2912 * @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED 2913 * @param event packet 2914 * @param Pointer to storage for address 2915 * @note: btstack_type B 2916 */ 2917 static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){ 2918 reverse_bd_addr(&event[3], address); 2919 } 2920 2921 /** 2922 * @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT 2923 * @param event packet 2924 * @return advertising_event_type 2925 * @note: btstack_type 1 2926 */ 2927 static inline uint8_t gap_event_advertising_report_get_advertising_event_type(const uint8_t * event){ 2928 return event[2]; 2929 } 2930 /** 2931 * @brief Get field address_type from event GAP_EVENT_ADVERTISING_REPORT 2932 * @param event packet 2933 * @return address_type 2934 * @note: btstack_type 1 2935 */ 2936 static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_t * event){ 2937 return event[3]; 2938 } 2939 /** 2940 * @brief Get field address from event GAP_EVENT_ADVERTISING_REPORT 2941 * @param event packet 2942 * @param Pointer to storage for address 2943 * @note: btstack_type B 2944 */ 2945 static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){ 2946 reverse_bd_addr(&event[4], address); 2947 } 2948 /** 2949 * @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT 2950 * @param event packet 2951 * @return rssi 2952 * @note: btstack_type 1 2953 */ 2954 static inline uint8_t gap_event_advertising_report_get_rssi(const uint8_t * event){ 2955 return event[10]; 2956 } 2957 /** 2958 * @brief Get field data_length from event GAP_EVENT_ADVERTISING_REPORT 2959 * @param event packet 2960 * @return data_length 2961 * @note: btstack_type J 2962 */ 2963 static inline int gap_event_advertising_report_get_data_length(const uint8_t * event){ 2964 return event[11]; 2965 } 2966 /** 2967 * @brief Get field data from event GAP_EVENT_ADVERTISING_REPORT 2968 * @param event packet 2969 * @return data 2970 * @note: btstack_type V 2971 */ 2972 static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_t * event){ 2973 return &event[12]; 2974 } 2975 2976 /** 2977 * @brief Get field bd_addr from event GAP_EVENT_INQUIRY_RESULT 2978 * @param event packet 2979 * @param Pointer to storage for bd_addr 2980 * @note: btstack_type B 2981 */ 2982 static inline void gap_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 2983 reverse_bd_addr(&event[2], bd_addr); 2984 } 2985 /** 2986 * @brief Get field page_scan_repetition_mode from event GAP_EVENT_INQUIRY_RESULT 2987 * @param event packet 2988 * @return page_scan_repetition_mode 2989 * @note: btstack_type 1 2990 */ 2991 static inline uint8_t gap_event_inquiry_result_get_page_scan_repetition_mode(const uint8_t * event){ 2992 return event[8]; 2993 } 2994 /** 2995 * @brief Get field class_of_device from event GAP_EVENT_INQUIRY_RESULT 2996 * @param event packet 2997 * @return class_of_device 2998 * @note: btstack_type 3 2999 */ 3000 static inline uint32_t gap_event_inquiry_result_get_class_of_device(const uint8_t * event){ 3001 return little_endian_read_24(event, 9); 3002 } 3003 /** 3004 * @brief Get field clock_offset from event GAP_EVENT_INQUIRY_RESULT 3005 * @param event packet 3006 * @return clock_offset 3007 * @note: btstack_type 2 3008 */ 3009 static inline uint16_t gap_event_inquiry_result_get_clock_offset(const uint8_t * event){ 3010 return little_endian_read_16(event, 12); 3011 } 3012 /** 3013 * @brief Get field rssi_available from event GAP_EVENT_INQUIRY_RESULT 3014 * @param event packet 3015 * @return rssi_available 3016 * @note: btstack_type 1 3017 */ 3018 static inline uint8_t gap_event_inquiry_result_get_rssi_available(const uint8_t * event){ 3019 return event[14]; 3020 } 3021 /** 3022 * @brief Get field rssi from event GAP_EVENT_INQUIRY_RESULT 3023 * @param event packet 3024 * @return rssi 3025 * @note: btstack_type 1 3026 */ 3027 static inline uint8_t gap_event_inquiry_result_get_rssi(const uint8_t * event){ 3028 return event[15]; 3029 } 3030 /** 3031 * @brief Get field name_available from event GAP_EVENT_INQUIRY_RESULT 3032 * @param event packet 3033 * @return name_available 3034 * @note: btstack_type 1 3035 */ 3036 static inline uint8_t gap_event_inquiry_result_get_name_available(const uint8_t * event){ 3037 return event[16]; 3038 } 3039 /** 3040 * @brief Get field name_len from event GAP_EVENT_INQUIRY_RESULT 3041 * @param event packet 3042 * @return name_len 3043 * @note: btstack_type J 3044 */ 3045 static inline int gap_event_inquiry_result_get_name_len(const uint8_t * event){ 3046 return event[17]; 3047 } 3048 /** 3049 * @brief Get field name from event GAP_EVENT_INQUIRY_RESULT 3050 * @param event packet 3051 * @return name 3052 * @note: btstack_type V 3053 */ 3054 static inline const uint8_t * gap_event_inquiry_result_get_name(const uint8_t * event){ 3055 return &event[18]; 3056 } 3057 3058 /** 3059 * @brief Get field status from event GAP_EVENT_INQUIRY_COMPLETE 3060 * @param event packet 3061 * @return status 3062 * @note: btstack_type 1 3063 */ 3064 static inline uint8_t gap_event_inquiry_complete_get_status(const uint8_t * event){ 3065 return event[2]; 3066 } 3067 3068 /** 3069 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3070 * @param event packet 3071 * @return status 3072 * @note: btstack_type 1 3073 */ 3074 static inline uint8_t hci_subevent_le_connection_complete_get_status(const uint8_t * event){ 3075 return event[3]; 3076 } 3077 /** 3078 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3079 * @param event packet 3080 * @return connection_handle 3081 * @note: btstack_type H 3082 */ 3083 static inline hci_con_handle_t hci_subevent_le_connection_complete_get_connection_handle(const uint8_t * event){ 3084 return little_endian_read_16(event, 4); 3085 } 3086 /** 3087 * @brief Get field role from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3088 * @param event packet 3089 * @return role 3090 * @note: btstack_type 1 3091 */ 3092 static inline uint8_t hci_subevent_le_connection_complete_get_role(const uint8_t * event){ 3093 return event[6]; 3094 } 3095 /** 3096 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3097 * @param event packet 3098 * @return peer_address_type 3099 * @note: btstack_type 1 3100 */ 3101 static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(const uint8_t * event){ 3102 return event[7]; 3103 } 3104 /** 3105 * @brief Get field peer_address from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3106 * @param event packet 3107 * @param Pointer to storage for peer_address 3108 * @note: btstack_type B 3109 */ 3110 static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){ 3111 reverse_bd_addr(&event[8], peer_address); 3112 } 3113 /** 3114 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3115 * @param event packet 3116 * @return conn_interval 3117 * @note: btstack_type 2 3118 */ 3119 static inline uint16_t hci_subevent_le_connection_complete_get_conn_interval(const uint8_t * event){ 3120 return little_endian_read_16(event, 14); 3121 } 3122 /** 3123 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3124 * @param event packet 3125 * @return conn_latency 3126 * @note: btstack_type 2 3127 */ 3128 static inline uint16_t hci_subevent_le_connection_complete_get_conn_latency(const uint8_t * event){ 3129 return little_endian_read_16(event, 16); 3130 } 3131 /** 3132 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3133 * @param event packet 3134 * @return supervision_timeout 3135 * @note: btstack_type 2 3136 */ 3137 static inline uint16_t hci_subevent_le_connection_complete_get_supervision_timeout(const uint8_t * event){ 3138 return little_endian_read_16(event, 18); 3139 } 3140 /** 3141 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE 3142 * @param event packet 3143 * @return master_clock_accuracy 3144 * @note: btstack_type 1 3145 */ 3146 static inline uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3147 return event[20]; 3148 } 3149 3150 /** 3151 * @brief Get field status from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3152 * @param event packet 3153 * @return status 3154 * @note: btstack_type 1 3155 */ 3156 static inline uint8_t hci_subevent_le_connection_update_complete_get_status(const uint8_t * event){ 3157 return event[3]; 3158 } 3159 /** 3160 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3161 * @param event packet 3162 * @return connection_handle 3163 * @note: btstack_type H 3164 */ 3165 static inline hci_con_handle_t hci_subevent_le_connection_update_complete_get_connection_handle(const uint8_t * event){ 3166 return little_endian_read_16(event, 4); 3167 } 3168 /** 3169 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3170 * @param event packet 3171 * @return conn_interval 3172 * @note: btstack_type 2 3173 */ 3174 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_interval(const uint8_t * event){ 3175 return little_endian_read_16(event, 6); 3176 } 3177 /** 3178 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3179 * @param event packet 3180 * @return conn_latency 3181 * @note: btstack_type 2 3182 */ 3183 static inline uint16_t hci_subevent_le_connection_update_complete_get_conn_latency(const uint8_t * event){ 3184 return little_endian_read_16(event, 8); 3185 } 3186 /** 3187 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 3188 * @param event packet 3189 * @return supervision_timeout 3190 * @note: btstack_type 2 3191 */ 3192 static inline uint16_t hci_subevent_le_connection_update_complete_get_supervision_timeout(const uint8_t * event){ 3193 return little_endian_read_16(event, 10); 3194 } 3195 3196 /** 3197 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3198 * @param event packet 3199 * @return connection_handle 3200 * @note: btstack_type H 3201 */ 3202 static inline hci_con_handle_t hci_subevent_le_read_remote_used_features_complete_get_connection_handle(const uint8_t * event){ 3203 return little_endian_read_16(event, 3); 3204 } 3205 /** 3206 * @brief Get field random_number from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3207 * @param event packet 3208 * @return random_number 3209 * @note: btstack_type D 3210 */ 3211 static inline const uint8_t * hci_subevent_le_read_remote_used_features_complete_get_random_number(const uint8_t * event){ 3212 return (const uint8_t *) &event[5]; 3213 } 3214 /** 3215 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 3216 * @param event packet 3217 * @return encryption_diversifier 3218 * @note: btstack_type 2 3219 */ 3220 static inline uint16_t hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(const uint8_t * event){ 3221 return little_endian_read_16(event, 13); 3222 } 3223 3224 /** 3225 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3226 * @param event packet 3227 * @return connection_handle 3228 * @note: btstack_type H 3229 */ 3230 static inline hci_con_handle_t hci_subevent_le_long_term_key_request_get_connection_handle(const uint8_t * event){ 3231 return little_endian_read_16(event, 3); 3232 } 3233 /** 3234 * @brief Get field random_number from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3235 * @param event packet 3236 * @return random_number 3237 * @note: btstack_type D 3238 */ 3239 static inline const uint8_t * hci_subevent_le_long_term_key_request_get_random_number(const uint8_t * event){ 3240 return (const uint8_t *) &event[5]; 3241 } 3242 /** 3243 * @brief Get field encryption_diversifier from event HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 3244 * @param event packet 3245 * @return encryption_diversifier 3246 * @note: btstack_type 2 3247 */ 3248 static inline uint16_t hci_subevent_le_long_term_key_request_get_encryption_diversifier(const uint8_t * event){ 3249 return little_endian_read_16(event, 13); 3250 } 3251 3252 /** 3253 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3254 * @param event packet 3255 * @return connection_handle 3256 * @note: btstack_type H 3257 */ 3258 static inline hci_con_handle_t hci_subevent_le_remote_connection_parameter_request_get_connection_handle(const uint8_t * event){ 3259 return little_endian_read_16(event, 3); 3260 } 3261 /** 3262 * @brief Get field interval_min from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3263 * @param event packet 3264 * @return interval_min 3265 * @note: btstack_type 2 3266 */ 3267 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_min(const uint8_t * event){ 3268 return little_endian_read_16(event, 5); 3269 } 3270 /** 3271 * @brief Get field interval_max from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3272 * @param event packet 3273 * @return interval_max 3274 * @note: btstack_type 2 3275 */ 3276 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_interval_max(const uint8_t * event){ 3277 return little_endian_read_16(event, 7); 3278 } 3279 /** 3280 * @brief Get field latency from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3281 * @param event packet 3282 * @return latency 3283 * @note: btstack_type 2 3284 */ 3285 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_latency(const uint8_t * event){ 3286 return little_endian_read_16(event, 9); 3287 } 3288 /** 3289 * @brief Get field timeout from event HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 3290 * @param event packet 3291 * @return timeout 3292 * @note: btstack_type 2 3293 */ 3294 static inline uint16_t hci_subevent_le_remote_connection_parameter_request_get_timeout(const uint8_t * event){ 3295 return little_endian_read_16(event, 11); 3296 } 3297 3298 /** 3299 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3300 * @param event packet 3301 * @return connection_handle 3302 * @note: btstack_type H 3303 */ 3304 static inline hci_con_handle_t hci_subevent_le_data_length_change_get_connection_handle(const uint8_t * event){ 3305 return little_endian_read_16(event, 3); 3306 } 3307 /** 3308 * @brief Get field max_tx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3309 * @param event packet 3310 * @return max_tx_octets 3311 * @note: btstack_type 2 3312 */ 3313 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_octets(const uint8_t * event){ 3314 return little_endian_read_16(event, 5); 3315 } 3316 /** 3317 * @brief Get field max_tx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3318 * @param event packet 3319 * @return max_tx_time 3320 * @note: btstack_type 2 3321 */ 3322 static inline uint16_t hci_subevent_le_data_length_change_get_max_tx_time(const uint8_t * event){ 3323 return little_endian_read_16(event, 7); 3324 } 3325 /** 3326 * @brief Get field max_rx_octets from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3327 * @param event packet 3328 * @return max_rx_octets 3329 * @note: btstack_type 2 3330 */ 3331 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_octets(const uint8_t * event){ 3332 return little_endian_read_16(event, 9); 3333 } 3334 /** 3335 * @brief Get field max_rx_time from event HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 3336 * @param event packet 3337 * @return max_rx_time 3338 * @note: btstack_type 2 3339 */ 3340 static inline uint16_t hci_subevent_le_data_length_change_get_max_rx_time(const uint8_t * event){ 3341 return little_endian_read_16(event, 11); 3342 } 3343 3344 /** 3345 * @brief Get field status from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3346 * @param event packet 3347 * @return status 3348 * @note: btstack_type 1 3349 */ 3350 static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_status(const uint8_t * event){ 3351 return event[3]; 3352 } 3353 /** 3354 * @brief Get field dhkey_x from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3355 * @param event packet 3356 * @param Pointer to storage for dhkey_x 3357 * @note: btstack_type Q 3358 */ 3359 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){ 3360 reverse_bytes(&event[4], dhkey_x, 32); 3361 } 3362 /** 3363 * @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 3364 * @param event packet 3365 * @param Pointer to storage for dhkey_y 3366 * @note: btstack_type Q 3367 */ 3368 static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){ 3369 reverse_bytes(&event[36], dhkey_y, 32); 3370 } 3371 3372 /** 3373 * @brief Get field status from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3374 * @param event packet 3375 * @return status 3376 * @note: btstack_type 1 3377 */ 3378 static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const uint8_t * event){ 3379 return event[3]; 3380 } 3381 /** 3382 * @brief Get field dhkey from event HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 3383 * @param event packet 3384 * @param Pointer to storage for dhkey 3385 * @note: btstack_type Q 3386 */ 3387 static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey(const uint8_t * event, uint8_t * dhkey){ 3388 reverse_bytes(&event[4], dhkey, 32); 3389 } 3390 3391 /** 3392 * @brief Get field status from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3393 * @param event packet 3394 * @return status 3395 * @note: btstack_type 1 3396 */ 3397 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_status(const uint8_t * event){ 3398 return event[3]; 3399 } 3400 /** 3401 * @brief Get field connection_handle from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3402 * @param event packet 3403 * @return connection_handle 3404 * @note: btstack_type H 3405 */ 3406 static inline hci_con_handle_t hci_subevent_le_enhanced_connection_complete_get_connection_handle(const uint8_t * event){ 3407 return little_endian_read_16(event, 4); 3408 } 3409 /** 3410 * @brief Get field role from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3411 * @param event packet 3412 * @return role 3413 * @note: btstack_type 1 3414 */ 3415 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_role(const uint8_t * event){ 3416 return event[6]; 3417 } 3418 /** 3419 * @brief Get field peer_address_type from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3420 * @param event packet 3421 * @return peer_address_type 3422 * @note: btstack_type 1 3423 */ 3424 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_address_type(const uint8_t * event){ 3425 return event[7]; 3426 } 3427 /** 3428 * @brief Get field perr_addresss from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3429 * @param event packet 3430 * @param Pointer to storage for perr_addresss 3431 * @note: btstack_type B 3432 */ 3433 static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){ 3434 reverse_bd_addr(&event[8], perr_addresss); 3435 } 3436 /** 3437 * @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3438 * @param event packet 3439 * @param Pointer to storage for local_resolvable_private_addres 3440 * @note: btstack_type B 3441 */ 3442 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){ 3443 reverse_bd_addr(&event[14], local_resolvable_private_addres); 3444 } 3445 /** 3446 * @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3447 * @param event packet 3448 * @param Pointer to storage for peer_resolvable_private_addres 3449 * @note: btstack_type B 3450 */ 3451 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){ 3452 reverse_bd_addr(&event[20], peer_resolvable_private_addres); 3453 } 3454 /** 3455 * @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3456 * @param event packet 3457 * @return conn_interval 3458 * @note: btstack_type 2 3459 */ 3460 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_interval(const uint8_t * event){ 3461 return little_endian_read_16(event, 26); 3462 } 3463 /** 3464 * @brief Get field conn_latency from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3465 * @param event packet 3466 * @return conn_latency 3467 * @note: btstack_type 2 3468 */ 3469 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_conn_latency(const uint8_t * event){ 3470 return little_endian_read_16(event, 28); 3471 } 3472 /** 3473 * @brief Get field supervision_timeout from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3474 * @param event packet 3475 * @return supervision_timeout 3476 * @note: btstack_type 2 3477 */ 3478 static inline uint16_t hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(const uint8_t * event){ 3479 return little_endian_read_16(event, 30); 3480 } 3481 /** 3482 * @brief Get field master_clock_accuracy from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 3483 * @param event packet 3484 * @return master_clock_accuracy 3485 * @note: btstack_type 1 3486 */ 3487 static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_master_clock_accuracy(const uint8_t * event){ 3488 return event[32]; 3489 } 3490 3491 /** 3492 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 3493 * @param event packet 3494 * @return status 3495 * @note: btstack_type 1 3496 */ 3497 static inline uint8_t hsp_subevent_rfcomm_connection_complete_get_status(const uint8_t * event){ 3498 return event[3]; 3499 } 3500 3501 /** 3502 * @brief Get field status from event HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 3503 * @param event packet 3504 * @return status 3505 * @note: btstack_type 1 3506 */ 3507 static inline uint8_t hsp_subevent_rfcomm_disconnection_complete_get_status(const uint8_t * event){ 3508 return event[3]; 3509 } 3510 3511 /** 3512 * @brief Get field status from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3513 * @param event packet 3514 * @return status 3515 * @note: btstack_type 1 3516 */ 3517 static inline uint8_t hsp_subevent_audio_connection_complete_get_status(const uint8_t * event){ 3518 return event[3]; 3519 } 3520 /** 3521 * @brief Get field handle from event HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 3522 * @param event packet 3523 * @return handle 3524 * @note: btstack_type H 3525 */ 3526 static inline hci_con_handle_t hsp_subevent_audio_connection_complete_get_handle(const uint8_t * event){ 3527 return little_endian_read_16(event, 4); 3528 } 3529 3530 /** 3531 * @brief Get field status from event HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 3532 * @param event packet 3533 * @return status 3534 * @note: btstack_type 1 3535 */ 3536 static inline uint8_t hsp_subevent_audio_disconnection_complete_get_status(const uint8_t * event){ 3537 return event[3]; 3538 } 3539 3540 3541 /** 3542 * @brief Get field gain from event HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 3543 * @param event packet 3544 * @return gain 3545 * @note: btstack_type 1 3546 */ 3547 static inline uint8_t hsp_subevent_microphone_gain_changed_get_gain(const uint8_t * event){ 3548 return event[3]; 3549 } 3550 3551 /** 3552 * @brief Get field gain from event HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 3553 * @param event packet 3554 * @return gain 3555 * @note: btstack_type 1 3556 */ 3557 static inline uint8_t hsp_subevent_speaker_gain_changed_get_gain(const uint8_t * event){ 3558 return event[3]; 3559 } 3560 3561 /** 3562 * @brief Get field value_length from event HSP_SUBEVENT_HS_COMMAND 3563 * @param event packet 3564 * @return value_length 3565 * @note: btstack_type J 3566 */ 3567 static inline int hsp_subevent_hs_command_get_value_length(const uint8_t * event){ 3568 return event[3]; 3569 } 3570 /** 3571 * @brief Get field value from event HSP_SUBEVENT_HS_COMMAND 3572 * @param event packet 3573 * @return value 3574 * @note: btstack_type V 3575 */ 3576 static inline const uint8_t * hsp_subevent_hs_command_get_value(const uint8_t * event){ 3577 return &event[4]; 3578 } 3579 3580 /** 3581 * @brief Get field value_length from event HSP_SUBEVENT_AG_INDICATION 3582 * @param event packet 3583 * @return value_length 3584 * @note: btstack_type J 3585 */ 3586 static inline int hsp_subevent_ag_indication_get_value_length(const uint8_t * event){ 3587 return event[3]; 3588 } 3589 /** 3590 * @brief Get field value from event HSP_SUBEVENT_AG_INDICATION 3591 * @param event packet 3592 * @return value 3593 * @note: btstack_type V 3594 */ 3595 static inline const uint8_t * hsp_subevent_ag_indication_get_value(const uint8_t * event){ 3596 return &event[4]; 3597 } 3598 3599 /** 3600 * @brief Get field status from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3601 * @param event packet 3602 * @return status 3603 * @note: btstack_type 1 3604 */ 3605 static inline uint8_t hfp_subevent_service_level_connection_established_get_status(const uint8_t * event){ 3606 return event[3]; 3607 } 3608 /** 3609 * @brief Get field con_handle from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3610 * @param event packet 3611 * @return con_handle 3612 * @note: btstack_type H 3613 */ 3614 static inline hci_con_handle_t hfp_subevent_service_level_connection_established_get_con_handle(const uint8_t * event){ 3615 return little_endian_read_16(event, 4); 3616 } 3617 /** 3618 * @brief Get field bd_addr from event HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 3619 * @param event packet 3620 * @param Pointer to storage for bd_addr 3621 * @note: btstack_type B 3622 */ 3623 static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3624 reverse_bd_addr(&event[6], bd_addr); 3625 } 3626 3627 3628 /** 3629 * @brief Get field status from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3630 * @param event packet 3631 * @return status 3632 * @note: btstack_type 1 3633 */ 3634 static inline uint8_t hfp_subevent_audio_connection_established_get_status(const uint8_t * event){ 3635 return event[3]; 3636 } 3637 /** 3638 * @brief Get field handle from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3639 * @param event packet 3640 * @return handle 3641 * @note: btstack_type H 3642 */ 3643 static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_handle(const uint8_t * event){ 3644 return little_endian_read_16(event, 4); 3645 } 3646 /** 3647 * @brief Get field bd_addr from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3648 * @param event packet 3649 * @param Pointer to storage for bd_addr 3650 * @note: btstack_type B 3651 */ 3652 static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 3653 reverse_bd_addr(&event[6], bd_addr); 3654 } 3655 /** 3656 * @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 3657 * @param event packet 3658 * @return negotiated_codec 3659 * @note: btstack_type 1 3660 */ 3661 static inline uint8_t hfp_subevent_audio_connection_established_get_negotiated_codec(const uint8_t * event){ 3662 return event[12]; 3663 } 3664 3665 3666 /** 3667 * @brief Get field status from event HFP_SUBEVENT_COMPLETE 3668 * @param event packet 3669 * @return status 3670 * @note: btstack_type 1 3671 */ 3672 static inline uint8_t hfp_subevent_complete_get_status(const uint8_t * event){ 3673 return event[3]; 3674 } 3675 3676 /** 3677 * @brief Get field indicator_index from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3678 * @param event packet 3679 * @return indicator_index 3680 * @note: btstack_type 1 3681 */ 3682 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_index(const uint8_t * event){ 3683 return event[3]; 3684 } 3685 /** 3686 * @brief Get field indicator_status from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3687 * @param event packet 3688 * @return indicator_status 3689 * @note: btstack_type 1 3690 */ 3691 static inline uint8_t hfp_subevent_ag_indicator_status_changed_get_indicator_status(const uint8_t * event){ 3692 return event[4]; 3693 } 3694 /** 3695 * @brief Get field indicator_name from event HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 3696 * @param event packet 3697 * @return indicator_name 3698 * @note: btstack_type T 3699 */ 3700 static inline const char * hfp_subevent_ag_indicator_status_changed_get_indicator_name(const uint8_t * event){ 3701 return (const char *) &event[5]; 3702 } 3703 3704 /** 3705 * @brief Get field network_operator_mode from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3706 * @param event packet 3707 * @return network_operator_mode 3708 * @note: btstack_type 1 3709 */ 3710 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_mode(const uint8_t * event){ 3711 return event[3]; 3712 } 3713 /** 3714 * @brief Get field network_operator_format from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3715 * @param event packet 3716 * @return network_operator_format 3717 * @note: btstack_type 1 3718 */ 3719 static inline uint8_t hfp_subevent_network_operator_changed_get_network_operator_format(const uint8_t * event){ 3720 return event[4]; 3721 } 3722 /** 3723 * @brief Get field network_operator_name from event HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 3724 * @param event packet 3725 * @return network_operator_name 3726 * @note: btstack_type T 3727 */ 3728 static inline const char * hfp_subevent_network_operator_changed_get_network_operator_name(const uint8_t * event){ 3729 return (const char *) &event[5]; 3730 } 3731 3732 /** 3733 * @brief Get field error from event HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 3734 * @param event packet 3735 * @return error 3736 * @note: btstack_type 1 3737 */ 3738 static inline uint8_t hfp_subevent_extended_audio_gateway_error_get_error(const uint8_t * event){ 3739 return event[3]; 3740 } 3741 3742 3743 3744 3745 /** 3746 * @brief Get field number from event HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 3747 * @param event packet 3748 * @return number 3749 * @note: btstack_type T 3750 */ 3751 static inline const char * hfp_subevent_place_call_with_number_get_number(const uint8_t * event){ 3752 return (const char *) &event[3]; 3753 } 3754 3755 3756 /** 3757 * @brief Get field number from event HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 3758 * @param event packet 3759 * @return number 3760 * @note: btstack_type T 3761 */ 3762 static inline const char * hfp_subevent_number_for_voice_tag_get_number(const uint8_t * event){ 3763 return (const char *) &event[3]; 3764 } 3765 3766 /** 3767 * @brief Get field dtmf from event HFP_SUBEVENT_TRANSMIT_DTMF_CODES 3768 * @param event packet 3769 * @return dtmf 3770 * @note: btstack_type T 3771 */ 3772 static inline const char * hfp_subevent_transmit_dtmf_codes_get_dtmf(const uint8_t * event){ 3773 return (const char *) &event[3]; 3774 } 3775 3776 3777 3778 3779 /** 3780 * @brief Get field status from event HFP_SUBEVENT_SPEAKER_VOLUME 3781 * @param event packet 3782 * @return status 3783 * @note: btstack_type 1 3784 */ 3785 static inline uint8_t hfp_subevent_speaker_volume_get_status(const uint8_t * event){ 3786 return event[3]; 3787 } 3788 /** 3789 * @brief Get field gain from event HFP_SUBEVENT_SPEAKER_VOLUME 3790 * @param event packet 3791 * @return gain 3792 * @note: btstack_type 1 3793 */ 3794 static inline uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t * event){ 3795 return event[4]; 3796 } 3797 3798 /** 3799 * @brief Get field status from event HFP_SUBEVENT_MICROPHONE_VOLUME 3800 * @param event packet 3801 * @return status 3802 * @note: btstack_type 1 3803 */ 3804 static inline uint8_t hfp_subevent_microphone_volume_get_status(const uint8_t * event){ 3805 return event[3]; 3806 } 3807 /** 3808 * @brief Get field gain from event HFP_SUBEVENT_MICROPHONE_VOLUME 3809 * @param event packet 3810 * @return gain 3811 * @note: btstack_type 1 3812 */ 3813 static inline uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t * event){ 3814 return event[4]; 3815 } 3816 3817 /** 3818 * @brief Get field type from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 3819 * @param event packet 3820 * @return type 3821 * @note: btstack_type 1 3822 */ 3823 static inline uint8_t hfp_subevent_call_waiting_notification_get_type(const uint8_t * event){ 3824 return event[3]; 3825 } 3826 /** 3827 * @brief Get field number from event HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 3828 * @param event packet 3829 * @return number 3830 * @note: btstack_type T 3831 */ 3832 static inline const char * hfp_subevent_call_waiting_notification_get_number(const uint8_t * event){ 3833 return (const char *) &event[4]; 3834 } 3835 3836 /** 3837 * @brief Get field type from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 3838 * @param event packet 3839 * @return type 3840 * @note: btstack_type 1 3841 */ 3842 static inline uint8_t hfp_subevent_calling_line_identification_notification_get_type(const uint8_t * event){ 3843 return event[3]; 3844 } 3845 /** 3846 * @brief Get field number from event HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 3847 * @param event packet 3848 * @return number 3849 * @note: btstack_type T 3850 */ 3851 static inline const char * hfp_subevent_calling_line_identification_notification_get_number(const uint8_t * event){ 3852 return (const char *) &event[4]; 3853 } 3854 3855 /** 3856 * @brief Get field clcc_idx from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3857 * @param event packet 3858 * @return clcc_idx 3859 * @note: btstack_type 1 3860 */ 3861 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_idx(const uint8_t * event){ 3862 return event[3]; 3863 } 3864 /** 3865 * @brief Get field clcc_dir from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3866 * @param event packet 3867 * @return clcc_dir 3868 * @note: btstack_type 1 3869 */ 3870 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_dir(const uint8_t * event){ 3871 return event[4]; 3872 } 3873 /** 3874 * @brief Get field clcc_status from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3875 * @param event packet 3876 * @return clcc_status 3877 * @note: btstack_type 1 3878 */ 3879 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_status(const uint8_t * event){ 3880 return event[5]; 3881 } 3882 /** 3883 * @brief Get field clcc_mpty from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3884 * @param event packet 3885 * @return clcc_mpty 3886 * @note: btstack_type 1 3887 */ 3888 static inline uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t * event){ 3889 return event[6]; 3890 } 3891 /** 3892 * @brief Get field bnip_type from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3893 * @param event packet 3894 * @return bnip_type 3895 * @note: btstack_type 1 3896 */ 3897 static inline uint8_t hfp_subevent_enhanced_call_status_get_bnip_type(const uint8_t * event){ 3898 return event[7]; 3899 } 3900 /** 3901 * @brief Get field bnip_number from event HFP_SUBEVENT_ENHANCED_CALL_STATUS 3902 * @param event packet 3903 * @return bnip_number 3904 * @note: btstack_type T 3905 */ 3906 static inline const char * hfp_subevent_enhanced_call_status_get_bnip_number(const uint8_t * event){ 3907 return (const char *) &event[8]; 3908 } 3909 3910 /** 3911 * @brief Get field status from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3912 * @param event packet 3913 * @return status 3914 * @note: btstack_type 1 3915 */ 3916 static inline uint8_t hfp_subevent_subscriber_number_information_get_status(const uint8_t * event){ 3917 return event[3]; 3918 } 3919 /** 3920 * @brief Get field bnip_type from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3921 * @param event packet 3922 * @return bnip_type 3923 * @note: btstack_type 1 3924 */ 3925 static inline uint8_t hfp_subevent_subscriber_number_information_get_bnip_type(const uint8_t * event){ 3926 return event[4]; 3927 } 3928 /** 3929 * @brief Get field bnip_number from event HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 3930 * @param event packet 3931 * @return bnip_number 3932 * @note: btstack_type T 3933 */ 3934 static inline const char * hfp_subevent_subscriber_number_information_get_bnip_number(const uint8_t * event){ 3935 return (const char *) &event[5]; 3936 } 3937 3938 /** 3939 * @brief Get field value from event HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 3940 * @param event packet 3941 * @return value 3942 * @note: btstack_type T 3943 */ 3944 static inline const char * hfp_subevent_response_and_hold_status_get_value(const uint8_t * event){ 3945 return (const char *) &event[3]; 3946 } 3947 3948 #ifdef ENABLE_BLE 3949 /** 3950 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_CONNECTED 3951 * @param event packet 3952 * @return handle 3953 * @note: btstack_type H 3954 */ 3955 static inline hci_con_handle_t ancs_subevent_client_connected_get_handle(const uint8_t * event){ 3956 return little_endian_read_16(event, 3); 3957 } 3958 #endif 3959 3960 #ifdef ENABLE_BLE 3961 /** 3962 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3963 * @param event packet 3964 * @return handle 3965 * @note: btstack_type H 3966 */ 3967 static inline hci_con_handle_t ancs_subevent_client_notification_get_handle(const uint8_t * event){ 3968 return little_endian_read_16(event, 3); 3969 } 3970 /** 3971 * @brief Get field attribute_id from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3972 * @param event packet 3973 * @return attribute_id 3974 * @note: btstack_type 2 3975 */ 3976 static inline uint16_t ancs_subevent_client_notification_get_attribute_id(const uint8_t * event){ 3977 return little_endian_read_16(event, 5); 3978 } 3979 /** 3980 * @brief Get field text from event ANCS_SUBEVENT_CLIENT_NOTIFICATION 3981 * @param event packet 3982 * @return text 3983 * @note: btstack_type T 3984 */ 3985 static inline const char * ancs_subevent_client_notification_get_text(const uint8_t * event){ 3986 return (const char *) &event[7]; 3987 } 3988 #endif 3989 3990 #ifdef ENABLE_BLE 3991 /** 3992 * @brief Get field handle from event ANCS_SUBEVENT_CLIENT_DISCONNECTED 3993 * @param event packet 3994 * @return handle 3995 * @note: btstack_type H 3996 */ 3997 static inline hci_con_handle_t ancs_subevent_client_disconnected_get_handle(const uint8_t * event){ 3998 return little_endian_read_16(event, 3); 3999 } 4000 #endif 4001 4002 /** 4003 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4004 * @param event packet 4005 * @return avdtp_cid 4006 * @note: btstack_type 2 4007 */ 4008 static inline uint16_t avdtp_subevent_signaling_accept_get_avdtp_cid(const uint8_t * event){ 4009 return little_endian_read_16(event, 3); 4010 } 4011 /** 4012 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4013 * @param event packet 4014 * @return local_seid 4015 * @note: btstack_type 1 4016 */ 4017 static inline uint8_t avdtp_subevent_signaling_accept_get_local_seid(const uint8_t * event){ 4018 return event[5]; 4019 } 4020 /** 4021 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_ACCEPT 4022 * @param event packet 4023 * @return signal_identifier 4024 * @note: btstack_type 1 4025 */ 4026 static inline uint8_t avdtp_subevent_signaling_accept_get_signal_identifier(const uint8_t * event){ 4027 return event[6]; 4028 } 4029 4030 /** 4031 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4032 * @param event packet 4033 * @return avdtp_cid 4034 * @note: btstack_type 2 4035 */ 4036 static inline uint16_t avdtp_subevent_signaling_reject_get_avdtp_cid(const uint8_t * event){ 4037 return little_endian_read_16(event, 3); 4038 } 4039 /** 4040 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REJECT 4041 * @param event packet 4042 * @return local_seid 4043 * @note: btstack_type 1 4044 */ 4045 static inline uint8_t avdtp_subevent_signaling_reject_get_local_seid(const uint8_t * event){ 4046 return event[5]; 4047 } 4048 /** 4049 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_REJECT 4050 * @param event packet 4051 * @return signal_identifier 4052 * @note: btstack_type 1 4053 */ 4054 static inline uint8_t avdtp_subevent_signaling_reject_get_signal_identifier(const uint8_t * event){ 4055 return event[6]; 4056 } 4057 4058 /** 4059 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4060 * @param event packet 4061 * @return avdtp_cid 4062 * @note: btstack_type 2 4063 */ 4064 static inline uint16_t avdtp_subevent_signaling_general_reject_get_avdtp_cid(const uint8_t * event){ 4065 return little_endian_read_16(event, 3); 4066 } 4067 /** 4068 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4069 * @param event packet 4070 * @return local_seid 4071 * @note: btstack_type 1 4072 */ 4073 static inline uint8_t avdtp_subevent_signaling_general_reject_get_local_seid(const uint8_t * event){ 4074 return event[5]; 4075 } 4076 /** 4077 * @brief Get field signal_identifier from event AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 4078 * @param event packet 4079 * @return signal_identifier 4080 * @note: btstack_type 1 4081 */ 4082 static inline uint8_t avdtp_subevent_signaling_general_reject_get_signal_identifier(const uint8_t * event){ 4083 return event[6]; 4084 } 4085 4086 /** 4087 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4088 * @param event packet 4089 * @return avdtp_cid 4090 * @note: btstack_type 2 4091 */ 4092 static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp_cid(const uint8_t * event){ 4093 return little_endian_read_16(event, 3); 4094 } 4095 /** 4096 * @brief Get field bd_addr from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4097 * @param event packet 4098 * @param Pointer to storage for bd_addr 4099 * @note: btstack_type B 4100 */ 4101 static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4102 reverse_bd_addr(&event[5], bd_addr); 4103 } 4104 /** 4105 * @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 4106 * @param event packet 4107 * @return status 4108 * @note: btstack_type 1 4109 */ 4110 static inline uint8_t avdtp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 4111 return event[11]; 4112 } 4113 4114 /** 4115 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 4116 * @param event packet 4117 * @return avdtp_cid 4118 * @note: btstack_type 2 4119 */ 4120 static inline uint16_t avdtp_subevent_signaling_connection_released_get_avdtp_cid(const uint8_t * event){ 4121 return little_endian_read_16(event, 3); 4122 } 4123 4124 /** 4125 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4126 * @param event packet 4127 * @return avdtp_cid 4128 * @note: btstack_type 2 4129 */ 4130 static inline uint16_t avdtp_subevent_signaling_sep_found_get_avdtp_cid(const uint8_t * event){ 4131 return little_endian_read_16(event, 3); 4132 } 4133 /** 4134 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4135 * @param event packet 4136 * @return remote_seid 4137 * @note: btstack_type 1 4138 */ 4139 static inline uint8_t avdtp_subevent_signaling_sep_found_get_remote_seid(const uint8_t * event){ 4140 return event[5]; 4141 } 4142 /** 4143 * @brief Get field in_use from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4144 * @param event packet 4145 * @return in_use 4146 * @note: btstack_type 1 4147 */ 4148 static inline uint8_t avdtp_subevent_signaling_sep_found_get_in_use(const uint8_t * event){ 4149 return event[6]; 4150 } 4151 /** 4152 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4153 * @param event packet 4154 * @return media_type 4155 * @note: btstack_type 1 4156 */ 4157 static inline uint8_t avdtp_subevent_signaling_sep_found_get_media_type(const uint8_t * event){ 4158 return event[7]; 4159 } 4160 /** 4161 * @brief Get field sep_type from event AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 4162 * @param event packet 4163 * @return sep_type 4164 * @note: btstack_type 1 4165 */ 4166 static inline uint8_t avdtp_subevent_signaling_sep_found_get_sep_type(const uint8_t * event){ 4167 return event[8]; 4168 } 4169 4170 /** 4171 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4172 * @param event packet 4173 * @return avdtp_cid 4174 * @note: btstack_type 2 4175 */ 4176 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(const uint8_t * event){ 4177 return little_endian_read_16(event, 3); 4178 } 4179 /** 4180 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4181 * @param event packet 4182 * @return local_seid 4183 * @note: btstack_type 1 4184 */ 4185 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_local_seid(const uint8_t * event){ 4186 return event[5]; 4187 } 4188 /** 4189 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4190 * @param event packet 4191 * @return remote_seid 4192 * @note: btstack_type 1 4193 */ 4194 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_remote_seid(const uint8_t * event){ 4195 return event[6]; 4196 } 4197 /** 4198 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4199 * @param event packet 4200 * @return media_type 4201 * @note: btstack_type 1 4202 */ 4203 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_media_type(const uint8_t * event){ 4204 return event[7]; 4205 } 4206 /** 4207 * @brief Get field sampling_frequency_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4208 * @param event packet 4209 * @return sampling_frequency_bitmap 4210 * @note: btstack_type 1 4211 */ 4212 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_sampling_frequency_bitmap(const uint8_t * event){ 4213 return event[8]; 4214 } 4215 /** 4216 * @brief Get field channel_mode_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4217 * @param event packet 4218 * @return channel_mode_bitmap 4219 * @note: btstack_type 1 4220 */ 4221 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_channel_mode_bitmap(const uint8_t * event){ 4222 return event[9]; 4223 } 4224 /** 4225 * @brief Get field block_length_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4226 * @param event packet 4227 * @return block_length_bitmap 4228 * @note: btstack_type 1 4229 */ 4230 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_block_length_bitmap(const uint8_t * event){ 4231 return event[10]; 4232 } 4233 /** 4234 * @brief Get field subbands_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4235 * @param event packet 4236 * @return subbands_bitmap 4237 * @note: btstack_type 1 4238 */ 4239 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_subbands_bitmap(const uint8_t * event){ 4240 return event[11]; 4241 } 4242 /** 4243 * @brief Get field allocation_method_bitmap from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4244 * @param event packet 4245 * @return allocation_method_bitmap 4246 * @note: btstack_type 1 4247 */ 4248 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_allocation_method_bitmap(const uint8_t * event){ 4249 return event[12]; 4250 } 4251 /** 4252 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4253 * @param event packet 4254 * @return min_bitpool_value 4255 * @note: btstack_type 1 4256 */ 4257 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_min_bitpool_value(const uint8_t * event){ 4258 return event[13]; 4259 } 4260 /** 4261 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 4262 * @param event packet 4263 * @return max_bitpool_value 4264 * @note: btstack_type 1 4265 */ 4266 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_capability_get_max_bitpool_value(const uint8_t * event){ 4267 return event[14]; 4268 } 4269 4270 /** 4271 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4272 * @param event packet 4273 * @return avdtp_cid 4274 * @note: btstack_type 2 4275 */ 4276 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(const uint8_t * event){ 4277 return little_endian_read_16(event, 3); 4278 } 4279 /** 4280 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4281 * @param event packet 4282 * @return local_seid 4283 * @note: btstack_type 1 4284 */ 4285 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_local_seid(const uint8_t * event){ 4286 return event[5]; 4287 } 4288 /** 4289 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4290 * @param event packet 4291 * @return remote_seid 4292 * @note: btstack_type 1 4293 */ 4294 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_remote_seid(const uint8_t * event){ 4295 return event[6]; 4296 } 4297 /** 4298 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4299 * @param event packet 4300 * @return media_type 4301 * @note: btstack_type 1 4302 */ 4303 static inline uint8_t avdtp_subevent_signaling_media_codec_other_capability_get_media_type(const uint8_t * event){ 4304 return event[7]; 4305 } 4306 /** 4307 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4308 * @param event packet 4309 * @return media_codec_type 4310 * @note: btstack_type 2 4311 */ 4312 static inline uint16_t avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(const uint8_t * event){ 4313 return little_endian_read_16(event, 8); 4314 } 4315 /** 4316 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4317 * @param event packet 4318 * @return media_codec_information_len 4319 * @note: btstack_type L 4320 */ 4321 static inline int avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(const uint8_t * event){ 4322 return little_endian_read_16(event, 10); 4323 } 4324 /** 4325 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 4326 * @param event packet 4327 * @return media_codec_information 4328 * @note: btstack_type V 4329 */ 4330 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information(const uint8_t * event){ 4331 return &event[12]; 4332 } 4333 4334 /** 4335 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4336 * @param event packet 4337 * @return avdtp_cid 4338 * @note: btstack_type 2 4339 */ 4340 static inline uint16_t avdtp_subevent_signaling_media_transport_capability_get_avdtp_cid(const uint8_t * event){ 4341 return little_endian_read_16(event, 3); 4342 } 4343 /** 4344 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4345 * @param event packet 4346 * @return local_seid 4347 * @note: btstack_type 1 4348 */ 4349 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_local_seid(const uint8_t * event){ 4350 return event[5]; 4351 } 4352 /** 4353 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 4354 * @param event packet 4355 * @return remote_seid 4356 * @note: btstack_type 1 4357 */ 4358 static inline uint8_t avdtp_subevent_signaling_media_transport_capability_get_remote_seid(const uint8_t * event){ 4359 return event[6]; 4360 } 4361 4362 /** 4363 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4364 * @param event packet 4365 * @return avdtp_cid 4366 * @note: btstack_type 2 4367 */ 4368 static inline uint16_t avdtp_subevent_signaling_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4369 return little_endian_read_16(event, 3); 4370 } 4371 /** 4372 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4373 * @param event packet 4374 * @return local_seid 4375 * @note: btstack_type 1 4376 */ 4377 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_local_seid(const uint8_t * event){ 4378 return event[5]; 4379 } 4380 /** 4381 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 4382 * @param event packet 4383 * @return remote_seid 4384 * @note: btstack_type 1 4385 */ 4386 static inline uint8_t avdtp_subevent_signaling_reporting_capability_get_remote_seid(const uint8_t * event){ 4387 return event[6]; 4388 } 4389 4390 /** 4391 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4392 * @param event packet 4393 * @return avdtp_cid 4394 * @note: btstack_type 2 4395 */ 4396 static inline uint16_t avdtp_subevent_signaling_recovery_capability_get_avdtp_cid(const uint8_t * event){ 4397 return little_endian_read_16(event, 3); 4398 } 4399 /** 4400 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4401 * @param event packet 4402 * @return local_seid 4403 * @note: btstack_type 1 4404 */ 4405 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_local_seid(const uint8_t * event){ 4406 return event[5]; 4407 } 4408 /** 4409 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4410 * @param event packet 4411 * @return remote_seid 4412 * @note: btstack_type 1 4413 */ 4414 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_remote_seid(const uint8_t * event){ 4415 return event[6]; 4416 } 4417 /** 4418 * @brief Get field recovery_type from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4419 * @param event packet 4420 * @return recovery_type 4421 * @note: btstack_type 1 4422 */ 4423 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_recovery_type(const uint8_t * event){ 4424 return event[7]; 4425 } 4426 /** 4427 * @brief Get field maximum_recovery_window_size from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4428 * @param event packet 4429 * @return maximum_recovery_window_size 4430 * @note: btstack_type 1 4431 */ 4432 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_recovery_window_size(const uint8_t * event){ 4433 return event[8]; 4434 } 4435 /** 4436 * @brief Get field maximum_number_media_packets from event AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 4437 * @param event packet 4438 * @return maximum_number_media_packets 4439 * @note: btstack_type 1 4440 */ 4441 static inline uint8_t avdtp_subevent_signaling_recovery_capability_get_maximum_number_media_packets(const uint8_t * event){ 4442 return event[9]; 4443 } 4444 4445 /** 4446 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4447 * @param event packet 4448 * @return avdtp_cid 4449 * @note: btstack_type 2 4450 */ 4451 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_avdtp_cid(const uint8_t * event){ 4452 return little_endian_read_16(event, 3); 4453 } 4454 /** 4455 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4456 * @param event packet 4457 * @return local_seid 4458 * @note: btstack_type 1 4459 */ 4460 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_local_seid(const uint8_t * event){ 4461 return event[5]; 4462 } 4463 /** 4464 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4465 * @param event packet 4466 * @return remote_seid 4467 * @note: btstack_type 1 4468 */ 4469 static inline uint8_t avdtp_subevent_signaling_content_protection_capability_get_remote_seid(const uint8_t * event){ 4470 return event[6]; 4471 } 4472 /** 4473 * @brief Get field cp_type from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4474 * @param event packet 4475 * @return cp_type 4476 * @note: btstack_type 2 4477 */ 4478 static inline uint16_t avdtp_subevent_signaling_content_protection_capability_get_cp_type(const uint8_t * event){ 4479 return little_endian_read_16(event, 7); 4480 } 4481 /** 4482 * @brief Get field cp_type_value_len from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4483 * @param event packet 4484 * @return cp_type_value_len 4485 * @note: btstack_type L 4486 */ 4487 static inline int avdtp_subevent_signaling_content_protection_capability_get_cp_type_value_len(const uint8_t * event){ 4488 return little_endian_read_16(event, 9); 4489 } 4490 /** 4491 * @brief Get field cp_type_value from event AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 4492 * @param event packet 4493 * @return cp_type_value 4494 * @note: btstack_type V 4495 */ 4496 static inline const uint8_t * avdtp_subevent_signaling_content_protection_capability_get_cp_type_value(const uint8_t * event){ 4497 return &event[11]; 4498 } 4499 4500 /** 4501 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4502 * @param event packet 4503 * @return avdtp_cid 4504 * @note: btstack_type 2 4505 */ 4506 static inline uint16_t avdtp_subevent_signaling_multiplexing_capability_get_avdtp_cid(const uint8_t * event){ 4507 return little_endian_read_16(event, 3); 4508 } 4509 /** 4510 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4511 * @param event packet 4512 * @return local_seid 4513 * @note: btstack_type 1 4514 */ 4515 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_local_seid(const uint8_t * event){ 4516 return event[5]; 4517 } 4518 /** 4519 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4520 * @param event packet 4521 * @return remote_seid 4522 * @note: btstack_type 1 4523 */ 4524 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_remote_seid(const uint8_t * event){ 4525 return event[6]; 4526 } 4527 /** 4528 * @brief Get field fragmentation from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4529 * @param event packet 4530 * @return fragmentation 4531 * @note: btstack_type 1 4532 */ 4533 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_fragmentation(const uint8_t * event){ 4534 return event[7]; 4535 } 4536 /** 4537 * @brief Get field transport_identifiers_num from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4538 * @param event packet 4539 * @return transport_identifiers_num 4540 * @note: btstack_type 1 4541 */ 4542 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_identifiers_num(const uint8_t * event){ 4543 return event[8]; 4544 } 4545 /** 4546 * @brief Get field transport_session_identifier_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4547 * @param event packet 4548 * @return transport_session_identifier_1 4549 * @note: btstack_type 1 4550 */ 4551 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_1(const uint8_t * event){ 4552 return event[9]; 4553 } 4554 /** 4555 * @brief Get field transport_session_identifier_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4556 * @param event packet 4557 * @return transport_session_identifier_2 4558 * @note: btstack_type 1 4559 */ 4560 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_2(const uint8_t * event){ 4561 return event[10]; 4562 } 4563 /** 4564 * @brief Get field transport_session_identifier_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4565 * @param event packet 4566 * @return transport_session_identifier_3 4567 * @note: btstack_type 1 4568 */ 4569 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_transport_session_identifier_3(const uint8_t * event){ 4570 return event[11]; 4571 } 4572 /** 4573 * @brief Get field tcid_1 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4574 * @param event packet 4575 * @return tcid_1 4576 * @note: btstack_type 1 4577 */ 4578 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_1(const uint8_t * event){ 4579 return event[12]; 4580 } 4581 /** 4582 * @brief Get field tcid_2 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4583 * @param event packet 4584 * @return tcid_2 4585 * @note: btstack_type 1 4586 */ 4587 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_2(const uint8_t * event){ 4588 return event[13]; 4589 } 4590 /** 4591 * @brief Get field tcid_3 from event AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 4592 * @param event packet 4593 * @return tcid_3 4594 * @note: btstack_type 1 4595 */ 4596 static inline uint8_t avdtp_subevent_signaling_multiplexing_capability_get_tcid_3(const uint8_t * event){ 4597 return event[14]; 4598 } 4599 4600 /** 4601 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4602 * @param event packet 4603 * @return avdtp_cid 4604 * @note: btstack_type 2 4605 */ 4606 static inline uint16_t avdtp_subevent_signaling_delay_reporting_capability_get_avdtp_cid(const uint8_t * event){ 4607 return little_endian_read_16(event, 3); 4608 } 4609 /** 4610 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4611 * @param event packet 4612 * @return local_seid 4613 * @note: btstack_type 1 4614 */ 4615 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_local_seid(const uint8_t * event){ 4616 return event[5]; 4617 } 4618 /** 4619 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 4620 * @param event packet 4621 * @return remote_seid 4622 * @note: btstack_type 1 4623 */ 4624 static inline uint8_t avdtp_subevent_signaling_delay_reporting_capability_get_remote_seid(const uint8_t * event){ 4625 return event[6]; 4626 } 4627 4628 /** 4629 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4630 * @param event packet 4631 * @return avdtp_cid 4632 * @note: btstack_type 2 4633 */ 4634 static inline uint16_t avdtp_subevent_signaling_header_compression_capability_get_avdtp_cid(const uint8_t * event){ 4635 return little_endian_read_16(event, 3); 4636 } 4637 /** 4638 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4639 * @param event packet 4640 * @return local_seid 4641 * @note: btstack_type 1 4642 */ 4643 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_local_seid(const uint8_t * event){ 4644 return event[5]; 4645 } 4646 /** 4647 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4648 * @param event packet 4649 * @return remote_seid 4650 * @note: btstack_type 1 4651 */ 4652 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_remote_seid(const uint8_t * event){ 4653 return event[6]; 4654 } 4655 /** 4656 * @brief Get field back_ch from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4657 * @param event packet 4658 * @return back_ch 4659 * @note: btstack_type 1 4660 */ 4661 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_back_ch(const uint8_t * event){ 4662 return event[7]; 4663 } 4664 /** 4665 * @brief Get field media from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4666 * @param event packet 4667 * @return media 4668 * @note: btstack_type 1 4669 */ 4670 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_media(const uint8_t * event){ 4671 return event[8]; 4672 } 4673 /** 4674 * @brief Get field recovery from event AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 4675 * @param event packet 4676 * @return recovery 4677 * @note: btstack_type 1 4678 */ 4679 static inline uint8_t avdtp_subevent_signaling_header_compression_capability_get_recovery(const uint8_t * event){ 4680 return event[9]; 4681 } 4682 4683 /** 4684 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4685 * @param event packet 4686 * @return avdtp_cid 4687 * @note: btstack_type 2 4688 */ 4689 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(const uint8_t * event){ 4690 return little_endian_read_16(event, 3); 4691 } 4692 /** 4693 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4694 * @param event packet 4695 * @return local_seid 4696 * @note: btstack_type 1 4697 */ 4698 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_local_seid(const uint8_t * event){ 4699 return event[5]; 4700 } 4701 /** 4702 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4703 * @param event packet 4704 * @return remote_seid 4705 * @note: btstack_type 1 4706 */ 4707 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_remote_seid(const uint8_t * event){ 4708 return event[6]; 4709 } 4710 /** 4711 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4712 * @param event packet 4713 * @return reconfigure 4714 * @note: btstack_type 1 4715 */ 4716 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 4717 return event[7]; 4718 } 4719 /** 4720 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4721 * @param event packet 4722 * @return media_type 4723 * @note: btstack_type 1 4724 */ 4725 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 4726 return event[8]; 4727 } 4728 /** 4729 * @brief Get field sampling_frequency from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4730 * @param event packet 4731 * @return sampling_frequency 4732 * @note: btstack_type 2 4733 */ 4734 static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 4735 return little_endian_read_16(event, 9); 4736 } 4737 /** 4738 * @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4739 * @param event packet 4740 * @return channel_mode 4741 * @note: btstack_type 1 4742 */ 4743 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 4744 return event[11]; 4745 } 4746 /** 4747 * @brief Get field num_channels from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4748 * @param event packet 4749 * @return num_channels 4750 * @note: btstack_type 1 4751 */ 4752 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 4753 return event[12]; 4754 } 4755 /** 4756 * @brief Get field block_length from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4757 * @param event packet 4758 * @return block_length 4759 * @note: btstack_type 1 4760 */ 4761 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 4762 return event[13]; 4763 } 4764 /** 4765 * @brief Get field subbands from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4766 * @param event packet 4767 * @return subbands 4768 * @note: btstack_type 1 4769 */ 4770 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 4771 return event[14]; 4772 } 4773 /** 4774 * @brief Get field allocation_method from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4775 * @param event packet 4776 * @return allocation_method 4777 * @note: btstack_type 1 4778 */ 4779 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 4780 return event[15]; 4781 } 4782 /** 4783 * @brief Get field min_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4784 * @param event packet 4785 * @return min_bitpool_value 4786 * @note: btstack_type 1 4787 */ 4788 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 4789 return event[16]; 4790 } 4791 /** 4792 * @brief Get field max_bitpool_value from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4793 * @param event packet 4794 * @return max_bitpool_value 4795 * @note: btstack_type 1 4796 */ 4797 static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 4798 return event[17]; 4799 } 4800 4801 /** 4802 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4803 * @param event packet 4804 * @return avdtp_cid 4805 * @note: btstack_type 2 4806 */ 4807 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(const uint8_t * event){ 4808 return little_endian_read_16(event, 3); 4809 } 4810 /** 4811 * @brief Get field local_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4812 * @param event packet 4813 * @return local_seid 4814 * @note: btstack_type 1 4815 */ 4816 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_local_seid(const uint8_t * event){ 4817 return event[5]; 4818 } 4819 /** 4820 * @brief Get field remote_seid from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4821 * @param event packet 4822 * @return remote_seid 4823 * @note: btstack_type 1 4824 */ 4825 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_remote_seid(const uint8_t * event){ 4826 return event[6]; 4827 } 4828 /** 4829 * @brief Get field reconfigure from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4830 * @param event packet 4831 * @return reconfigure 4832 * @note: btstack_type 1 4833 */ 4834 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 4835 return event[7]; 4836 } 4837 /** 4838 * @brief Get field media_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4839 * @param event packet 4840 * @return media_type 4841 * @note: btstack_type 1 4842 */ 4843 static inline uint8_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 4844 return event[8]; 4845 } 4846 /** 4847 * @brief Get field media_codec_type from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4848 * @param event packet 4849 * @return media_codec_type 4850 * @note: btstack_type 2 4851 */ 4852 static inline uint16_t avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 4853 return little_endian_read_16(event, 9); 4854 } 4855 /** 4856 * @brief Get field media_codec_information_len from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4857 * @param event packet 4858 * @return media_codec_information_len 4859 * @note: btstack_type L 4860 */ 4861 static inline int avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 4862 return little_endian_read_16(event, 11); 4863 } 4864 /** 4865 * @brief Get field media_codec_information from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 4866 * @param event packet 4867 * @return media_codec_information 4868 * @note: btstack_type V 4869 */ 4870 static inline const uint8_t * avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 4871 return &event[13]; 4872 } 4873 4874 /** 4875 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4876 * @param event packet 4877 * @return avdtp_cid 4878 * @note: btstack_type 2 4879 */ 4880 static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp_cid(const uint8_t * event){ 4881 return little_endian_read_16(event, 3); 4882 } 4883 /** 4884 * @brief Get field bd_addr from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4885 * @param event packet 4886 * @param Pointer to storage for bd_addr 4887 * @note: btstack_type B 4888 */ 4889 static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 4890 reverse_bd_addr(&event[5], bd_addr); 4891 } 4892 /** 4893 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4894 * @param event packet 4895 * @return local_seid 4896 * @note: btstack_type 1 4897 */ 4898 static inline uint8_t avdtp_subevent_streaming_connection_established_get_local_seid(const uint8_t * event){ 4899 return event[11]; 4900 } 4901 /** 4902 * @brief Get field remote_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4903 * @param event packet 4904 * @return remote_seid 4905 * @note: btstack_type 1 4906 */ 4907 static inline uint8_t avdtp_subevent_streaming_connection_established_get_remote_seid(const uint8_t * event){ 4908 return event[12]; 4909 } 4910 /** 4911 * @brief Get field status from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 4912 * @param event packet 4913 * @return status 4914 * @note: btstack_type 1 4915 */ 4916 static inline uint8_t avdtp_subevent_streaming_connection_established_get_status(const uint8_t * event){ 4917 return event[13]; 4918 } 4919 4920 /** 4921 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 4922 * @param event packet 4923 * @return avdtp_cid 4924 * @note: btstack_type 2 4925 */ 4926 static inline uint16_t avdtp_subevent_streaming_connection_released_get_avdtp_cid(const uint8_t * event){ 4927 return little_endian_read_16(event, 3); 4928 } 4929 /** 4930 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 4931 * @param event packet 4932 * @return local_seid 4933 * @note: btstack_type 1 4934 */ 4935 static inline uint8_t avdtp_subevent_streaming_connection_released_get_local_seid(const uint8_t * event){ 4936 return event[5]; 4937 } 4938 4939 /** 4940 * @brief Get field avdtp_cid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4941 * @param event packet 4942 * @return avdtp_cid 4943 * @note: btstack_type 2 4944 */ 4945 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(const uint8_t * event){ 4946 return little_endian_read_16(event, 3); 4947 } 4948 /** 4949 * @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4950 * @param event packet 4951 * @return local_seid 4952 * @note: btstack_type 1 4953 */ 4954 static inline uint8_t avdtp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 4955 return event[5]; 4956 } 4957 /** 4958 * @brief Get field sequence_number from event AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4959 * @param event packet 4960 * @return sequence_number 4961 * @note: btstack_type 2 4962 */ 4963 static inline uint16_t avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(const uint8_t * event){ 4964 return little_endian_read_16(event, 6); 4965 } 4966 4967 /** 4968 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4969 * @param event packet 4970 * @return a2dp_cid 4971 * @note: btstack_type 2 4972 */ 4973 static inline uint16_t a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(const uint8_t * event){ 4974 return little_endian_read_16(event, 3); 4975 } 4976 /** 4977 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 4978 * @param event packet 4979 * @return local_seid 4980 * @note: btstack_type 1 4981 */ 4982 static inline uint8_t a2dp_subevent_streaming_can_send_media_packet_now_get_local_seid(const uint8_t * event){ 4983 return event[5]; 4984 } 4985 4986 /** 4987 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4988 * @param event packet 4989 * @return a2dp_cid 4990 * @note: btstack_type 2 4991 */ 4992 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(const uint8_t * event){ 4993 return little_endian_read_16(event, 3); 4994 } 4995 /** 4996 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 4997 * @param event packet 4998 * @return int_seid 4999 * @note: btstack_type 1 5000 */ 5001 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_int_seid(const uint8_t * event){ 5002 return event[5]; 5003 } 5004 /** 5005 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5006 * @param event packet 5007 * @return acp_seid 5008 * @note: btstack_type 1 5009 */ 5010 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_acp_seid(const uint8_t * event){ 5011 return event[6]; 5012 } 5013 /** 5014 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5015 * @param event packet 5016 * @return reconfigure 5017 * @note: btstack_type 1 5018 */ 5019 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_reconfigure(const uint8_t * event){ 5020 return event[7]; 5021 } 5022 /** 5023 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5024 * @param event packet 5025 * @return media_type 5026 * @note: btstack_type 1 5027 */ 5028 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_media_type(const uint8_t * event){ 5029 return event[8]; 5030 } 5031 /** 5032 * @brief Get field sampling_frequency from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5033 * @param event packet 5034 * @return sampling_frequency 5035 * @note: btstack_type 2 5036 */ 5037 static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(const uint8_t * event){ 5038 return little_endian_read_16(event, 9); 5039 } 5040 /** 5041 * @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5042 * @param event packet 5043 * @return channel_mode 5044 * @note: btstack_type 1 5045 */ 5046 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){ 5047 return event[11]; 5048 } 5049 /** 5050 * @brief Get field num_channels from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5051 * @param event packet 5052 * @return num_channels 5053 * @note: btstack_type 1 5054 */ 5055 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_num_channels(const uint8_t * event){ 5056 return event[12]; 5057 } 5058 /** 5059 * @brief Get field block_length from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5060 * @param event packet 5061 * @return block_length 5062 * @note: btstack_type 1 5063 */ 5064 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_block_length(const uint8_t * event){ 5065 return event[13]; 5066 } 5067 /** 5068 * @brief Get field subbands from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5069 * @param event packet 5070 * @return subbands 5071 * @note: btstack_type 1 5072 */ 5073 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_subbands(const uint8_t * event){ 5074 return event[14]; 5075 } 5076 /** 5077 * @brief Get field allocation_method from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5078 * @param event packet 5079 * @return allocation_method 5080 * @note: btstack_type 1 5081 */ 5082 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_allocation_method(const uint8_t * event){ 5083 return event[15]; 5084 } 5085 /** 5086 * @brief Get field min_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5087 * @param event packet 5088 * @return min_bitpool_value 5089 * @note: btstack_type 1 5090 */ 5091 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_min_bitpool_value(const uint8_t * event){ 5092 return event[16]; 5093 } 5094 /** 5095 * @brief Get field max_bitpool_value from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 5096 * @param event packet 5097 * @return max_bitpool_value 5098 * @note: btstack_type 1 5099 */ 5100 static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_max_bitpool_value(const uint8_t * event){ 5101 return event[17]; 5102 } 5103 5104 /** 5105 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5106 * @param event packet 5107 * @return a2dp_cid 5108 * @note: btstack_type 2 5109 */ 5110 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(const uint8_t * event){ 5111 return little_endian_read_16(event, 3); 5112 } 5113 /** 5114 * @brief Get field int_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5115 * @param event packet 5116 * @return int_seid 5117 * @note: btstack_type 1 5118 */ 5119 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_int_seid(const uint8_t * event){ 5120 return event[5]; 5121 } 5122 /** 5123 * @brief Get field acp_seid from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5124 * @param event packet 5125 * @return acp_seid 5126 * @note: btstack_type 1 5127 */ 5128 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_acp_seid(const uint8_t * event){ 5129 return event[6]; 5130 } 5131 /** 5132 * @brief Get field reconfigure from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5133 * @param event packet 5134 * @return reconfigure 5135 * @note: btstack_type 1 5136 */ 5137 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_reconfigure(const uint8_t * event){ 5138 return event[7]; 5139 } 5140 /** 5141 * @brief Get field media_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5142 * @param event packet 5143 * @return media_type 5144 * @note: btstack_type 1 5145 */ 5146 static inline uint8_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_type(const uint8_t * event){ 5147 return event[8]; 5148 } 5149 /** 5150 * @brief Get field media_codec_type from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5151 * @param event packet 5152 * @return media_codec_type 5153 * @note: btstack_type 2 5154 */ 5155 static inline uint16_t a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(const uint8_t * event){ 5156 return little_endian_read_16(event, 9); 5157 } 5158 /** 5159 * @brief Get field media_codec_information_len from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5160 * @param event packet 5161 * @return media_codec_information_len 5162 * @note: btstack_type L 5163 */ 5164 static inline int a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(const uint8_t * event){ 5165 return little_endian_read_16(event, 11); 5166 } 5167 /** 5168 * @brief Get field media_codec_information from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 5169 * @param event packet 5170 * @return media_codec_information 5171 * @note: btstack_type V 5172 */ 5173 static inline const uint8_t * a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information(const uint8_t * event){ 5174 return &event[13]; 5175 } 5176 5177 /** 5178 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5179 * @param event packet 5180 * @return a2dp_cid 5181 * @note: btstack_type 2 5182 */ 5183 static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8_t * event){ 5184 return little_endian_read_16(event, 3); 5185 } 5186 /** 5187 * @brief Get field bd_addr from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5188 * @param event packet 5189 * @param Pointer to storage for bd_addr 5190 * @note: btstack_type B 5191 */ 5192 static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5193 reverse_bd_addr(&event[5], bd_addr); 5194 } 5195 /** 5196 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5197 * @param event packet 5198 * @return local_seid 5199 * @note: btstack_type 1 5200 */ 5201 static inline uint8_t a2dp_subevent_stream_established_get_local_seid(const uint8_t * event){ 5202 return event[11]; 5203 } 5204 /** 5205 * @brief Get field remote_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5206 * @param event packet 5207 * @return remote_seid 5208 * @note: btstack_type 1 5209 */ 5210 static inline uint8_t a2dp_subevent_stream_established_get_remote_seid(const uint8_t * event){ 5211 return event[12]; 5212 } 5213 /** 5214 * @brief Get field status from event A2DP_SUBEVENT_STREAM_ESTABLISHED 5215 * @param event packet 5216 * @return status 5217 * @note: btstack_type 1 5218 */ 5219 static inline uint8_t a2dp_subevent_stream_established_get_status(const uint8_t * event){ 5220 return event[13]; 5221 } 5222 5223 /** 5224 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STARTED 5225 * @param event packet 5226 * @return a2dp_cid 5227 * @note: btstack_type 2 5228 */ 5229 static inline uint16_t a2dp_subevent_stream_started_get_a2dp_cid(const uint8_t * event){ 5230 return little_endian_read_16(event, 3); 5231 } 5232 /** 5233 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STARTED 5234 * @param event packet 5235 * @return local_seid 5236 * @note: btstack_type 1 5237 */ 5238 static inline uint8_t a2dp_subevent_stream_started_get_local_seid(const uint8_t * event){ 5239 return event[5]; 5240 } 5241 5242 /** 5243 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5244 * @param event packet 5245 * @return a2dp_cid 5246 * @note: btstack_type 2 5247 */ 5248 static inline uint16_t a2dp_subevent_stream_suspended_get_a2dp_cid(const uint8_t * event){ 5249 return little_endian_read_16(event, 3); 5250 } 5251 /** 5252 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_SUSPENDED 5253 * @param event packet 5254 * @return local_seid 5255 * @note: btstack_type 1 5256 */ 5257 static inline uint8_t a2dp_subevent_stream_suspended_get_local_seid(const uint8_t * event){ 5258 return event[5]; 5259 } 5260 5261 /** 5262 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_STOPPED 5263 * @param event packet 5264 * @return a2dp_cid 5265 * @note: btstack_type 2 5266 */ 5267 static inline uint16_t a2dp_subevent_stream_stopped_get_a2dp_cid(const uint8_t * event){ 5268 return little_endian_read_16(event, 3); 5269 } 5270 /** 5271 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_STOPPED 5272 * @param event packet 5273 * @return local_seid 5274 * @note: btstack_type 1 5275 */ 5276 static inline uint8_t a2dp_subevent_stream_stopped_get_local_seid(const uint8_t * event){ 5277 return event[5]; 5278 } 5279 5280 /** 5281 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_STREAM_RELEASED 5282 * @param event packet 5283 * @return a2dp_cid 5284 * @note: btstack_type 2 5285 */ 5286 static inline uint16_t a2dp_subevent_stream_released_get_a2dp_cid(const uint8_t * event){ 5287 return little_endian_read_16(event, 3); 5288 } 5289 /** 5290 * @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_RELEASED 5291 * @param event packet 5292 * @return local_seid 5293 * @note: btstack_type 1 5294 */ 5295 static inline uint8_t a2dp_subevent_stream_released_get_local_seid(const uint8_t * event){ 5296 return event[5]; 5297 } 5298 5299 /** 5300 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5301 * @param event packet 5302 * @return a2dp_cid 5303 * @note: btstack_type 2 5304 */ 5305 static inline uint16_t a2dp_subevent_command_accepted_get_a2dp_cid(const uint8_t * event){ 5306 return little_endian_read_16(event, 3); 5307 } 5308 /** 5309 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5310 * @param event packet 5311 * @return local_seid 5312 * @note: btstack_type 1 5313 */ 5314 static inline uint8_t a2dp_subevent_command_accepted_get_local_seid(const uint8_t * event){ 5315 return event[5]; 5316 } 5317 /** 5318 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_ACCEPTED 5319 * @param event packet 5320 * @return signal_identifier 5321 * @note: btstack_type 1 5322 */ 5323 static inline uint8_t a2dp_subevent_command_accepted_get_signal_identifier(const uint8_t * event){ 5324 return event[6]; 5325 } 5326 5327 /** 5328 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_COMMAND_REJECTED 5329 * @param event packet 5330 * @return a2dp_cid 5331 * @note: btstack_type 2 5332 */ 5333 static inline uint16_t a2dp_subevent_command_rejected_get_a2dp_cid(const uint8_t * event){ 5334 return little_endian_read_16(event, 3); 5335 } 5336 /** 5337 * @brief Get field local_seid from event A2DP_SUBEVENT_COMMAND_REJECTED 5338 * @param event packet 5339 * @return local_seid 5340 * @note: btstack_type 1 5341 */ 5342 static inline uint8_t a2dp_subevent_command_rejected_get_local_seid(const uint8_t * event){ 5343 return event[5]; 5344 } 5345 /** 5346 * @brief Get field signal_identifier from event A2DP_SUBEVENT_COMMAND_REJECTED 5347 * @param event packet 5348 * @return signal_identifier 5349 * @note: btstack_type 1 5350 */ 5351 static inline uint8_t a2dp_subevent_command_rejected_get_signal_identifier(const uint8_t * event){ 5352 return event[6]; 5353 } 5354 5355 /** 5356 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5357 * @param event packet 5358 * @return a2dp_cid 5359 * @note: btstack_type 2 5360 */ 5361 static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_cid(const uint8_t * event){ 5362 return little_endian_read_16(event, 3); 5363 } 5364 /** 5365 * @brief Get field bd_addr from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5366 * @param event packet 5367 * @param Pointer to storage for bd_addr 5368 * @note: btstack_type B 5369 */ 5370 static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5371 reverse_bd_addr(&event[5], bd_addr); 5372 } 5373 /** 5374 * @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 5375 * @param event packet 5376 * @return status 5377 * @note: btstack_type 1 5378 */ 5379 static inline uint8_t a2dp_subevent_signaling_connection_established_get_status(const uint8_t * event){ 5380 return event[11]; 5381 } 5382 5383 /** 5384 * @brief Get field a2dp_cid from event A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 5385 * @param event packet 5386 * @return a2dp_cid 5387 * @note: btstack_type 2 5388 */ 5389 static inline uint16_t a2dp_subevent_signaling_connection_released_get_a2dp_cid(const uint8_t * event){ 5390 return little_endian_read_16(event, 3); 5391 } 5392 5393 /** 5394 * @brief Get field status from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5395 * @param event packet 5396 * @return status 5397 * @note: btstack_type 1 5398 */ 5399 static inline uint8_t avrcp_subevent_connection_established_get_status(const uint8_t * event){ 5400 return event[3]; 5401 } 5402 /** 5403 * @brief Get field bd_addr from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5404 * @param event packet 5405 * @param Pointer to storage for bd_addr 5406 * @note: btstack_type B 5407 */ 5408 static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 5409 reverse_bd_addr(&event[4], bd_addr); 5410 } 5411 /** 5412 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 5413 * @param event packet 5414 * @return avrcp_cid 5415 * @note: btstack_type 2 5416 */ 5417 static inline uint16_t avrcp_subevent_connection_established_get_avrcp_cid(const uint8_t * event){ 5418 return little_endian_read_16(event, 10); 5419 } 5420 5421 /** 5422 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_RELEASED 5423 * @param event packet 5424 * @return avrcp_cid 5425 * @note: btstack_type 2 5426 */ 5427 static inline uint16_t avrcp_subevent_connection_released_get_avrcp_cid(const uint8_t * event){ 5428 return little_endian_read_16(event, 3); 5429 } 5430 5431 /** 5432 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5433 * @param event packet 5434 * @return avrcp_cid 5435 * @note: btstack_type 2 5436 */ 5437 static inline uint16_t avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(const uint8_t * event){ 5438 return little_endian_read_16(event, 3); 5439 } 5440 /** 5441 * @brief Get field command_type from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5442 * @param event packet 5443 * @return command_type 5444 * @note: btstack_type 1 5445 */ 5446 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_command_type(const uint8_t * event){ 5447 return event[5]; 5448 } 5449 /** 5450 * @brief Get field repeat_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5451 * @param event packet 5452 * @return repeat_mode 5453 * @note: btstack_type 1 5454 */ 5455 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_repeat_mode(const uint8_t * event){ 5456 return event[6]; 5457 } 5458 /** 5459 * @brief Get field shuffle_mode from event AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 5460 * @param event packet 5461 * @return shuffle_mode 5462 * @note: btstack_type 1 5463 */ 5464 static inline uint8_t avrcp_subevent_shuffle_and_repeat_mode_get_shuffle_mode(const uint8_t * event){ 5465 return event[7]; 5466 } 5467 5468 /** 5469 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS 5470 * @param event packet 5471 * @return avrcp_cid 5472 * @note: btstack_type 2 5473 */ 5474 static inline uint16_t avrcp_subevent_play_status_get_avrcp_cid(const uint8_t * event){ 5475 return little_endian_read_16(event, 3); 5476 } 5477 /** 5478 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAY_STATUS 5479 * @param event packet 5480 * @return command_type 5481 * @note: btstack_type 1 5482 */ 5483 static inline uint8_t avrcp_subevent_play_status_get_command_type(const uint8_t * event){ 5484 return event[5]; 5485 } 5486 /** 5487 * @brief Get field song_length from event AVRCP_SUBEVENT_PLAY_STATUS 5488 * @param event packet 5489 * @return song_length 5490 * @note: btstack_type 4 5491 */ 5492 static inline uint32_t avrcp_subevent_play_status_get_song_length(const uint8_t * event){ 5493 return little_endian_read_32(event, 6); 5494 } 5495 /** 5496 * @brief Get field song_position from event AVRCP_SUBEVENT_PLAY_STATUS 5497 * @param event packet 5498 * @return song_position 5499 * @note: btstack_type 4 5500 */ 5501 static inline uint32_t avrcp_subevent_play_status_get_song_position(const uint8_t * event){ 5502 return little_endian_read_32(event, 10); 5503 } 5504 /** 5505 * @brief Get field play_status from event AVRCP_SUBEVENT_PLAY_STATUS 5506 * @param event packet 5507 * @return play_status 5508 * @note: btstack_type 1 5509 */ 5510 static inline uint8_t avrcp_subevent_play_status_get_play_status(const uint8_t * event){ 5511 return event[14]; 5512 } 5513 5514 /** 5515 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5516 * @param event packet 5517 * @return avrcp_cid 5518 * @note: btstack_type 2 5519 */ 5520 static inline uint16_t avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(const uint8_t * event){ 5521 return little_endian_read_16(event, 3); 5522 } 5523 /** 5524 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5525 * @param event packet 5526 * @return command_type 5527 * @note: btstack_type 1 5528 */ 5529 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_command_type(const uint8_t * event){ 5530 return event[5]; 5531 } 5532 /** 5533 * @brief Get field play_status from event AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 5534 * @param event packet 5535 * @return play_status 5536 * @note: btstack_type 1 5537 */ 5538 static inline uint8_t avrcp_subevent_notification_playback_status_changed_get_play_status(const uint8_t * event){ 5539 return event[6]; 5540 } 5541 5542 /** 5543 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5544 * @param event packet 5545 * @return avrcp_cid 5546 * @note: btstack_type 2 5547 */ 5548 static inline uint16_t avrcp_subevent_notification_track_changed_get_avrcp_cid(const uint8_t * event){ 5549 return little_endian_read_16(event, 3); 5550 } 5551 /** 5552 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 5553 * @param event packet 5554 * @return command_type 5555 * @note: btstack_type 1 5556 */ 5557 static inline uint8_t avrcp_subevent_notification_track_changed_get_command_type(const uint8_t * event){ 5558 return event[5]; 5559 } 5560 5561 /** 5562 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5563 * @param event packet 5564 * @return avrcp_cid 5565 * @note: btstack_type 2 5566 */ 5567 static inline uint16_t avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(const uint8_t * event){ 5568 return little_endian_read_16(event, 3); 5569 } 5570 /** 5571 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 5572 * @param event packet 5573 * @return command_type 5574 * @note: btstack_type 1 5575 */ 5576 static inline uint8_t avrcp_subevent_notification_now_playing_content_changed_get_command_type(const uint8_t * event){ 5577 return event[5]; 5578 } 5579 5580 /** 5581 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5582 * @param event packet 5583 * @return avrcp_cid 5584 * @note: btstack_type 2 5585 */ 5586 static inline uint16_t avrcp_subevent_notification_available_players_changed_get_avrcp_cid(const uint8_t * event){ 5587 return little_endian_read_16(event, 3); 5588 } 5589 /** 5590 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 5591 * @param event packet 5592 * @return command_type 5593 * @note: btstack_type 1 5594 */ 5595 static inline uint8_t avrcp_subevent_notification_available_players_changed_get_command_type(const uint8_t * event){ 5596 return event[5]; 5597 } 5598 5599 /** 5600 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5601 * @param event packet 5602 * @return avrcp_cid 5603 * @note: btstack_type 2 5604 */ 5605 static inline uint16_t avrcp_subevent_notification_volume_changed_get_avrcp_cid(const uint8_t * event){ 5606 return little_endian_read_16(event, 3); 5607 } 5608 /** 5609 * @brief Get field command_type from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5610 * @param event packet 5611 * @return command_type 5612 * @note: btstack_type 1 5613 */ 5614 static inline uint8_t avrcp_subevent_notification_volume_changed_get_command_type(const uint8_t * event){ 5615 return event[5]; 5616 } 5617 /** 5618 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 5619 * @param event packet 5620 * @return absolute_volume 5621 * @note: btstack_type 1 5622 */ 5623 static inline uint8_t avrcp_subevent_notification_volume_changed_get_absolute_volume(const uint8_t * event){ 5624 return event[6]; 5625 } 5626 5627 /** 5628 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5629 * @param event packet 5630 * @return avrcp_cid 5631 * @note: btstack_type 2 5632 */ 5633 static inline uint16_t avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(const uint8_t * event){ 5634 return little_endian_read_16(event, 3); 5635 } 5636 /** 5637 * @brief Get field command_type from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5638 * @param event packet 5639 * @return command_type 5640 * @note: btstack_type 1 5641 */ 5642 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_command_type(const uint8_t * event){ 5643 return event[5]; 5644 } 5645 /** 5646 * @brief Get field absolute_volume from event AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 5647 * @param event packet 5648 * @return absolute_volume 5649 * @note: btstack_type 1 5650 */ 5651 static inline uint8_t avrcp_subevent_set_absolute_volume_response_get_absolute_volume(const uint8_t * event){ 5652 return event[6]; 5653 } 5654 5655 /** 5656 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5657 * @param event packet 5658 * @return avrcp_cid 5659 * @note: btstack_type 2 5660 */ 5661 static inline uint16_t avrcp_subevent_enable_notification_complete_get_avrcp_cid(const uint8_t * event){ 5662 return little_endian_read_16(event, 3); 5663 } 5664 /** 5665 * @brief Get field command_type from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5666 * @param event packet 5667 * @return command_type 5668 * @note: btstack_type 1 5669 */ 5670 static inline uint8_t avrcp_subevent_enable_notification_complete_get_command_type(const uint8_t * event){ 5671 return event[5]; 5672 } 5673 /** 5674 * @brief Get field notification_id from event AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 5675 * @param event packet 5676 * @return notification_id 5677 * @note: btstack_type 1 5678 */ 5679 static inline uint8_t avrcp_subevent_enable_notification_complete_get_notification_id(const uint8_t * event){ 5680 return event[6]; 5681 } 5682 5683 /** 5684 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_START 5685 * @param event packet 5686 * @return avrcp_cid 5687 * @note: btstack_type 2 5688 */ 5689 static inline uint16_t avrcp_subevent_operation_start_get_avrcp_cid(const uint8_t * event){ 5690 return little_endian_read_16(event, 3); 5691 } 5692 /** 5693 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_START 5694 * @param event packet 5695 * @return command_type 5696 * @note: btstack_type 1 5697 */ 5698 static inline uint8_t avrcp_subevent_operation_start_get_command_type(const uint8_t * event){ 5699 return event[5]; 5700 } 5701 /** 5702 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_START 5703 * @param event packet 5704 * @return operation_id 5705 * @note: btstack_type 1 5706 */ 5707 static inline uint8_t avrcp_subevent_operation_start_get_operation_id(const uint8_t * event){ 5708 return event[6]; 5709 } 5710 5711 /** 5712 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5713 * @param event packet 5714 * @return avrcp_cid 5715 * @note: btstack_type 2 5716 */ 5717 static inline uint16_t avrcp_subevent_operation_complete_get_avrcp_cid(const uint8_t * event){ 5718 return little_endian_read_16(event, 3); 5719 } 5720 /** 5721 * @brief Get field command_type from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5722 * @param event packet 5723 * @return command_type 5724 * @note: btstack_type 1 5725 */ 5726 static inline uint8_t avrcp_subevent_operation_complete_get_command_type(const uint8_t * event){ 5727 return event[5]; 5728 } 5729 /** 5730 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION_COMPLETE 5731 * @param event packet 5732 * @return operation_id 5733 * @note: btstack_type 1 5734 */ 5735 static inline uint8_t avrcp_subevent_operation_complete_get_operation_id(const uint8_t * event){ 5736 return event[6]; 5737 } 5738 5739 /** 5740 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5741 * @param event packet 5742 * @return avrcp_cid 5743 * @note: btstack_type 2 5744 */ 5745 static inline uint16_t avrcp_subevent_player_application_value_response_get_avrcp_cid(const uint8_t * event){ 5746 return little_endian_read_16(event, 3); 5747 } 5748 /** 5749 * @brief Get field command_type from event AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 5750 * @param event packet 5751 * @return command_type 5752 * @note: btstack_type 1 5753 */ 5754 static inline uint8_t avrcp_subevent_player_application_value_response_get_command_type(const uint8_t * event){ 5755 return event[5]; 5756 } 5757 5758 /** 5759 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_COMPANY_IDS_QUERY 5760 * @param event packet 5761 * @return avrcp_cid 5762 * @note: btstack_type 2 5763 */ 5764 static inline uint16_t avrcp_subevent_company_ids_query_get_avrcp_cid(const uint8_t * event){ 5765 return little_endian_read_16(event, 3); 5766 } 5767 5768 /** 5769 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_EVENT_IDS_QUERY 5770 * @param event packet 5771 * @return avrcp_cid 5772 * @note: btstack_type 2 5773 */ 5774 static inline uint16_t avrcp_subevent_event_ids_query_get_avrcp_cid(const uint8_t * event){ 5775 return little_endian_read_16(event, 3); 5776 } 5777 5778 /** 5779 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_PLAY_STATUS_QUERY 5780 * @param event packet 5781 * @return avrcp_cid 5782 * @note: btstack_type 2 5783 */ 5784 static inline uint16_t avrcp_subevent_play_status_query_get_avrcp_cid(const uint8_t * event){ 5785 return little_endian_read_16(event, 3); 5786 } 5787 5788 /** 5789 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_OPERATION 5790 * @param event packet 5791 * @return avrcp_cid 5792 * @note: btstack_type 2 5793 */ 5794 static inline uint16_t avrcp_subevent_operation_get_avrcp_cid(const uint8_t * event){ 5795 return little_endian_read_16(event, 3); 5796 } 5797 /** 5798 * @brief Get field operation_id from event AVRCP_SUBEVENT_OPERATION 5799 * @param event packet 5800 * @return operation_id 5801 * @note: btstack_type 1 5802 */ 5803 static inline uint8_t avrcp_subevent_operation_get_operation_id(const uint8_t * event){ 5804 return event[5]; 5805 } 5806 /** 5807 * @brief Get field operands_length from event AVRCP_SUBEVENT_OPERATION 5808 * @param event packet 5809 * @return operands_length 5810 * @note: btstack_type 1 5811 */ 5812 static inline uint8_t avrcp_subevent_operation_get_operands_length(const uint8_t * event){ 5813 return event[6]; 5814 } 5815 /** 5816 * @brief Get field operand from event AVRCP_SUBEVENT_OPERATION 5817 * @param event packet 5818 * @return operand 5819 * @note: btstack_type 1 5820 */ 5821 static inline uint8_t avrcp_subevent_operation_get_operand(const uint8_t * event){ 5822 return event[7]; 5823 } 5824 5825 /** 5826 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5827 * @param event packet 5828 * @return avrcp_cid 5829 * @note: btstack_type 2 5830 */ 5831 static inline uint16_t avrcp_subevent_now_playing_track_info_get_avrcp_cid(const uint8_t * event){ 5832 return little_endian_read_16(event, 3); 5833 } 5834 /** 5835 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5836 * @param event packet 5837 * @return command_type 5838 * @note: btstack_type 1 5839 */ 5840 static inline uint8_t avrcp_subevent_now_playing_track_info_get_command_type(const uint8_t * event){ 5841 return event[5]; 5842 } 5843 /** 5844 * @brief Get field track from event AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 5845 * @param event packet 5846 * @return track 5847 * @note: btstack_type 1 5848 */ 5849 static inline uint8_t avrcp_subevent_now_playing_track_info_get_track(const uint8_t * event){ 5850 return event[6]; 5851 } 5852 5853 /** 5854 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5855 * @param event packet 5856 * @return avrcp_cid 5857 * @note: btstack_type 2 5858 */ 5859 static inline uint16_t avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(const uint8_t * event){ 5860 return little_endian_read_16(event, 3); 5861 } 5862 /** 5863 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5864 * @param event packet 5865 * @return command_type 5866 * @note: btstack_type 1 5867 */ 5868 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_command_type(const uint8_t * event){ 5869 return event[5]; 5870 } 5871 /** 5872 * @brief Get field total_tracks from event AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 5873 * @param event packet 5874 * @return total_tracks 5875 * @note: btstack_type 1 5876 */ 5877 static inline uint8_t avrcp_subevent_now_playing_total_tracks_info_get_total_tracks(const uint8_t * event){ 5878 return event[6]; 5879 } 5880 5881 /** 5882 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5883 * @param event packet 5884 * @return avrcp_cid 5885 * @note: btstack_type 2 5886 */ 5887 static inline uint16_t avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(const uint8_t * event){ 5888 return little_endian_read_16(event, 3); 5889 } 5890 /** 5891 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5892 * @param event packet 5893 * @return command_type 5894 * @note: btstack_type 1 5895 */ 5896 static inline uint8_t avrcp_subevent_now_playing_song_length_ms_info_get_command_type(const uint8_t * event){ 5897 return event[5]; 5898 } 5899 /** 5900 * @brief Get field song_length from event AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 5901 * @param event packet 5902 * @return song_length 5903 * @note: btstack_type 4 5904 */ 5905 static inline uint32_t avrcp_subevent_now_playing_song_length_ms_info_get_song_length(const uint8_t * event){ 5906 return little_endian_read_32(event, 6); 5907 } 5908 5909 /** 5910 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5911 * @param event packet 5912 * @return avrcp_cid 5913 * @note: btstack_type 2 5914 */ 5915 static inline uint16_t avrcp_subevent_now_playing_title_info_get_avrcp_cid(const uint8_t * event){ 5916 return little_endian_read_16(event, 3); 5917 } 5918 /** 5919 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5920 * @param event packet 5921 * @return command_type 5922 * @note: btstack_type 1 5923 */ 5924 static inline uint8_t avrcp_subevent_now_playing_title_info_get_command_type(const uint8_t * event){ 5925 return event[5]; 5926 } 5927 /** 5928 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5929 * @param event packet 5930 * @return value_len 5931 * @note: btstack_type J 5932 */ 5933 static inline int avrcp_subevent_now_playing_title_info_get_value_len(const uint8_t * event){ 5934 return event[6]; 5935 } 5936 /** 5937 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 5938 * @param event packet 5939 * @return value 5940 * @note: btstack_type V 5941 */ 5942 static inline const uint8_t * avrcp_subevent_now_playing_title_info_get_value(const uint8_t * event){ 5943 return &event[7]; 5944 } 5945 5946 /** 5947 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5948 * @param event packet 5949 * @return avrcp_cid 5950 * @note: btstack_type 2 5951 */ 5952 static inline uint16_t avrcp_subevent_now_playing_artist_info_get_avrcp_cid(const uint8_t * event){ 5953 return little_endian_read_16(event, 3); 5954 } 5955 /** 5956 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5957 * @param event packet 5958 * @return command_type 5959 * @note: btstack_type 1 5960 */ 5961 static inline uint8_t avrcp_subevent_now_playing_artist_info_get_command_type(const uint8_t * event){ 5962 return event[5]; 5963 } 5964 /** 5965 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5966 * @param event packet 5967 * @return value_len 5968 * @note: btstack_type J 5969 */ 5970 static inline int avrcp_subevent_now_playing_artist_info_get_value_len(const uint8_t * event){ 5971 return event[6]; 5972 } 5973 /** 5974 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 5975 * @param event packet 5976 * @return value 5977 * @note: btstack_type V 5978 */ 5979 static inline const uint8_t * avrcp_subevent_now_playing_artist_info_get_value(const uint8_t * event){ 5980 return &event[7]; 5981 } 5982 5983 /** 5984 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 5985 * @param event packet 5986 * @return avrcp_cid 5987 * @note: btstack_type 2 5988 */ 5989 static inline uint16_t avrcp_subevent_now_playing_album_info_get_avrcp_cid(const uint8_t * event){ 5990 return little_endian_read_16(event, 3); 5991 } 5992 /** 5993 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 5994 * @param event packet 5995 * @return command_type 5996 * @note: btstack_type 1 5997 */ 5998 static inline uint8_t avrcp_subevent_now_playing_album_info_get_command_type(const uint8_t * event){ 5999 return event[5]; 6000 } 6001 /** 6002 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6003 * @param event packet 6004 * @return value_len 6005 * @note: btstack_type J 6006 */ 6007 static inline int avrcp_subevent_now_playing_album_info_get_value_len(const uint8_t * event){ 6008 return event[6]; 6009 } 6010 /** 6011 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 6012 * @param event packet 6013 * @return value 6014 * @note: btstack_type V 6015 */ 6016 static inline const uint8_t * avrcp_subevent_now_playing_album_info_get_value(const uint8_t * event){ 6017 return &event[7]; 6018 } 6019 6020 /** 6021 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6022 * @param event packet 6023 * @return avrcp_cid 6024 * @note: btstack_type 2 6025 */ 6026 static inline uint16_t avrcp_subevent_now_playing_genre_info_get_avrcp_cid(const uint8_t * event){ 6027 return little_endian_read_16(event, 3); 6028 } 6029 /** 6030 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6031 * @param event packet 6032 * @return command_type 6033 * @note: btstack_type 1 6034 */ 6035 static inline uint8_t avrcp_subevent_now_playing_genre_info_get_command_type(const uint8_t * event){ 6036 return event[5]; 6037 } 6038 /** 6039 * @brief Get field value_len from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6040 * @param event packet 6041 * @return value_len 6042 * @note: btstack_type J 6043 */ 6044 static inline int avrcp_subevent_now_playing_genre_info_get_value_len(const uint8_t * event){ 6045 return event[6]; 6046 } 6047 /** 6048 * @brief Get field value from event AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 6049 * @param event packet 6050 * @return value 6051 * @note: btstack_type V 6052 */ 6053 static inline const uint8_t * avrcp_subevent_now_playing_genre_info_get_value(const uint8_t * event){ 6054 return &event[7]; 6055 } 6056 6057 /** 6058 * @brief Get field avrcp_cid from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6059 * @param event packet 6060 * @return avrcp_cid 6061 * @note: btstack_type 2 6062 */ 6063 static inline uint16_t avrcp_subevent_now_playing_info_done_get_avrcp_cid(const uint8_t * event){ 6064 return little_endian_read_16(event, 3); 6065 } 6066 /** 6067 * @brief Get field command_type from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6068 * @param event packet 6069 * @return command_type 6070 * @note: btstack_type 1 6071 */ 6072 static inline uint8_t avrcp_subevent_now_playing_info_done_get_command_type(const uint8_t * event){ 6073 return event[5]; 6074 } 6075 /** 6076 * @brief Get field status from event AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 6077 * @param event packet 6078 * @return status 6079 * @note: btstack_type 1 6080 */ 6081 static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint8_t * event){ 6082 return event[6]; 6083 } 6084 6085 /** 6086 * @brief Get field bd_addr from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6087 * @param event packet 6088 * @param Pointer to storage for bd_addr 6089 * @note: btstack_type B 6090 */ 6091 static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6092 reverse_bd_addr(&event[3], bd_addr); 6093 } 6094 /** 6095 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 6096 * @param event packet 6097 * @return browsing_cid 6098 * @note: btstack_type 2 6099 */ 6100 static inline uint16_t avrcp_subevent_incoming_browsing_connection_get_browsing_cid(const uint8_t * event){ 6101 return little_endian_read_16(event, 9); 6102 } 6103 6104 /** 6105 * @brief Get field status from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6106 * @param event packet 6107 * @return status 6108 * @note: btstack_type 1 6109 */ 6110 static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(const uint8_t * event){ 6111 return event[3]; 6112 } 6113 /** 6114 * @brief Get field bd_addr from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6115 * @param event packet 6116 * @param Pointer to storage for bd_addr 6117 * @note: btstack_type B 6118 */ 6119 static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6120 reverse_bd_addr(&event[4], bd_addr); 6121 } 6122 /** 6123 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 6124 * @param event packet 6125 * @return browsing_cid 6126 * @note: btstack_type 2 6127 */ 6128 static inline uint16_t avrcp_subevent_browsing_connection_established_get_browsing_cid(const uint8_t * event){ 6129 return little_endian_read_16(event, 10); 6130 } 6131 6132 /** 6133 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 6134 * @param event packet 6135 * @return browsing_cid 6136 * @note: btstack_type 2 6137 */ 6138 static inline uint16_t avrcp_subevent_browsing_connection_released_get_browsing_cid(const uint8_t * event){ 6139 return little_endian_read_16(event, 3); 6140 } 6141 6142 /** 6143 * @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6144 * @param event packet 6145 * @return browsing_cid 6146 * @note: btstack_type 2 6147 */ 6148 static inline uint16_t avrcp_subevent_browsing_media_item_done_get_browsing_cid(const uint8_t * event){ 6149 return little_endian_read_16(event, 3); 6150 } 6151 /** 6152 * @brief Get field browsing_status from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6153 * @param event packet 6154 * @return browsing_status 6155 * @note: btstack_type 1 6156 */ 6157 static inline uint8_t avrcp_subevent_browsing_media_item_done_get_browsing_status(const uint8_t * event){ 6158 return event[5]; 6159 } 6160 /** 6161 * @brief Get field bluetooth_status from event AVRCP_SUBEVENT_BROWSING_MEDIA_ITEM_DONE 6162 * @param event packet 6163 * @return bluetooth_status 6164 * @note: btstack_type 1 6165 */ 6166 static inline uint8_t avrcp_subevent_browsing_media_item_done_get_bluetooth_status(const uint8_t * event){ 6167 return event[6]; 6168 } 6169 6170 /** 6171 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED 6172 * @param event packet 6173 * @return goep_cid 6174 * @note: btstack_type 2 6175 */ 6176 static inline uint16_t goep_subevent_connection_opened_get_goep_cid(const uint8_t * event){ 6177 return little_endian_read_16(event, 3); 6178 } 6179 /** 6180 * @brief Get field status from event GOEP_SUBEVENT_CONNECTION_OPENED 6181 * @param event packet 6182 * @return status 6183 * @note: btstack_type 1 6184 */ 6185 static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t * event){ 6186 return event[5]; 6187 } 6188 /** 6189 * @brief Get field bd_addr from event GOEP_SUBEVENT_CONNECTION_OPENED 6190 * @param event packet 6191 * @param Pointer to storage for bd_addr 6192 * @note: btstack_type B 6193 */ 6194 static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6195 reverse_bd_addr(&event[6], bd_addr); 6196 } 6197 /** 6198 * @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED 6199 * @param event packet 6200 * @return con_handle 6201 * @note: btstack_type H 6202 */ 6203 static inline hci_con_handle_t goep_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6204 return little_endian_read_16(event, 12); 6205 } 6206 /** 6207 * @brief Get field incoming from event GOEP_SUBEVENT_CONNECTION_OPENED 6208 * @param event packet 6209 * @return incoming 6210 * @note: btstack_type 1 6211 */ 6212 static inline uint8_t goep_subevent_connection_opened_get_incoming(const uint8_t * event){ 6213 return event[14]; 6214 } 6215 6216 /** 6217 * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_CLOSED 6218 * @param event packet 6219 * @return goep_cid 6220 * @note: btstack_type 2 6221 */ 6222 static inline uint16_t goep_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6223 return little_endian_read_16(event, 3); 6224 } 6225 6226 /** 6227 * @brief Get field goep_cid from event GOEP_SUBEVENT_CAN_SEND_NOW 6228 * @param event packet 6229 * @return goep_cid 6230 * @note: btstack_type 2 6231 */ 6232 static inline uint16_t goep_subevent_can_send_now_get_goep_cid(const uint8_t * event){ 6233 return little_endian_read_16(event, 3); 6234 } 6235 6236 /** 6237 * @brief Get field pbap_cid from event PBAP_SUBEVENT_CONNECTION_OPENED 6238 * @param event packet 6239 * @return pbap_cid 6240 * @note: btstack_type 2 6241 */ 6242 static inline uint16_t pbap_subevent_connection_opened_get_pbap_cid(const uint8_t * event){ 6243 return little_endian_read_16(event, 3); 6244 } 6245 /** 6246 * @brief Get field status from event PBAP_SUBEVENT_CONNECTION_OPENED 6247 * @param event packet 6248 * @return status 6249 * @note: btstack_type 1 6250 */ 6251 static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t * event){ 6252 return event[5]; 6253 } 6254 /** 6255 * @brief Get field bd_addr from event PBAP_SUBEVENT_CONNECTION_OPENED 6256 * @param event packet 6257 * @param Pointer to storage for bd_addr 6258 * @note: btstack_type B 6259 */ 6260 static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6261 reverse_bd_addr(&event[6], bd_addr); 6262 } 6263 /** 6264 * @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED 6265 * @param event packet 6266 * @return con_handle 6267 * @note: btstack_type H 6268 */ 6269 static inline hci_con_handle_t pbap_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6270 return little_endian_read_16(event, 12); 6271 } 6272 /** 6273 * @brief Get field incoming from event PBAP_SUBEVENT_CONNECTION_OPENED 6274 * @param event packet 6275 * @return incoming 6276 * @note: btstack_type 1 6277 */ 6278 static inline uint8_t pbap_subevent_connection_opened_get_incoming(const uint8_t * event){ 6279 return event[14]; 6280 } 6281 6282 /** 6283 * @brief Get field goep_cid from event PBAP_SUBEVENT_CONNECTION_CLOSED 6284 * @param event packet 6285 * @return goep_cid 6286 * @note: btstack_type 2 6287 */ 6288 static inline uint16_t pbap_subevent_connection_closed_get_goep_cid(const uint8_t * event){ 6289 return little_endian_read_16(event, 3); 6290 } 6291 6292 /** 6293 * @brief Get field goep_cid from event PBAP_SUBEVENT_OPERATION_COMPLETED 6294 * @param event packet 6295 * @return goep_cid 6296 * @note: btstack_type 2 6297 */ 6298 static inline uint16_t pbap_subevent_operation_completed_get_goep_cid(const uint8_t * event){ 6299 return little_endian_read_16(event, 3); 6300 } 6301 /** 6302 * @brief Get field status from event PBAP_SUBEVENT_OPERATION_COMPLETED 6303 * @param event packet 6304 * @return status 6305 * @note: btstack_type 1 6306 */ 6307 static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t * event){ 6308 return event[5]; 6309 } 6310 6311 /** 6312 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED 6313 * @param event packet 6314 * @return hid_cid 6315 * @note: btstack_type 2 6316 */ 6317 static inline uint16_t hid_subevent_connection_opened_get_hid_cid(const uint8_t * event){ 6318 return little_endian_read_16(event, 3); 6319 } 6320 /** 6321 * @brief Get field status from event HID_SUBEVENT_CONNECTION_OPENED 6322 * @param event packet 6323 * @return status 6324 * @note: btstack_type 1 6325 */ 6326 static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t * event){ 6327 return event[5]; 6328 } 6329 /** 6330 * @brief Get field bd_addr from event HID_SUBEVENT_CONNECTION_OPENED 6331 * @param event packet 6332 * @param Pointer to storage for bd_addr 6333 * @note: btstack_type B 6334 */ 6335 static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){ 6336 reverse_bd_addr(&event[6], bd_addr); 6337 } 6338 /** 6339 * @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED 6340 * @param event packet 6341 * @return con_handle 6342 * @note: btstack_type H 6343 */ 6344 static inline hci_con_handle_t hid_subevent_connection_opened_get_con_handle(const uint8_t * event){ 6345 return little_endian_read_16(event, 12); 6346 } 6347 /** 6348 * @brief Get field incoming from event HID_SUBEVENT_CONNECTION_OPENED 6349 * @param event packet 6350 * @return incoming 6351 * @note: btstack_type 1 6352 */ 6353 static inline uint8_t hid_subevent_connection_opened_get_incoming(const uint8_t * event){ 6354 return event[14]; 6355 } 6356 6357 /** 6358 * @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_CLOSED 6359 * @param event packet 6360 * @return hid_cid 6361 * @note: btstack_type 2 6362 */ 6363 static inline uint16_t hid_subevent_connection_closed_get_hid_cid(const uint8_t * event){ 6364 return little_endian_read_16(event, 3); 6365 } 6366 6367 /** 6368 * @brief Get field hid_cid from event HID_SUBEVENT_CAN_SEND_NOW 6369 * @param event packet 6370 * @return hid_cid 6371 * @note: btstack_type 2 6372 */ 6373 static inline uint16_t hid_subevent_can_send_now_get_hid_cid(const uint8_t * event){ 6374 return little_endian_read_16(event, 3); 6375 } 6376 6377 /** 6378 * @brief Get field con_handle from event HIDS_SUBEVENT_CAN_SEND_NOW 6379 * @param event packet 6380 * @return con_handle 6381 * @note: btstack_type 2 6382 */ 6383 static inline uint16_t hids_subevent_can_send_now_get_con_handle(const uint8_t * event){ 6384 return little_endian_read_16(event, 3); 6385 } 6386 6387 /** 6388 * @brief Get field con_handle from event HIDS_SUBEVENT_PROTOCOL_MODE 6389 * @param event packet 6390 * @return con_handle 6391 * @note: btstack_type 2 6392 */ 6393 static inline uint16_t hids_subevent_protocol_mode_get_con_handle(const uint8_t * event){ 6394 return little_endian_read_16(event, 3); 6395 } 6396 /** 6397 * @brief Get field protocol_mode from event HIDS_SUBEVENT_PROTOCOL_MODE 6398 * @param event packet 6399 * @return protocol_mode 6400 * @note: btstack_type 1 6401 */ 6402 static inline uint8_t hids_subevent_protocol_mode_get_protocol_mode(const uint8_t * event){ 6403 return event[5]; 6404 } 6405 6406 /** 6407 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6408 * @param event packet 6409 * @return con_handle 6410 * @note: btstack_type 2 6411 */ 6412 static inline uint16_t hids_subevent_boot_mouse_input_report_enable_get_con_handle(const uint8_t * event){ 6413 return little_endian_read_16(event, 3); 6414 } 6415 /** 6416 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 6417 * @param event packet 6418 * @return enable 6419 * @note: btstack_type 1 6420 */ 6421 static inline uint8_t hids_subevent_boot_mouse_input_report_enable_get_enable(const uint8_t * event){ 6422 return event[5]; 6423 } 6424 6425 /** 6426 * @brief Get field con_handle from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6427 * @param event packet 6428 * @return con_handle 6429 * @note: btstack_type 2 6430 */ 6431 static inline uint16_t hids_subevent_boot_keyboard_input_report_enable_get_con_handle(const uint8_t * event){ 6432 return little_endian_read_16(event, 3); 6433 } 6434 /** 6435 * @brief Get field enable from event HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 6436 * @param event packet 6437 * @return enable 6438 * @note: btstack_type 1 6439 */ 6440 static inline uint8_t hids_subevent_boot_keyboard_input_report_enable_get_enable(const uint8_t * event){ 6441 return event[5]; 6442 } 6443 6444 /** 6445 * @brief Get field con_handle from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6446 * @param event packet 6447 * @return con_handle 6448 * @note: btstack_type 2 6449 */ 6450 static inline uint16_t hids_subevent_input_report_enable_get_con_handle(const uint8_t * event){ 6451 return little_endian_read_16(event, 3); 6452 } 6453 /** 6454 * @brief Get field enable from event HIDS_SUBEVENT_INPUT_REPORT_ENABLE 6455 * @param event packet 6456 * @return enable 6457 * @note: btstack_type 1 6458 */ 6459 static inline uint8_t hids_subevent_input_report_enable_get_enable(const uint8_t * event){ 6460 return event[5]; 6461 } 6462 6463 6464 6465 /* API_END */ 6466 6467 #if defined __cplusplus 6468 } 6469 #endif 6470 6471 #endif // __BTSTACK_EVENT_H 6472