mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
Simplify OTA API
This commit is contained in:
1 parent
8eabf43525
commit
3319ce78d3
7 files changed
+220
-22
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
#include "arch.h"
|
||||
|
||||
struct mg_flash {
|
||||
void *start; // Address at which flash starts
|
||||
size_t size; // Flash size
|
||||
size_t align; // Write alignment
|
||||
bool (*write_fn)(void *, const void *, size_t); // Write function
|
||||
bool (*swap_fn)(void); // Swap partitions
|
||||
};
|
||||
|
||||
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);
|
||||
Reference in new issue
Block a user