hfp_hf.c (ad862247f19fbeb04d517df6c02b3435f7637f31) | hfp_hf.c (42aadee500c4b13e2a892e81e2d6db7fc4b68e70) |
---|---|
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 --- 1473 unchanged lines hidden (view full) --- 1482 hfp_hf_callsetup_status = HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS; 1483 hfp_hf_callheld_status= HFP_CALLHELD_STATUS_NO_CALLS_HELD; 1484 hfp_hf_codecs_nr = 0; 1485 hfp_hf_speaker_gain = 9; 1486 hfp_hf_microphone_gain = 9; 1487 hfp_hf_indicators_nr = 0; 1488} 1489 | 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 --- 1473 unchanged lines hidden (view full) --- 1482 hfp_hf_callsetup_status = HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS; 1483 hfp_hf_callheld_status= HFP_CALLHELD_STATUS_NO_CALLS_HELD; 1484 hfp_hf_codecs_nr = 0; 1485 hfp_hf_speaker_gain = 9; 1486 hfp_hf_microphone_gain = 9; 1487 hfp_hf_indicators_nr = 0; 1488} 1489 |
1490uint8_t hfp_hf_set_default_microphone_gain(uint8_t gain){ 1491 if ((gain < 0) || (gain > 15)){ 1492 return ERROR_CODE_INVALID_HCI_COMMAND_PARAMETERS; 1493 } 1494 hfp_hf_microphone_gain = gain; 1495 return ERROR_CODE_SUCCESS; 1496} 1497 1498uint8_t hfp_hf_set_default_speaker_gain(uint8_t gain){ 1499 if ((gain < 0) || (gain > 15)){ 1500 return ERROR_CODE_INVALID_HCI_COMMAND_PARAMETERS; 1501 } 1502 hfp_hf_speaker_gain = gain; 1503 return ERROR_CODE_SUCCESS; 1504} 1505 |
|
1490uint8_t hfp_hf_init(uint8_t rfcomm_channel_nr){ 1491 uint8_t status = rfcomm_register_service(hfp_hf_rfcomm_packet_handler, rfcomm_channel_nr, 0xffff); 1492 if (status != ERROR_CODE_SUCCESS){ 1493 return status; 1494 } 1495 1496 hfp_init(); 1497 hfp_hf_set_defaults(); --- 757 unchanged lines hidden --- | 1506uint8_t hfp_hf_init(uint8_t rfcomm_channel_nr){ 1507 uint8_t status = rfcomm_register_service(hfp_hf_rfcomm_packet_handler, rfcomm_channel_nr, 0xffff); 1508 if (status != ERROR_CODE_SUCCESS){ 1509 return status; 1510 } 1511 1512 hfp_init(); 1513 hfp_hf_set_defaults(); --- 757 unchanged lines hidden --- |