fix(esp_system): fixed not necessary public require to bootloader_support

This commit is contained in:
Armando 2024-06-12 10:55:51 +08:00
parent 321f51d416
commit d83e7ea505
4 changed files with 20 additions and 21 deletions

View File

@ -8,6 +8,7 @@ set(includes "include")
set(priv_requires heap spi_flash esp_mm)
if(${target} STREQUAL "esp32")
list(APPEND priv_requires bootloader_support)
# [refactor-todo]: requires "driver" for `spicommon_periph_claim`
list(APPEND priv_requires driver)
endif()

View File

@ -67,8 +67,7 @@ else()
# [refactor-todo] requirements due to init code,
# should be removable once using component init functions
# link-time registration is used.
esp_pm
REQUIRES bootloader_support
bootloader_support esp_pm
LDFRAGMENTS "linker.lf" "app.lf")
add_subdirectory(port)

View File

@ -44,6 +44,24 @@
#define MMU_FLASH_MASK (~(CONFIG_MMU_PAGE_SIZE - 1))
/**
* @brief Image process driver
*/
struct image_process_driver_s {
/**
* @brief Process segments
*
* @param[in] data image meta data
*
* @return
* - ESP_OK
* - ESP_ERR_INVALID_ARG: invalid argument
* - ESP_ERR_INVALID_STATE: invalid state
*/
esp_err_t (*process_segments)(esp_image_metadata_t *data);
};
const static char *TAG = "image_process";
static uint32_t s_current_read_mapping = UINT32_MAX;

View File

@ -10,7 +10,6 @@
#include <stddef.h>
#include <string.h>
#include "esp_err.h"
#include "esp_image_format.h"
#ifdef __cplusplus
extern "C" {
@ -21,24 +20,6 @@ extern "C" {
*/
typedef struct image_process_driver_s image_process_driver_t;
/**
* @brief Image process driver
*/
struct image_process_driver_s {
/**
* @brief Process segments
*
* @param[in] data image meta data
*
* @return
* - ESP_OK
* - ESP_ERR_INVALID_ARG: invalid argument
* - ESP_ERR_INVALID_STATE: invalid state
*/
esp_err_t (*process_segments)(esp_image_metadata_t *data);
};
/**
* @brief Image process flow
* @note This API first reads the image header, then process the segments from the image header.