12345678910111213141516171819202122232425262728293031 |
- #pragma once
- #include "common.h"
- #include "fwimg.h"
- #include <zlib.h>
- /*
- * Additional error codes
- */
- #define FWUPDATE_ERR_IN_PROGRESS (-10)
- #define FWUPDATE_ERR_BAD_CHUNK (-11)
- #define FWUPDATE_ERR_ERASE_FAILED (-12)
- #define FWUPDATE_ERR_PROGRAM_FAILED (-13)
- #define FWUPDATE_ERR_WRITE_PROTECT (-14)
- #define FWUPDATE_ERR_NOT_READY (-15)
- #define FWUPDATE_ERR_FPGA_JTAG (-16)
- #define FWUPDATE_ERR_FPGA_MISMATCH (-17)
- #define FWUPDATE_ERR_FPGA_FAILED (-18)
- #define FWUPDATE_ERR_UNKNOWN (-19)
- #define FWUPDATE_ERR_ESP_NO_PARTITION (-20)
- #define FWUPDATE_ERR_ESP_BAD_OTA (-21)
- #define FWUPDATE_ERR_ESP_FLASH_FAILED (-22)
- #define FWUPDATE_ERR_ESP_BAD_DATA (-23)
- #define FWUPDATE_ERR_CONFIG_READ (-24)
- #define FWUPDATE_ERR_CONFIG_SAVE (-25)
- extern_c int firmware_update_start(read_func_t read_data, token_t token, bool autoreboot);
- extern_c int firmware_update_wait(TickType_t delay);
- extern_c int esp_update(read_func_t read_func, token_t token, size_t size);
- extern_c const char *firmware_errstr(int err);
|