mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Update `Configuration` to use C++ vector instead of C arrays - Rename `Desktop` app to `Launcher` - Fix for hard-coded app start of `Launcher` and `CrashDiagnostics` apps. - Ensure `Launcher` icons are clickable, even if they're not loading. - Don't show error scenario for SD card in statusbar when SD card status is unknown (this happens during Mutex timeout due to LVGL rendering delays) - Cleanup deprecated `Mutex` methods. - `hal::getConfiguration()` now returns a pointer instead of a reference, just like `tt:getConfiguration()`
40 lines
764 B
C++
40 lines
764 B
C++
#ifdef ESP_TARGET
|
|
|
|
#include "TactilityCore.h"
|
|
#include "EspPartitions_i.h"
|
|
|
|
#include "esp_event.h"
|
|
#include "esp_netif.h"
|
|
#include "nvs_flash.h"
|
|
|
|
namespace tt {
|
|
|
|
#define TAG "tactility"
|
|
|
|
// Initialize NVS
|
|
static void initNvs() {
|
|
esp_err_t ret = nvs_flash_init();
|
|
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
|
TT_LOG_I(TAG, "nvs erasing");
|
|
ESP_ERROR_CHECK(nvs_flash_erase());
|
|
ret = nvs_flash_init();
|
|
}
|
|
ESP_ERROR_CHECK(ret);
|
|
TT_LOG_I(TAG, "nvs initialized");
|
|
}
|
|
|
|
static void initNetwork() {
|
|
ESP_ERROR_CHECK(esp_netif_init());
|
|
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
|
}
|
|
|
|
void initEsp() {
|
|
initNvs();
|
|
initPartitionsEsp();
|
|
initNetwork();
|
|
}
|
|
|
|
} // namespace
|
|
|
|
#endif
|