1 /* btp_hap.h - Bluetooth tester headers */ 2 3 /* 4 * Copyright (c) 2023 Codecoup 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 #include <zephyr/types.h> 9 10 /* HAP commands */ 11 #define BTP_HAP_READ_SUPPORTED_COMMANDS 0x01 12 struct btp_hap_read_supported_commands_rp { 13 uint8_t data[0]; 14 } __packed; 15 16 #define BTP_HAP_HA_OPT_PRESETS_SYNC 0x01 17 #define BTP_HAP_HA_OPT_PRESETS_INDEPENDENT 0x02 18 #define BTP_HAP_HA_OPT_PRESETS_DYNAMIC 0x04 19 #define BTP_HAP_HA_OPT_PRESETS_WRITABLE 0x08 20 21 #define BTP_HAP_HA_INIT 0x02 22 struct btp_hap_ha_init_cmd { 23 uint8_t type; 24 uint16_t opts; 25 } __packed; 26 27 #define BTP_HAP_HARC_INIT 0x03 28 #define BTP_HAP_HAUC_INIT 0x04 29 #define BTP_HAP_IAC_INIT 0x05 30 31 #define BTP_HAP_IAC_DISCOVER 0x06 32 struct btp_hap_iac_discover_cmd { 33 bt_addr_le_t address; 34 } __packed; 35 36 #define BTP_HAP_IAC_SET_ALERT 0x07 37 struct btp_hap_iac_set_alert_cmd { 38 bt_addr_le_t address; 39 uint8_t alert; 40 } __packed; 41 42 #define BTP_HAP_HAUC_DISCOVER 0x08 43 struct btp_hap_hauc_discover_cmd { 44 bt_addr_le_t address; 45 } __packed; 46 47 /* HAP events */ 48 #define BT_HAP_EV_IAC_DISCOVERY_COMPLETE 0x80 49 struct btp_hap_iac_discovery_complete_ev { 50 bt_addr_le_t address; 51 uint8_t status; 52 } __packed; 53 54 #define BT_HAP_EV_HAUC_DISCOVERY_COMPLETE 0x81 55 struct btp_hap_hauc_discovery_complete_ev { 56 bt_addr_le_t address; 57 uint8_t status; 58 uint16_t has_hearing_aid_features_handle; 59 uint16_t has_control_point_handle; 60 uint16_t has_active_preset_index_handle; 61 } __packed; 62