enhancement: new "config" module to access configuration in RAM

This is to allow moving some tasks/stack memory to SPIRAM, saving on
precious IRAM. HTTP server should also be more responsive.
This commit is contained in:
Sebastien
2019-11-06 23:31:13 -05:00
parent 86f0d4c7ea
commit cdbb198d8a
38 changed files with 1219 additions and 510 deletions

View File

@@ -166,7 +166,7 @@ void hal_bluetooth_init(const char * options)
}
if(squeezelite_args.sink_name->count == 0)
{
squeezelite_conf.sink_name = get_nvs_value_alloc_default(NVS_TYPE_STR, "a2dp_sink_name", CONFIG_A2DP_SINK_NAME, 0);
squeezelite_conf.sink_name = config_alloc_get_default(NVS_TYPE_STR, "a2dp_sink_name", CONFIG_A2DP_SINK_NAME, 0);
if(squeezelite_conf.sink_name == NULL){
ESP_LOGW(TAG,"Unable to retrieve the a2dp sink name from nvs");
squeezelite_conf.sink_name = strdup(CONFIG_A2DP_SINK_NAME);
@@ -511,7 +511,7 @@ static void bt_av_hdl_stack_evt(uint16_t event, void *p_param)
/* set up device name */
char * a2dp_dev_name = get_nvs_value_alloc_default(NVS_TYPE_STR, "a2dp_dev_name", CONFIG_A2DP_DEV_NAME, 0);
char * a2dp_dev_name = config_alloc_get_default(NVS_TYPE_STR, "a2dp_dev_name", CONFIG_A2DP_DEV_NAME, 0);
if(a2dp_dev_name == NULL){
ESP_LOGW(TAG,"Unable to retrieve the a2dp device name from nvs");
esp_bt_dev_set_device_name(CONFIG_A2DP_DEV_NAME);