ESP32-Mesh-OTA/components/mesh_ota/include/Mesh_OTA_Partition_Access.h

28 lines
1.4 KiB
C

#ifndef H_MESH_OTA_PARTITION_ACCESS
#define H_MESH_OTA_PARTITION_ACCESS
#include "esp_system.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "Mesh_Network.h"
#include "HTTPS_Client.h"
#define ERROR_CHECK(x) if (err == ESP_OK) \
{ \
err = (x); \
if (err != ESP_OK) \
{ \
ESP_LOGE(LOG_TAG, "%s failed with error: 0x%x -> %s", #x, err, esp_err_to_name(err)); \
} \
} \
esp_err_t errMeshOtaPartitionAccessHttps(bool* pbNewOTAImage);
esp_err_t errMeshOtaPartitionAccessMeshTransmit(mesh_addr_t* pMeshNodeAddr);
esp_err_t errMeshOtaPartitionAccessMeshReceive(bool* pbNewOTAImage, mesh_addr_t* pMeshNodeAddr);
#endif /* H_MESH_OTA_PARTITION_ACCESS */