WL_Ext_Safe.h 833 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef _WL_Ext_Safe_H_
  7. #define _WL_Ext_Safe_H_
  8. #include "Partition.h"
  9. #include "WL_Flash.h"
  10. #include "WL_Ext_Cfg.h"
  11. #include "WL_Ext_Perf.h"
  12. class WL_Ext_Safe : public WL_Ext_Perf
  13. {
  14. public:
  15. WL_Ext_Safe();
  16. ~WL_Ext_Safe() override;
  17. esp_err_t config(WL_Config_s *cfg, Partition *partition) override;
  18. esp_err_t init() override;
  19. size_t get_flash_size() override;
  20. protected:
  21. esp_err_t erase_sector_fit(uint32_t start_sector, uint32_t count) override;
  22. // Dump Sector
  23. uint32_t dump_addr; // dump buffer address
  24. uint32_t buff_trans_state_addr;// sector address where state of buffer transaction will be stored
  25. esp_err_t recover();
  26. };
  27. #endif // _WL_Ext_Safe_H_