diff --git a/components/bt/bluedroid/btc/core/btc_config.c b/components/bt/bluedroid/btc/core/btc_config.c index 9249cfd8f..7b733ae7b 100644 --- a/components/bt/bluedroid/btc/core/btc_config.c +++ b/components/bt/bluedroid/btc/core/btc_config.c @@ -32,7 +32,7 @@ static const char *CONFIG_FILE_PATH = "bt_config.conf"; static const period_ms_t CONFIG_SETTLE_PERIOD_MS = 3000; -static void btc_key_value_to_string(uint8_t *key_vaule, char *value_str, int key_length); +static void btc_key_value_to_string(uint8_t *key_value, char *value_str, int key_length); static osi_mutex_t lock; // protects operations on |config|. static config_t *config; @@ -51,16 +51,16 @@ bool btc_compare_address_key_value(const char *section, char *key_type, void *ke return status; } -static void btc_key_value_to_string(uint8_t *key_vaule, char *value_str, int key_length) +static void btc_key_value_to_string(uint8_t *key_value, char *value_str, int key_length) { const char *lookup = "0123456789abcdef"; - assert(key_vaule != NULL); + assert(key_value != NULL); assert(value_str != NULL); for (size_t i = 0; i < key_length; ++i) { - value_str[(i * 2) + 0] = lookup[(key_vaule[i] >> 4) & 0x0F]; - value_str[(i * 2) + 1] = lookup[key_vaule[i] & 0x0F]; + value_str[(i * 2) + 0] = lookup[(key_value[i] >> 4) & 0x0F]; + value_str[(i * 2) + 1] = lookup[key_value[i] & 0x0F]; } return; diff --git a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c index 4ea69a547..c9d759e2c 100644 --- a/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c +++ b/components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c @@ -404,7 +404,7 @@ static void btc_gatts_act_create_attr_tab(esp_gatts_attr_db_t *gatts_attr_db, //reset the env after sent the data to app memset(&btc_creat_tab_env, 0, sizeof(esp_btc_creat_tab_t)); - //release the flag vaule to false after finish the service created. + //set the flag value to false after the service is created. btc_creat_tab_env.is_tab_creat_svc = false; } diff --git a/components/bt/bluedroid/stack/gatt/gatt_db.c b/components/bt/bluedroid/stack/gatt/gatt_db.c index 91a46c6a6..ec552d7bf 100644 --- a/components/bt/bluedroid/stack/gatt/gatt_db.c +++ b/components/bt/bluedroid/stack/gatt/gatt_db.c @@ -794,7 +794,7 @@ tGATT_STATUS gatts_get_attribute_value(tGATT_SVC_DB *p_db, UINT16 attr_handle, *value = p_cur->p_value->attr_val.attr_val; return GATT_SUCCESS; } else { - GATT_TRACE_ERROR("gatts_get_attribute_vaule failt:the value length is 0"); + GATT_TRACE_ERROR("gatts_get_attribute_value failed:the value length is 0"); return GATT_INVALID_ATTR_LEN; } break; @@ -805,7 +805,7 @@ tGATT_STATUS gatts_get_attribute_value(tGATT_SVC_DB *p_db, UINT16 attr_handle, *value = p_cur->p_value->attr_val.attr_val; return GATT_SUCCESS; } else { - GATT_TRACE_ERROR("gatts_get_attribute_vaule failed:the value length is 0"); + GATT_TRACE_ERROR("gatts_get_attribute_value failed:the value length is 0"); return GATT_INVALID_ATTR_LEN; }