Merge pull request #3500 from cesanta/ota-url-check

Add OTA url check
This commit is contained in:
robertc2000 authored and GitHub committed 2026-04-20 11:31:26 +03:00
commit 4b01dc1a78
4 files changed
+418

No files matched your search

+5
View File
@@ -3354,6 +3354,7 @@ static inline void mg_dash_ev_handler(struct mg_connection *c, int ev,
#define MG_OTA_NONE 0 // No OTA support
#define MG_OTA_STM32H5 1 // STM32 H5
#define MG_OTA_STM32H7 2 // STM32 H7
@@ -3389,6 +3390,10 @@ static inline void mg_dash_ev_handler(struct mg_connection *c, int ev,
bool mg_ota_begin(size_t new_firmware_size); // Start writing
bool mg_ota_write(const void *buf, size_t len); // Write chunk, aligned to 1k
bool mg_ota_end(void); // Stop writing
void mg_ota_url_check(struct mg_mgr *mgr,
const char *current_version,
const char *metadata_url,
void (*fn)(const char *status));