This commit is contained in:
jomjol
2021-05-01 08:15:11 +02:00
parent ba7d429178
commit ce5f3c463b
25 changed files with 577 additions and 160 deletions

View File

@@ -412,26 +412,11 @@ void task_reboot(void *pvParameter)
vTaskDelete(NULL); //Delete this task if it exits from the loop above
}
inline void invoke_abort(void)
{
while (1) {
if (esp_cpu_in_ocd_debug_mode()) {
__asm__ ("break 0,0");
}
*((int *) 0) = 0;
}
}
void doReboot(){
LogFile.WriteToFile("Reboot - now");
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
KillTFliteTasks();
// xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
vTaskDelay(5000 / portTICK_PERIOD_MS);
invoke_abort();
esp_restart();
hard_restart();
}