| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 5 |
*/ |
| 6 |
|
| 7 |
/* Flasher commands related to writing flash */ |
| 8 |
#pragma once |
| 9 |
#include "stub_flasher.h" |
| 10 |
#include <stdbool.h> |
| 11 |
#include "rom_functions.h" |
| 12 |
|
| 13 |
bool is_in_flash_mode(void); |
| 14 |
|
| 15 |
esp_command_error get_flash_error(void); |
| 16 |
|
| 17 |
esp_command_error handle_flash_begin(uint32_t total_size, uint32_t offset); |
| 18 |
|
| 19 |
esp_command_error handle_flash_deflated_begin(uint32_t uncompressed_size, uint32_t compressed_size, uint32_t offset); |
| 20 |
|
| 21 |
void handle_flash_data(void *data_buf, uint32_t length); |
| 22 |
|
| 23 |
#if !ESP8266 |
| 24 |
void handle_flash_encrypt_data(void *data_buf, uint32_t length); |
| 25 |
#endif |
| 26 |
|
| 27 |
void handle_flash_deflated_data(void *data_buf, uint32_t length); |
| 28 |
|
| 29 |
/* same command used for deflated or non-deflated mode */ |
| 30 |
esp_command_error handle_flash_end(void); |