mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-21 17:59:40 +01:00
esp32: Use package identifier to look up SPI flash/PSRAM WP Pin, unless overridden
Allows booting in QIO/QOUT mode or with PSRAM on ESP32-PICO-V3 and ESP32-PICO-V3-O2 without any config changes. Custom WP pins (needed for fully custom circuit boards) should still be compatible.
This commit is contained in:
committed by
chenjianqiang
parent
55a1bd0fb6
commit
a94685a222
@@ -14,6 +14,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_image_format.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -66,6 +67,22 @@ void bootloader_flash_gpio_config(const esp_image_header_t* pfhdr);
|
||||
*/
|
||||
void bootloader_flash_dummy_config(const esp_image_header_t* pfhdr);
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
/**
|
||||
* @brief Return the pin number used for custom SPI flash and/or SPIRAM WP pin
|
||||
*
|
||||
* Can be determined by eFuse values in most cases, or overriden in configuration
|
||||
*
|
||||
* This value is only meaningful if the other SPI flash pins are overriden via eFuse.
|
||||
*
|
||||
* This value is only meaningful if flash is set to QIO or QOUT mode, or if
|
||||
* SPIRAM is enabled.
|
||||
*
|
||||
* @return Pin number to use, or -1 if the default should be kept
|
||||
*/
|
||||
int bootloader_flash_get_wp_pin(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user