IoT25S IoT Klocka 0.1
Grupparbete för IoT25S på Jensen YH
Loading...
Searching...
No Matches
main.c File Reference
#include "esp_log.h"
#include "nvs_flash.h"
#include "alarm_service.h"
#include "app_state.h"
#include "display_ui.h"
#include "time_service.h"
#include "web_portal.h"
+ Include dependency graph for main.c:

Go to the source code of this file.

Functions

void app_main (void)
 

Variables

static const char * TAG = "main"
 

Function Documentation

◆ app_main()

void app_main ( void  )

Definition at line 12 of file main.c.

13{
14 esp_err_t ret = nvs_flash_init();
15 if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
16 ESP_ERROR_CHECK(nvs_flash_erase());
17 ret = nvs_flash_init();
18 }
19 ESP_ERROR_CHECK(ret);
20
21 ESP_ERROR_CHECK(app_state_init());
22 ESP_ERROR_CHECK(time_service_init());
23
24 ret = display_ui_start();
25 if (ret != ESP_OK) {
26 ESP_LOGW(TAG, "Display startup failed: %s", esp_err_to_name(ret));
27 }
28
29 ESP_ERROR_CHECK(web_portal_start());
30 ESP_ERROR_CHECK(alarm_service_start());
31}
esp_err_t alarm_service_start(void)
Start the alarm service task.
esp_err_t app_state_init(void)
Initialize state, defaults, and NVS-backed values.
Definition app_state.c:123
esp_err_t display_ui_start(void)
Initialize display backend and start the UI task.
Definition display_ui.c:154
static const char * TAG
Definition main.c:10
esp_err_t time_service_init(void)
Initialize time service state and restore persisted time fallback.
esp_err_t web_portal_start(void)
Start Wi-Fi mode handling and HTTP portal service.
Definition web_portal.c:882
+ Here is the call graph for this function:

Variable Documentation

◆ TAG

const char* TAG = "main"
static

Definition at line 10 of file main.c.