Code cleanups

This commit is contained in:
2021-07-15 13:17:07 +02:00
parent eab140a454
commit f74e16d443
24 changed files with 1230 additions and 822 deletions
+36
View File
@@ -0,0 +1,36 @@
#include "myconfig.h"
// esp-idf includes
#include <nvs_flash.h>
#include <esp_log.h>
namespace deckenlampe {
nvs_handle_t nvsHandle;
namespace {
constexpr const char * const TAG = "CONFIG";
} // namespace
void init_config()
{
{
const auto result = nvs_flash_init();
ESP_LOG_LEVEL_LOCAL((result == ESP_OK ? ESP_LOG_INFO : ESP_LOG_ERROR), TAG, "nvs_flash_init(): %s", esp_err_to_name(result));
//if (result != ESP_OK)
// return result;
}
{
const auto result = nvs_open("deckenlampe", NVS_READWRITE, &nvsHandle);
ESP_LOG_LEVEL_LOCAL((result == ESP_OK ? ESP_LOG_INFO : ESP_LOG_ERROR), TAG, "nvs_open(): %s", esp_err_to_name(result));
//if (result != ESP_OK)
// return result;
}
// TODO
}
void update_config()
{
}
} // namespace deckenlamp