Introduce struct mg_flash::{read_fn,init_fn}

This commit is contained in:
cpq committed 2026-12-03 10:47:45 +00:00
1 parent 9ac1106e74
commit 57e30ab2e9
18 files changed
+438 -293

No files matched your search

+7
View File
@@ -75,6 +75,13 @@ bool mg_ota_write(const void *buf, size_t len);
// Ends the OTA process and commits the written firmware.
bool mg_ota_end(void);
// Same as above, for a given flash. OTA backends use these to implement
// mg_ota_begin(), mg_ota_write() and mg_ota_end()
struct mg_flash;
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);
// Push-based OTA: mg_http_stream_body() callback that flashes the request
//
// ```c