-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: tester: MICP Client tests
Add support for MICP Client tests. Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
- Loading branch information
1 parent
61ec4aa
commit 2917a40
Showing
7 changed files
with
668 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* btp_micp.h - Bluetooth tester headers */ | ||
|
||
/* | ||
* Copyright (c) 2023 Codecoup | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* MICP commands */ | ||
#define BTP_MICP_READ_SUPPORTED_COMMANDS 0x01 | ||
struct btp_micp_read_supported_commands_rp { | ||
uint8_t data[0]; | ||
} __packed; | ||
|
||
#define BTP_MICP_DISCOVER 0x02 | ||
struct btp_micp_discover_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_SET_GAIN 0x03 | ||
struct btp_micp_set_gain_cmd { | ||
bt_addr_le_t address; | ||
int8_t gain; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_STATE 0x04 | ||
struct btp_micp_aics_state_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_MUTE_READ 0x05 | ||
struct btp_micp_mute_read_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_GAIN_SETTING_PROP 0x06 | ||
struct btp_micp_gain_setting_prop_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_MUTE 0x07 | ||
struct btp_micp_mute_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_TYPE 0x08 | ||
struct btp_micp_aics_type_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_STATUS 0x09 | ||
struct btp_micp_aics_status_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_UNMUTE 0x0a | ||
struct btp_micp_aics_unmute_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_MUTE 0x0b | ||
struct btp_micp_aics_mute_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_MAN_GAIN 0x0c | ||
struct btp_micp_aics_manual_gain_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_AUTO_GAIN 0x0d | ||
struct btp_micp_aics_auto_gain_cmd { | ||
bt_addr_le_t address; | ||
} __packed; | ||
|
||
#define BTP_MICP_DISCOVERY_STATUS_SUCCESS 0x00 | ||
#define BTP_MICP_DISCOVERY_STATUS_FAILED 0x01 | ||
|
||
/* MICP events */ | ||
#define BTP_MICP_DISCOVERED_EV 0x80 | ||
struct btp_micp_discovered_ev { | ||
bt_addr_le_t address; | ||
uint16_t mute_handle; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_STATE_EV 0x81 | ||
struct btp_micp_aics_state_ev { | ||
bt_addr_le_t address; | ||
int8_t gain; | ||
uint8_t mute; | ||
uint8_t mode; | ||
} __packed; | ||
|
||
#define BTP_MICP_MUTE_READ_EV 0x82 | ||
struct btp_micp_mute_read_ev { | ||
bt_addr_le_t address; | ||
uint8_t mute; | ||
} __packed; | ||
|
||
#define BTP_MICP_AICS_CHRC_EV 0x83 | ||
struct btp_micp_aics_handle_ev { | ||
bt_addr_le_t address; | ||
uint16_t state_handle; | ||
uint16_t gain_handle; | ||
uint16_t type_handle; | ||
uint16_t status_handle; | ||
uint16_t control_handle; | ||
uint16_t desc_handle; | ||
} __packed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.