Skip to content

Commit

Permalink
update mongoose.h
Browse files Browse the repository at this point in the history
  • Loading branch information
scaprile committed Jan 21, 2025
1 parent 74b3fd2 commit 1a35886
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mongoose.h
Original file line number Diff line number Diff line change
Expand Up @@ -2690,6 +2690,25 @@ bool mg_ota_end(void); // Stop writing



#if MG_OTA != MG_OTA_NONE && MG_OTA != MG_OTA_CUSTOM

struct mg_flash {
void *start; // Address at which flash starts
size_t size; // Flash size
size_t secsz; // Sector 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);

#endif






Expand Down

0 comments on commit 1a35886

Please sign in to comment.