/ MCUME_esp32 / espboot / main / main.c
main.c
 1  
 2  #include "freertos/FreeRTOS.h"
 3  #include "esp_wifi.h"
 4  #include "esp_system.h"
 5  #include "esp_event.h"
 6  #include "esp_event_loop.h"
 7  #include "nvs_flash.h"
 8  #include "driver/gpio.h"
 9  #include "esp_partition.h"
10  
11  #include "go.h"
12  
13  
14  int app_main(void)
15  {
16  	printf("Test start!\n");
17  
18      setup();
19      while(1) {
20          loop();        
21      }  
22  
23      for (int i = 10; i >= 0; i--) {
24          printf("Restarting in %d seconds...\n", i);
25          vTaskDelay(1000 / portTICK_PERIOD_MS);
26      }
27      printf("Restarting now.\n");
28      fflush(stdout);
29      esp_restart();
30  }
31