feat: add OTA firmware update from URL

Wraps esp_https_ota for over-the-air updates via HTTPS.
Dual OTA partitions enable safe rollback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
crispyberry
2026-02-05 18:55:59 +08:00
parent 44790d016b
commit 0b9aef22a7
2 changed files with 45 additions and 0 deletions

12
main/ota/ota_manager.h Normal file
View File

@@ -0,0 +1,12 @@
#pragma once
#include "esp_err.h"
/**
* Perform OTA firmware update from a URL.
* Downloads the firmware binary and applies it. Reboots on success.
*
* @param url HTTPS URL to the firmware .bin file
* @return ESP_OK on success (device will reboot), error code otherwise
*/
esp_err_t ota_update_from_url(const char *url);