mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
hfp: declare arrays param in init functions as const
This commit is contained in:
parent
8300a979e2
commit
7ca89cabe0
@ -2078,7 +2078,7 @@ static void hfp_ag_hci_event_packet_handler(uint8_t packet_type, uint16_t channe
|
||||
hfp_ag_run();
|
||||
}
|
||||
|
||||
void hfp_ag_init_codecs(int codecs_nr, uint8_t * codecs){
|
||||
void hfp_ag_init_codecs(int codecs_nr, const uint8_t * codecs){
|
||||
if (codecs_nr > HFP_MAX_NUM_CODECS){
|
||||
log_error("hfp_init: codecs_nr (%d) > HFP_MAX_NUM_CODECS (%d)", codecs_nr, HFP_MAX_NUM_CODECS);
|
||||
return;
|
||||
@ -2094,13 +2094,13 @@ void hfp_ag_init_supported_features(uint32_t supported_features){
|
||||
hfp_supported_features = supported_features;
|
||||
}
|
||||
|
||||
void hfp_ag_init_ag_indicators(int ag_indicators_nr, hfp_ag_indicator_t * ag_indicators){
|
||||
void hfp_ag_init_ag_indicators(int ag_indicators_nr, const hfp_ag_indicator_t * ag_indicators){
|
||||
hfp_ag_indicators_nr = ag_indicators_nr;
|
||||
(void)memcpy(hfp_ag_indicators, ag_indicators,
|
||||
ag_indicators_nr * sizeof(hfp_ag_indicator_t));
|
||||
}
|
||||
|
||||
void hfp_ag_init_hf_indicators(int hf_indicators_nr, hfp_generic_status_indicator_t * hf_indicators){
|
||||
void hfp_ag_init_hf_indicators(int hf_indicators_nr, const hfp_generic_status_indicator_t * hf_indicators){
|
||||
if (hf_indicators_nr > HFP_MAX_NUM_INDICATORS) return;
|
||||
hfp_generic_status_indicators_nr = hf_indicators_nr;
|
||||
(void)memcpy(hfp_generic_status_indicators, hf_indicators,
|
||||
|
@ -82,7 +82,7 @@ void hfp_ag_init(uint16_t rfcomm_channel_nr);
|
||||
* @param codecs_nr
|
||||
* @param codecs
|
||||
*/
|
||||
void hfp_ag_init_codecs(int codecs_nr, uint8_t * codecs);
|
||||
void hfp_ag_init_codecs(int codecs_nr, const uint8_t * codecs);
|
||||
|
||||
/**
|
||||
* @brief Set supported features.
|
||||
@ -95,14 +95,14 @@ void hfp_ag_init_supported_features(uint32_t supported_features);
|
||||
* @param indicators_nr
|
||||
* @param indicators
|
||||
*/
|
||||
void hfp_ag_init_ag_indicators(int ag_indicators_nr, hfp_ag_indicator_t * ag_indicators);
|
||||
void hfp_ag_init_ag_indicators(int ag_indicators_nr, const hfp_ag_indicator_t * ag_indicators);
|
||||
|
||||
/**
|
||||
* @brief Set HF indicators.
|
||||
* @param indicators_nr
|
||||
* @param indicators
|
||||
*/
|
||||
void hfp_ag_init_hf_indicators(int hf_indicators_nr, hfp_generic_status_indicator_t * hf_indicators);
|
||||
void hfp_ag_init_hf_indicators(int hf_indicators_nr, const hfp_generic_status_indicator_t * hf_indicators);
|
||||
|
||||
/**
|
||||
* @brief Set Call Hold services.
|
||||
|
@ -1232,7 +1232,7 @@ void hfp_hf_deinit(void){
|
||||
(void) memset(phone_number, 0, sizeof(phone_number));
|
||||
}
|
||||
|
||||
void hfp_hf_init_codecs(int codecs_nr, uint8_t * codecs){
|
||||
void hfp_hf_init_codecs(int codecs_nr, const uint8_t * codecs){
|
||||
if (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;
|
||||
@ -1249,7 +1249,7 @@ void hfp_hf_init_supported_features(uint32_t supported_features){
|
||||
hfp_supported_features = supported_features;
|
||||
}
|
||||
|
||||
void hfp_hf_init_hf_indicators(int indicators_nr, uint16_t * indicators){
|
||||
void hfp_hf_init_hf_indicators(int indicators_nr, const uint16_t * indicators){
|
||||
hfp_indicators_nr = indicators_nr;
|
||||
int i;
|
||||
for (i = 0; i < hfp_indicators_nr ; i++){
|
||||
|
@ -76,7 +76,7 @@ void hfp_hf_init(uint16_t rfcomm_channel_nr);
|
||||
* @param codecs_nr
|
||||
* @param codecs
|
||||
*/
|
||||
void hfp_hf_init_codecs(int codecs_nr, uint8_t * codecs);
|
||||
void hfp_hf_init_codecs(int codecs_nr, const uint8_t * codecs);
|
||||
|
||||
/**
|
||||
* @brief Set supported features.
|
||||
@ -89,7 +89,7 @@ void hfp_hf_init_supported_features(uint32_t supported_features);
|
||||
* @param indicators_nr
|
||||
* @param indicators
|
||||
*/
|
||||
void hfp_hf_init_hf_indicators(int indicators_nr, uint16_t * indicators);
|
||||
void hfp_hf_init_hf_indicators(int indicators_nr, const uint16_t * indicators);
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user