diff options
Diffstat (limited to 'libbt/src')
-rw-r--r-- | libbt/src/conf.c | 5 | ||||
-rw-r--r-- | libbt/src/hardware.c | 19 | ||||
-rwxr-xr-x | libbt/src/userial_vendor.c | 26 |
3 files changed, 47 insertions, 3 deletions
diff --git a/libbt/src/conf.c b/libbt/src/conf.c index 39ac12e..8800991 100644 --- a/libbt/src/conf.c +++ b/libbt/src/conf.c @@ -37,6 +37,8 @@ int userial_set_port(char *p_conf_name, char *p_conf_value, int param); int hw_set_patch_file_path(char *p_conf_name, char *p_conf_value, int param); int hw_set_patch_file_name(char *p_conf_name, char *p_conf_value, int param); +int hw_set_pre_patch_file_name(char *p_conf_name, char *p_conf_value, int param); +int userial_set_force_use_2_stop_bits(char *p_conf_name, char *p_conf_value, int param); #if (VENDOR_LIB_RUNTIME_TUNING_ENABLED == TRUE) int hw_set_patch_settlement_delay(char *p_conf_name, char *p_conf_value, int param); #endif @@ -70,6 +72,9 @@ static const conf_entry_t conf_table[] = { {"UartPort", userial_set_port, 0}, {"FwPatchFilePath", hw_set_patch_file_path, 0}, {"FwPatchFileName", hw_set_patch_file_name, 0}, + {"FwPrePatchFileName", hw_set_pre_patch_file_name, 0}, + {"UartForceUse2StopBits", userial_set_force_use_2_stop_bits, 0}, + #if (VENDOR_LIB_RUNTIME_TUNING_ENABLED == TRUE) {"FwPatchSettlementDelay", hw_set_patch_settlement_delay, 0}, #endif diff --git a/libbt/src/hardware.c b/libbt/src/hardware.c index 392704e..df20c9f 100644 --- a/libbt/src/hardware.c +++ b/libbt/src/hardware.c @@ -1335,6 +1335,25 @@ int hw_set_patch_file_name(char *p_conf_name, char *p_conf_value, int param) return 0; } +/******************************************************************************* +** +** Function hw_set_pre_patch_file_name +** +** Description Give the specific firmware pre-patch filename +** +** Returns 0 : Success +** Otherwise : Fail +** +*******************************************************************************/ +int hw_set_pre_patch_file_name(char *p_conf_name, char *p_conf_value, int param) +{ + + strcpy(fw_prepatch_name, p_conf_value); + + return 0; +} + + #if (VENDOR_LIB_RUNTIME_TUNING_ENABLED == TRUE) /******************************************************************************* ** diff --git a/libbt/src/userial_vendor.c b/libbt/src/userial_vendor.c index 1a745b5..5233d19 100755 --- a/libbt/src/userial_vendor.c +++ b/libbt/src/userial_vendor.c @@ -68,6 +68,7 @@ typedef struct ******************************************************************************/ static vnd_userial_cb_t vnd_userial; +static int vnd_userial_force_2stopbits = UART_FORCE_TWO_STOPBITS; /***************************************************************************** ** Helper Functions @@ -215,10 +216,10 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg) return -1; } - if(p_cfg->fmt & USERIAL_STOPBITS_1) - stop_bits = 0; - else if(p_cfg->fmt & USERIAL_STOPBITS_2) + if(vnd_userial_force_2stopbits || (p_cfg->fmt & USERIAL_STOPBITS_2)) stop_bits = CSTOPB; + else if(p_cfg->fmt & USERIAL_STOPBITS_1) + stop_bits = 0; else { ALOGE("userial vendor open: unsupported stop bits"); @@ -359,3 +360,22 @@ int userial_set_port(char *p_conf_name, char *p_conf_value, int param) return 0; } +/******************************************************************************* +** +** Function userial_set_force_use_2_stop_bits +** +** Description Configure UART port name +** +** Returns 0 : Success +** Otherwise : Fail +** +*******************************************************************************/ +int userial_set_force_use_2_stop_bits(char *p_conf_name, char *p_conf_value, int param) +{ + if (strcmp(p_conf_value, "true") == 0) + vnd_userial_force_2stopbits = TRUE; + else + vnd_userial_force_2stopbits = FALSE; + return 0; +} + |