feat: Implement HTTP server with static file serving from LittleFS, system APIs, and network connectivity management.

This commit is contained in:
2026-03-03 16:17:05 -05:00
parent 80114b1d9f
commit 7c537ed4db
5 changed files with 36 additions and 5 deletions

View File

@@ -178,7 +178,7 @@ internal httpd_handle_t start_webserver(void)
#ifdef CONFIG_CALENDINK_DEPLOY_WEB_PAGES
esp_vfs_littlefs_conf_t conf = {};
conf.base_path = "/www";
conf.partition_label = "www";
conf.partition_label = g_Active_WWW_Partition == 0 ? "www_0" : "www_1";
conf.format_if_mount_failed = false;
conf.dont_mount = false;
esp_err_t ret = esp_vfs_littlefs_register(&conf);
@@ -253,7 +253,8 @@ internal void stop_webserver(httpd_handle_t server)
{
httpd_stop(server);
#ifdef CONFIG_CALENDINK_DEPLOY_WEB_PAGES
esp_vfs_littlefs_unregister("www");
esp_vfs_littlefs_unregister(g_Active_WWW_Partition == 0 ? "www_0"
: "www_1");
#endif
}
}