Examples: Demonstrate the usage of esp_err_to_name

This commit is contained in:
Roland Dobai
2018-02-22 14:48:53 +01:00
parent f891eac827
commit 27a63c492f
31 changed files with 156 additions and 145 deletions

View File

@@ -37,7 +37,7 @@ void app_main(void)
} else if (ret == ESP_ERR_NOT_FOUND) {
ESP_LOGE(TAG, "Failed to find SPIFFS partition");
} else {
ESP_LOGE(TAG, "Failed to initialize SPIFFS (%d)", ret);
ESP_LOGE(TAG, "Failed to initialize SPIFFS (%s)", esp_err_to_name(ret));
}
return;
}
@@ -45,7 +45,7 @@ void app_main(void)
size_t total = 0, used = 0;
ret = esp_spiffs_info(NULL, &total, &used);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Failed to get SPIFFS partition information");
ESP_LOGE(TAG, "Failed to get SPIFFS partition information (%s)", esp_err_to_name(ret));
} else {
ESP_LOGI(TAG, "Partition size: total: %d, used: %d", total, used);
}