Skip to content

Commit 1a35886

Browse files
committed
update mongoose.h
1 parent 74b3fd2 commit 1a35886

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mongoose.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,6 +2690,25 @@ bool mg_ota_end(void); // Stop writing
26902690

26912691

26922692

2693+
#if MG_OTA != MG_OTA_NONE && MG_OTA != MG_OTA_CUSTOM
2694+
2695+
struct mg_flash {
2696+
void *start; // Address at which flash starts
2697+
size_t size; // Flash size
2698+
size_t secsz; // Sector size
2699+
size_t align; // Write alignment
2700+
bool (*write_fn)(void *, const void *, size_t); // Write function
2701+
bool (*swap_fn)(void); // Swap partitions
2702+
};
2703+
2704+
bool mg_ota_flash_begin(size_t new_firmware_size, struct mg_flash *flash);
2705+
bool mg_ota_flash_write(const void *buf, size_t len, struct mg_flash *flash);
2706+
bool mg_ota_flash_end(struct mg_flash *flash);
2707+
2708+
#endif
2709+
2710+
2711+
26932712

26942713

26952714

0 commit comments

Comments
 (0)