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;
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;
//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;
}
*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;
*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;
}