Merge pull request #3565 from cesanta/lfs

Add LFS support layer and nucleo-h563zi/minimal-lfs example
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2026-05-28 00:35:38 +01:00
commit 8012a5943a
19 files changed
+1154 -6

No files matched your search

+9 -1
View File
@@ -933,6 +933,10 @@ struct timeval {
#define MG_ENABLE_FATFS 0
#endif
#ifndef MG_ENABLE_LFS
#define MG_ENABLE_LFS 0
#endif
#ifndef MG_ENABLE_SSI
#define MG_ENABLE_SSI 0
#endif
@@ -3283,7 +3287,8 @@ void mg_ota_url_check(struct mg_mgr *mgr,
#if MG_OTA != MG_OTA_NONE && MG_OTA != MG_OTA_CUSTOM
#if (MG_OTA != MG_OTA_NONE && MG_OTA != MG_OTA_CUSTOM) || MG_ENABLE_LFS
struct mg_flash {
void *start; // Address at which flash starts
@@ -3294,6 +3299,9 @@ struct mg_flash {
bool (*swap_fn)(void); // Swap partitions
};
extern struct mg_flash *mg_flash;
bool mg_lfs_init(size_t size);
bool mg_ota_flash_begin(size_t new_firmware_size, struct mg_flash *flash);
bool mg_ota_flash_write(const void *buf, size_t len, struct mg_flash *flash);
bool mg_ota_flash_end(struct mg_flash *flash);