mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 01:27:41 +00:00
hfp: fix calls to renamed hfp_init_ functions
This commit is contained in:
parent
adca832cb7
commit
9b10478f28
@ -1033,9 +1033,9 @@ void hfp_hf_init(uint16_t rfcomm_channel_nr){
|
||||
hfp_hf_microphone_gain = 9;
|
||||
}
|
||||
|
||||
void hfp_hf_set_codecs(int codecs_nr, uint8_t * codecs){
|
||||
void hfp_hf_init_codecs(int codecs_nr, uint8_t * codecs){
|
||||
if (codecs_nr > HFP_MAX_NUM_CODECS){
|
||||
log_error("hfp_hf_set_codecs: codecs_nr (%d) > HFP_MAX_NUM_CODECS (%d)", codecs_nr, HFP_MAX_NUM_CODECS);
|
||||
log_error("hfp_hf_init_codecs: codecs_nr (%d) > HFP_MAX_NUM_CODECS (%d)", codecs_nr, HFP_MAX_NUM_CODECS);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1058,11 +1058,11 @@ void hfp_hf_set_codecs(int codecs_nr, uint8_t * codecs){
|
||||
}
|
||||
}
|
||||
|
||||
void hfp_hf_set_supported_features(uint32_t supported_features){
|
||||
void hfp_hf_init_supported_features(uint32_t supported_features){
|
||||
hfp_supported_features = supported_features;
|
||||
}
|
||||
|
||||
void hfp_hf_set_hf_indicators(int indicators_nr, uint16_t * indicators){
|
||||
void hfp_hf_init_hf_indicators(int indicators_nr, uint16_t * indicators){
|
||||
hfp_indicators_nr = indicators_nr;
|
||||
int i;
|
||||
for (i = 0; i < hfp_indicators_nr ; i++){
|
||||
|
@ -338,7 +338,7 @@ void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
sscanf(&expected_cmd[7],"%d,%d", &parsed_codecs[0], &parsed_codecs[1]);
|
||||
new_codecs[0] = parsed_codecs[0];
|
||||
new_codecs[1] = parsed_codecs[1];
|
||||
hfp_hf_set_codecs(2, (uint8_t*)new_codecs);
|
||||
hfp_hf_init_codecs(2, (uint8_t*)new_codecs);
|
||||
while (has_more_hfp_hf_commands()){
|
||||
// empty rfcomm payload buffer
|
||||
get_next_hfp_hf_command();
|
||||
@ -350,7 +350,7 @@ void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
printf("Call hfp_hf_init with SF %d\n", supported_features);
|
||||
hfp_hf_release_service_level_connection(device_addr);
|
||||
|
||||
hfp_hf_set_supported_features(supported_features);
|
||||
hfp_hf_init_supported_features(supported_features);
|
||||
|
||||
user_command('a');
|
||||
while (has_more_hfp_hf_commands()){
|
||||
@ -482,11 +482,10 @@ TEST_GROUP(HFPClient){
|
||||
call_termiated = 0;
|
||||
|
||||
hfp_hf_init(rfcomm_channel_nr);
|
||||
hfp_hf_set_supported_features(supported_features_with_codec_negotiation);
|
||||
hfp_hf_set_hf_indicators(sizeof(indicators)/sizeof(uint16_t), indicators);
|
||||
hfp_hf_set_hf_indicators_status(1);
|
||||
hfp_hf_init_supported_features(supported_features_with_codec_negotiation);
|
||||
hfp_hf_init_hf_indicators(sizeof(indicators)/sizeof(uint16_t), indicators);
|
||||
|
||||
hfp_hf_set_codecs(sizeof(codecs), codecs);
|
||||
hfp_hf_init_codecs(sizeof(codecs), codecs);
|
||||
}
|
||||
|
||||
void teardown(void){
|
||||
|
@ -535,9 +535,9 @@ int btstack_main(int argc, const char * argv[]){
|
||||
|
||||
// hfp_hf_init(rfcomm_channel_nr, HFP_DEFAULT_HF_SUPPORTED_FEATURES, codecs, sizeof(codecs), indicators, sizeof(indicators)/sizeof(uint16_t), 1);
|
||||
hfp_hf_init(rfcomm_channel_nr);
|
||||
hfp_hf_set_supported_features(438 | (1<<HFP_HFSF_ESCO_S4) | (1<<HFP_HFSF_EC_NR_FUNCTION));
|
||||
hfp_hf_set_hf_indicators(sizeof(indicators)/sizeof(uint16_t), indicators, hf_indicators_values);
|
||||
hfp_hf_set_codecs(sizeof(codecs), codecs);
|
||||
hfp_hf_init_supported_features(438 | (1<<HFP_HFSF_ESCO_S4) | (1<<HFP_HFSF_EC_NR_FUNCTION));
|
||||
hfp_hf_init_hf_indicators(sizeof(indicators)/sizeof(uint16_t), indicators, hf_indicators_values);
|
||||
hfp_hf_init_codecs(sizeof(codecs), codecs);
|
||||
hfp_hf_set_indicators_status(1);
|
||||
|
||||
hfp_hf_register_packet_handler(packet_handler);
|
||||
|
Loading…
x
Reference in New Issue
Block a user