2022-02-21 16:09:24 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2018-07-04 19:01:03 -04:00
|
|
|
#ifndef _WL_Ext_Safe_H_
|
|
|
|
#define _WL_Ext_Safe_H_
|
|
|
|
|
2023-09-07 09:59:47 -04:00
|
|
|
#include "Partition.h"
|
2018-07-04 19:01:03 -04:00
|
|
|
#include "WL_Flash.h"
|
|
|
|
#include "WL_Ext_Cfg.h"
|
|
|
|
#include "WL_Ext_Perf.h"
|
|
|
|
|
|
|
|
class WL_Ext_Safe : public WL_Ext_Perf
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WL_Ext_Safe();
|
|
|
|
~WL_Ext_Safe() override;
|
|
|
|
|
2023-09-07 09:59:47 -04:00
|
|
|
esp_err_t config(WL_Config_s *cfg, Partition *partition) override;
|
2018-07-04 19:01:03 -04:00
|
|
|
esp_err_t init() override;
|
|
|
|
|
2023-03-30 10:15:43 -04:00
|
|
|
size_t get_flash_size() override;
|
2018-07-04 19:01:03 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
esp_err_t erase_sector_fit(uint32_t start_sector, uint32_t count) override;
|
|
|
|
|
|
|
|
// Dump Sector
|
2023-03-30 10:15:43 -04:00
|
|
|
uint32_t dump_addr; // dump buffer address
|
|
|
|
uint32_t buff_trans_state_addr;// sector address where state of buffer transaction will be stored
|
2018-07-04 19:01:03 -04:00
|
|
|
|
|
|
|
esp_err_t recover();
|
|
|
|
};
|
|
|
|
|
2020-11-10 02:40:01 -05:00
|
|
|
#endif // _WL_Ext_Safe_H_
|