Add NVS storage handler and integrate with main application logic
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
//
|
||||
#include "common/constants.h"
|
||||
#include "common/queue_defs.h"
|
||||
#include "io/nvs_handler.h"
|
||||
#include "info/info.h"
|
||||
#include "display/display.h"
|
||||
#include "touch/touch.h"
|
||||
@@ -49,9 +50,11 @@ void app_main(void) {
|
||||
throw std::runtime_error("Failed to create LVGL mutex");
|
||||
}
|
||||
//
|
||||
KVStorageHandler* kv_storage_handler = new NVSStorageHandler();
|
||||
DisplayHandler* display_handler = new EInkDisplayHandler(touch_event_queue, lvgl_mutex);
|
||||
TouchHandler* touch_handler = new EInkTouchHandler(touch_event_queue);
|
||||
//
|
||||
kv_storage_handler->init(system_event_group);
|
||||
display_handler->init(system_event_group);
|
||||
touch_handler->init(system_event_group);
|
||||
//
|
||||
@@ -75,7 +78,8 @@ void app_main(void) {
|
||||
printf("Waiting for system to be ready...\n");
|
||||
xEventGroupWaitBits(
|
||||
system_event_group,
|
||||
DISPLAY_READY_BIT | TOUCH_CALIBRATED_BIT,
|
||||
DISPLAY_READY_BIT | TOUCH_CALIBRATED_BIT | STORAGE_READY_BIT,
|
||||
// do not clear on exit, require explicit reset
|
||||
pdFALSE,
|
||||
pdTRUE,
|
||||
portMAX_DELAY
|
||||
|
||||
Reference in New Issue
Block a user