mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
esp_https_ota: Add support for HTTPS based ota feature
This commit is contained in:
@@ -142,6 +142,8 @@ INPUT = \
|
||||
../../components/esp32/include/esp_ipc.h \
|
||||
## Over The Air Updates (OTA)
|
||||
../../components/app_update/include/esp_ota_ops.h \
|
||||
## ESP HTTPS OTA
|
||||
../../components/esp_https_ota/include/esp_https_ota.h \
|
||||
## Sleep
|
||||
## NOTE: for line below header_file.inc is not used
|
||||
../../components/esp32/include/esp_sleep.h \
|
||||
|
35
docs/en/api-reference/system/esp_https_ota.rst
Normal file
35
docs/en/api-reference/system/esp_https_ota.rst
Normal file
@@ -0,0 +1,35 @@
|
||||
ESP HTTPS OTA
|
||||
=============
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
``esp_https_ota`` provides simplified APIs to perform firmware upgrades over HTTPS.
|
||||
It's an abstraction layer over existing OTA APIs.
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
|
||||
.. highlight:: c
|
||||
|
||||
::
|
||||
|
||||
esp_err_t do_firmware_upgrade()
|
||||
{
|
||||
esp_http_client_config_t config = {
|
||||
.url = CONFIG_FIRMWARE_UPGRADE_URL,
|
||||
.cert_pem = (char *)server_cert_pem_start,
|
||||
};
|
||||
esp_err_t ret = esp_https_ota(&config);
|
||||
if (ret == ESP_OK) {
|
||||
esp_restart();
|
||||
} else {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
.. include:: /_build/inc/esp_https_ota.inc
|
@@ -18,6 +18,7 @@ System API
|
||||
Sleep Modes <sleep_modes>
|
||||
Base MAC address <base_mac_address>
|
||||
Over The Air Updates (OTA) <ota>
|
||||
ESP HTTPS OTA <esp_https_ota>
|
||||
ESP pthread <esp_pthread>
|
||||
Error Codes and Helper Functions <esp_err>
|
||||
|
||||
|
@@ -37,6 +37,7 @@ See also
|
||||
|
||||
* :doc:`Partition Table documentation <../../api-guides/partition-tables>`
|
||||
* :doc:`Lower-Level SPI Flash/Partition API <../storage/spi_flash>`
|
||||
* :doc:`ESP HTTPS OTA <esp_https_ota>`
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
|
1
docs/zh_CN/api-reference/system/esp_https_ota.rst
Normal file
1
docs/zh_CN/api-reference/system/esp_https_ota.rst
Normal file
@@ -0,0 +1 @@
|
||||
.. include:: ../../../en/api-reference/system/esp_https_ota.rst
|
Reference in New Issue
Block a user