bootloader_flash.h 803 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <esp_err.h>
  8. #include <esp_spi_flash.h> /* including in bootloader for error values */
  9. #include "sdkconfig.h"
  10. #include "soc/soc_caps.h"
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #if SOC_CACHE_SUPPORT_WRAP
  15. /**
  16. * @brief Set the burst mode setting command for specified wrap mode.
  17. *
  18. * @param mode The specified warp mode.
  19. * @return always ESP_OK
  20. */
  21. esp_err_t bootloader_flash_wrap_set(spi_flash_wrap_mode_t mode);
  22. #endif
  23. /**
  24. * @brief Unlock Flash write protect.
  25. * Please do not call this function in SDK.
  26. *
  27. * @note This can be overridden because it's attribute weak.
  28. */
  29. esp_err_t bootloader_flash_unlock(void);
  30. #ifdef __cplusplus
  31. }
  32. #endif