mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 01:27:41 +00:00
avrcp_controller: add avrcp_controller_force_send_press_cmd
This commit is contained in:
parent
3bd96807a4
commit
39b456a876
@ -119,6 +119,7 @@ static void avrcp_controller_pass_through_command_data_init(avrcp_connection_t *
|
||||
connection->data_offset = 0;
|
||||
connection->data_len = 0;
|
||||
}
|
||||
|
||||
static int avrcp_controller_supports_browsing(uint16_t controller_supported_features){
|
||||
return controller_supported_features & AVRCP_FEATURE_MASK_BROWSING;
|
||||
}
|
||||
@ -1806,3 +1807,18 @@ uint8_t avrcp_controller_send_custom_command(uint16_t avrcp_cid,
|
||||
avrcp_request_can_send_now(connection, connection->l2cap_signaling_cid);
|
||||
return ERROR_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
uint8_t avrcp_controller_force_send_press_cmd(uint16_t avrcp_cid, avrcp_operation_id_t opid){
|
||||
avrcp_connection_t * connection = avrcp_get_connection_for_avrcp_cid_for_role(AVRCP_CONTROLLER, avrcp_cid);
|
||||
if (!connection){
|
||||
return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
|
||||
}
|
||||
if (connection->state < AVCTP_CONNECTION_OPENED){
|
||||
return ERROR_CODE_COMMAND_DISALLOWED;
|
||||
}
|
||||
|
||||
connection->state = AVCTP_W2_SEND_COMMAND;
|
||||
avrcp_controller_pass_through_command_data_init(connection, opid);
|
||||
avrcp_request_can_send_now(connection, connection->l2cap_signaling_cid);
|
||||
return ERROR_CODE_SUCCESS;
|
||||
}
|
@ -348,6 +348,9 @@ void avrcp_controller_deinit(void);
|
||||
|
||||
/* API_END */
|
||||
|
||||
// send press command if connection is open. use with great care and only if there's no other option
|
||||
uint8_t avrcp_controller_force_send_press_cmd(uint16_t avrcp_cid, avrcp_operation_id_t operation_id);
|
||||
|
||||
// Used by AVRCP controller and AVRCP browsing controller
|
||||
extern avrcp_context_t avrcp_controller_context;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user