// Copyright 2017-2018 Espressif Systems (Shanghai) PTE LTD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esp_https_ota.h>
#include <esp_ota_ops.h>
#include <esp_log.h>
#define OTA_BUF_SIZE 256
static const char *TAG="ESP_HTTPS_OTA";
static void http_cleanup(esp_http_client_handle_t client)
{
esp_http_client_close(client);
esp_http_client_cleanup(client);
}
esp_err_t esp_https_ota(const esp_http_client_config_t *config)
{
if(!config){
ESP_LOGI(TAG,"esp_http_client config not found");
return ESP_ERR_INVALID_ARG;
}
if(!config->cert_pem){
ESP_LOGI(TAG,"Sever sertficate not found in esp_http_client config");
return ESP_FAIL;
}
esp_http_clent_handle_t client=esp_http_client_init(config)
esp8266 && 32 esp_https_ota使用Demo
最新推荐文章于 2024-08-12 20:21:44 发布
本文将展示如何使用esp_https_ota库为ESP8266和ESP32设备进行HTTPS Over-The-Air (OTA)固件更新。通过这个Demo,开发者可以学习到配置服务器、连接、验证并安全地升级固件的过程。
摘要由CSDN通过智能技术生成