mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
hfp: answer +CCWA
This commit is contained in:
parent
40a7976ab3
commit
42b0282bb3
@ -675,6 +675,10 @@ static hfp_command_t parse_command(const char * line_buffer, int isHandsFree){
|
||||
return HFP_CMD_ENABLE_CLIP;
|
||||
}
|
||||
|
||||
if (strncmp(line_buffer+offset, HFP_ENABLE_CALL_WAITING_NOTIFICATION, strlen(HFP_ENABLE_CALL_WAITING_NOTIFICATION)) == 0){
|
||||
return HFP_CMD_ENABLE_CALL_WAITING_NOTIFICATION;
|
||||
}
|
||||
|
||||
if (strncmp(line_buffer+offset, HFP_SUPPORT_CALL_HOLD_AND_MULTIPARTY_SERVICES, strlen(HFP_SUPPORT_CALL_HOLD_AND_MULTIPARTY_SERVICES)) == 0){
|
||||
return HFP_CMD_SUPPORT_CALL_HOLD_AND_MULTIPARTY_SERVICES;
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ extern "C" {
|
||||
#define HFP_INDICATOR "+CIND"
|
||||
#define HFP_ENABLE_STATUS_UPDATE_FOR_AG_INDICATORS "+CMER"
|
||||
#define HFP_ENABLE_CLIP "+CLIP"
|
||||
#define HFP_ENABLE_CALL_WAITING_NOTIFICATION "+CCWA"
|
||||
#define HFP_UPDATE_ENABLE_STATUS_FOR_INDIVIDUAL_AG_INDICATORS "+BIA" // +BIA:<enabled>,,<enabled>,,,<enabled>
|
||||
#define HFP_SUPPORT_CALL_HOLD_AND_MULTIPARTY_SERVICES "+CHLD"
|
||||
#define HFP_GENERIC_STATUS_INDICATOR "+BIND"
|
||||
@ -144,6 +145,7 @@ typedef enum {
|
||||
HFP_CMD_ENABLE_INDIVIDUAL_AG_INDICATOR_STATUS_UPDATE,
|
||||
HFP_CMD_SUPPORT_CALL_HOLD_AND_MULTIPARTY_SERVICES,
|
||||
HFP_CMD_ENABLE_CLIP,
|
||||
HFP_CMD_ENABLE_CALL_WAITING_NOTIFICATION,
|
||||
|
||||
HFP_CMD_LIST_GENERIC_STATUS_INDICATORS,
|
||||
HFP_CMD_RETRIEVE_GENERIC_STATUS_INDICATORS,
|
||||
@ -405,6 +407,7 @@ typedef struct hfp_connection {
|
||||
|
||||
// HF -> AG configuration
|
||||
uint8_t clip_enabled;
|
||||
uint8_t call_waiting_notification_enabled;
|
||||
|
||||
// TODO: put these bit flags in a bitmap
|
||||
uint8_t ok_pending;
|
||||
|
@ -1202,6 +1202,12 @@ static void hfp_handle_rfcomm_data(uint8_t packet_type, uint16_t channel, uint8_
|
||||
log_info("hfp: clip set, now: %u", context->clip_enabled);
|
||||
context->ok_pending = 1;
|
||||
break;
|
||||
case HFP_CMD_ENABLE_CALL_WAITING_NOTIFICATION:
|
||||
context->command = HFP_CMD_NONE;
|
||||
context->call_waiting_notification_enabled = context->line_buffer[8] != '0';
|
||||
log_info("hfp: call waiting notification set, now: %u", context->call_waiting_notification_enabled);
|
||||
context->ok_pending = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user