flash_qio_mode.h 647 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /** @brief Enable Quad I/O mode in bootloader (if configured)
  12. *
  13. * Queries attached SPI flash ID and sends correct SPI flash
  14. * commands to enable QIO or QOUT mode, then enables this mode.
  15. */
  16. void bootloader_enable_qio_mode(void);
  17. /**
  18. * @brief Read flash ID by sending 0x9F command
  19. * @return flash raw ID
  20. * mfg_id = (ID >> 16) & 0xFF;
  21. flash_id = ID & 0xffff;
  22. */
  23. uint32_t bootloader_read_flash_id(void);
  24. #ifdef __cplusplus
  25. }
  26. #endif