mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-28 20:14:32 +00:00
esp_rom: extract common ets apis into esp_rom_sys.h
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "esp_private/system_internal.h"
|
||||
#include "driver/rtc_cntl.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "esp_rom_sys.h"
|
||||
|
||||
#if defined(CONFIG_ESP32_BROWNOUT_DET_LVL)
|
||||
#define BROWNOUT_DET_LVL CONFIG_ESP32_BROWNOUT_DET_LVL
|
||||
@@ -49,11 +50,11 @@ static void rtc_brownout_isr_handler(void *arg)
|
||||
*/
|
||||
brownout_hal_intr_clear();
|
||||
/* Stall the other CPU to make sure the code running there doesn't use UART
|
||||
* at the same time as the following ets_printf.
|
||||
* at the same time as the following esp_rom_printf.
|
||||
*/
|
||||
esp_cpu_stall(!xPortGetCoreID());
|
||||
esp_reset_reason_set_hint(ESP_RST_BROWNOUT);
|
||||
ets_printf("\r\nBrownout detector was triggered\r\n\r\n");
|
||||
esp_rom_printf("\r\nBrownout detector was triggered\r\n\r\n");
|
||||
esp_restart_noos();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user