hfp_hf.c (84e7d3b9ed832c3903c91ded626ba2aba9533c80) | hfp_hf.c (97d2cadb384a5febac2b6eb58bb8a7fe3da28e4d) |
---|---|
1/* 2 * Copyright (C) 2014 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 --- 252 unchanged lines hidden (view full) --- 261} 262 263static int hfp_hf_send_dtmf(uint16_t cid, char code){ 264 char buffer[20]; 265 snprintf(buffer, sizeof(buffer), "AT%s=%c\r\n", HFP_TRANSMIT_DTMF_CODES, code); 266 return send_str_over_rfcomm(cid, buffer); 267} 268 | 1/* 2 * Copyright (C) 2014 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 --- 252 unchanged lines hidden (view full) --- 261} 262 263static int hfp_hf_send_dtmf(uint16_t cid, char code){ 264 char buffer[20]; 265 snprintf(buffer, sizeof(buffer), "AT%s=%c\r\n", HFP_TRANSMIT_DTMF_CODES, code); 266 return send_str_over_rfcomm(cid, buffer); 267} 268 |
269static int hfp_hf_cmd_ata(uint16_t cid){ 270 return send_str_over_rfcomm(cid, "ATA\r\n"); 271} 272 |
|
269static int hfp_hf_cmd_exchange_supported_features(uint16_t cid){ 270 return hfp_hf_send_cmd_with_int(cid, HFP_SUPPORTED_FEATURES, hfp_supported_features); 271} 272 273static int hfp_hf_cmd_retrieve_indicators(uint16_t cid){ 274 return hfp_hf_send_cmd_with_mark(cid, HFP_INDICATOR, "=?"); 275} 276 --- 20 unchanged lines hidden (view full) --- 297static int hfp_hf_cmd_query_operator_name(uint16_t cid){ 298 return hfp_hf_send_cmd_with_mark(cid, HFP_QUERY_OPERATOR_SELECTION, "?"); 299} 300 301static int hfp_hf_cmd_trigger_codec_connection_setup(uint16_t cid){ 302 return hfp_hf_send_cmd(cid, HFP_TRIGGER_CODEC_CONNECTION_SETUP); 303} 304 | 273static int hfp_hf_cmd_exchange_supported_features(uint16_t cid){ 274 return hfp_hf_send_cmd_with_int(cid, HFP_SUPPORTED_FEATURES, hfp_supported_features); 275} 276 277static int hfp_hf_cmd_retrieve_indicators(uint16_t cid){ 278 return hfp_hf_send_cmd_with_mark(cid, HFP_INDICATOR, "=?"); 279} 280 --- 20 unchanged lines hidden (view full) --- 301static int hfp_hf_cmd_query_operator_name(uint16_t cid){ 302 return hfp_hf_send_cmd_with_mark(cid, HFP_QUERY_OPERATOR_SELECTION, "?"); 303} 304 305static int hfp_hf_cmd_trigger_codec_connection_setup(uint16_t cid){ 306 return hfp_hf_send_cmd(cid, HFP_TRIGGER_CODEC_CONNECTION_SETUP); 307} 308 |
305static int hfp_hf_cmd_ata(uint16_t cid){ 306 return hfp_hf_send_cmd(cid, HFP_ANSWER_CALL); 307} 308 | |
309static int hfp_hf_set_microphone_gain_cmd(uint16_t cid, int gain){ 310 return hfp_hf_send_cmd_with_int(cid, HFP_SET_MICROPHONE_GAIN, gain); 311} 312 313static int hfp_hf_set_speaker_gain_cmd(uint16_t cid, int gain){ 314 return hfp_hf_send_cmd_with_int(cid, HFP_SET_SPEAKER_GAIN, gain); 315} 316 --- 1360 unchanged lines hidden --- | 309static int hfp_hf_set_microphone_gain_cmd(uint16_t cid, int gain){ 310 return hfp_hf_send_cmd_with_int(cid, HFP_SET_MICROPHONE_GAIN, gain); 311} 312 313static int hfp_hf_set_speaker_gain_cmd(uint16_t cid, int gain){ 314 return hfp_hf_send_cmd_with_int(cid, HFP_SET_SPEAKER_GAIN, gain); 315} 316 --- 1360 unchanged lines hidden --- |