2017-06-14 10:07:15 +00:00
|
|
|
#include "unity.h"
|
|
|
|
#include "esp_system.h"
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
|
|
|
|
|
2017-09-20 09:17:51 +00:00
|
|
|
TEST_CASE("restart from PRO CPU", "[restart][reset=SW_CPU_RESET]")
|
2017-06-14 10:07:15 +00:00
|
|
|
{
|
|
|
|
esp_restart();
|
|
|
|
}
|
|
|
|
|
2017-09-20 09:17:51 +00:00
|
|
|
static void restart_task(void *arg)
|
2017-06-14 10:07:15 +00:00
|
|
|
{
|
|
|
|
esp_restart();
|
|
|
|
}
|
|
|
|
|
2017-11-10 09:53:59 +00:00
|
|
|
#ifndef CONFIG_FREERTOS_UNICORE
|
2017-09-20 09:17:51 +00:00
|
|
|
TEST_CASE("restart from APP CPU", "[restart][reset=SW_CPU_RESET]")
|
2017-06-14 10:07:15 +00:00
|
|
|
{
|
|
|
|
xTaskCreatePinnedToCore(&restart_task, "restart", 2048, NULL, 5, NULL, 1);
|
2017-09-20 09:17:51 +00:00
|
|
|
while (true) {
|
2017-06-14 10:07:15 +00:00
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
2017-11-10 09:53:59 +00:00
|
|
|
#endif
|