esp_system: remove duplicated esp_digital_reset function

esp_digital_reset was defined both in system_api.c and panic_handler.c
This commit is contained in:
Ivan Grokhotkov
2020-04-30 16:37:57 +02:00
committed by bot
parent 8bdfb265a4
commit c5f664d4ac
3 changed files with 21 additions and 32 deletions

View File

@@ -542,25 +542,6 @@ void xt_unhandled_exception(XtExcFrame *frame)
panic_handler(frame, false);
}
static __attribute__((noreturn)) void esp_digital_reset(void)
{
// make sure all the panic handler output is sent from UART FIFO
uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
// switch to XTAL (otherwise we will keep running from the PLL)
rtc_clk_cpu_freq_set_xtal();
#if CONFIG_IDF_TARGET_ESP32
esp_cpu_unstall(PRO_CPU_NUM);
#endif
// reset the digital part
SET_PERI_REG_MASK(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_SW_SYS_RST);
while (true) {
;
}
}
void __attribute__((noreturn)) panic_restart(void)
{
bool digital_reset_needed = false;
@@ -576,7 +557,7 @@ void __attribute__((noreturn)) panic_restart(void)
}
#endif
if (digital_reset_needed) {
esp_digital_reset();
esp_restart_noos_dig();
}
esp_restart_noos();
}