mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(spi_flash): add #if check for s_mxic_set_required_regs()
Currently, s_mxic_set_required_regs() lacks checking for
CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP. And this causes a defined but not
used warning when MXIC flash driver is disabled in project config. So add
a #if check for this to supress warning.
Signed-off-by: Shengyu Qu <wiagn@4d2.org>
(cherry picked from commit 062c948c18)
This commit is contained in:
@@ -219,6 +219,7 @@ static void s_flash_init_mxic(esp_rom_spiflash_read_mode_t mode)
|
||||
}
|
||||
#endif // #if CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP
|
||||
|
||||
#if CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP
|
||||
static void s_mxic_set_required_regs(uint32_t chip_id)
|
||||
{
|
||||
bool is_swap = false;
|
||||
@@ -230,6 +231,7 @@ static void s_mxic_set_required_regs(uint32_t chip_id)
|
||||
esp_rom_spi_set_dtr_swap_mode(0, is_swap, is_swap);
|
||||
esp_rom_spi_set_dtr_swap_mode(1, is_swap, is_swap);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user