flash_qio_mode.h 626 B

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