2022-04-15 23:16:36 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sdkconfig.h>
|
|
|
|
#include <esp_system.h>
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
|
|
#include <freertos/task.h>
|
|
|
|
#include "system_wrapper.h"
|
|
|
|
|
|
|
|
void restart() {
|
2022-05-03 18:44:45 +00:00
|
|
|
/*for (int i = 3; i >= 0; i--) {
|
2022-04-15 23:16:36 +00:00
|
|
|
printf("Restarting in %d seconds...\n", i);
|
|
|
|
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
|
|
|
}
|
2022-05-03 18:44:45 +00:00
|
|
|
printf("Restarting now.\n");*/
|
|
|
|
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
2022-04-15 23:16:36 +00:00
|
|
|
fflush(stdout);
|
|
|
|
esp_restart();
|
|
|
|
}
|