Select one of the symbols to view example projects that use it.
 
Outline
#include <stdint.h>
#include <stdbool.h>
#include "esp_attr.h"
#include "sdkconfig.h"
#include "esp_rom_spiflash.h"
flash_brownout_needs_reset
flash_erasing
spi_flash_needs_reset_check()
spi_flash_set_erasing_flag(bool)
spi_flash_brownout_need_reset()
Files
loading (3/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/spi_flash/flash_brownout_hook.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * 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 #if CONFIG_SPI_FLASH_BROWNOUT_RESET static bool flash_brownout_needs_reset = false; static bool flash_erasing = false; // This function could be called in startup void spi_flash_needs_reset_check(void) { // Currently only XMC is suggested to reset when brownout #if CONFIG_SPI_FLASH_BROWNOUT_RESET_XMC if ((g_rom_flashchip.device_id >> 16) == 0x20) { flash_brownout_needs_reset = true; }{...} #endif/* ... */ }{ ... } void spi_flash_set_erasing_flag(bool status) { flash_erasing = status; }{ ... } bool spi_flash_brownout_need_reset(void) { return (flash_brownout_needs_reset && flash_erasing); }{ ... } /* ... */#endif //CONFIG_SPI_FLASH_BROWNOUT_RESET
Details
Show:
from
Types: Columns: