Job_SignsPads/ESP32/software/main/inc/bsp_upgrade.h
2025-04-22 10:29:37 +08:00

67 lines
1.4 KiB
C

/*
* @Date: 2024-07-18 14:56:09
* @LastEditors: lzc56 563451665@qq.com
* @LastEditTime: 2024-09-13 08:52:09
* @FilePath: \software\main\inc\bsp_upgrade.h
*/
/* MQTT (over TCP) Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#ifndef __BSP_UPGRADE_H__
#define __BSP_UPGRADE_H__
#include <main.h>
#include <string.h>
#include <dirent.h>
#include <inttypes.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_ota_ops.h"
#include "esp_http_client.h"
#include "esp_https_ota.h"
#include "nvs.h"
#include "nvs_flash.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct ota_info_T
{
char url[128];
char wifiPath[64];
uint32_t wifiBinSize;
char mattressPath[64];
char version[64];
uint32_t mattressBinSize;
} ota_info_t;
typedef struct
{
unsigned long crc;
unsigned long rec;
} CRC32_CTX;
void upgradeTimeOut_Reboot(void);
void upgrade_task(void *arg);
extern ota_info_t ota_info;
extern TaskHandle_t upgrade_TaskHandle;
#ifdef __cplusplus
}
#endif
#endif /* __BSP_UPGRADE_H__ */