/* * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */#include<stdint.h>#include<stdbool.h>#include"esp_attr.h"#include"sdkconfig.h"#include"esp_rom_spiflash.h"5 includes#ifCONFIG_SPI_FLASH_BROWNOUT_RESETstaticboolflash_brownout_needs_reset=false;staticboolflash_erasing=false;// This function could be called in startupvoidspi_flash_needs_reset_check(void){// Currently only XMC is suggested to reset when brownout#ifCONFIG_SPI_FLASH_BROWNOUT_RESET_XMCif((g_rom_flashchip.device_id>>16)==0x20){flash_brownout_needs_reset=true;}{...}#endif/* ... */}{ ... }voidspi_flash_set_erasing_flag(boolstatus){flash_erasing=status;}{ ... }boolspi_flash_brownout_need_reset(void){return(flash_brownout_needs_reset&&flash_erasing);}{ ... }/* ... */#endif//CONFIG_SPI_FLASH_BROWNOUT_RESET
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.