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