Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

53 Zeilen
1.1 KiB

  1. #include <time.h>
  2. #include <errno.h>
  3. #include <sys/fcntl.h>
  4. #include <time.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include "esp_system.h"
  8. #include "driver/gpio.h"
  9. #include "esp_log.h"
  10. static const char *TAG = "main";
  11. #include "core/common.h"
  12. #include "config.h"
  13. #include "core/buttons.h"
  14. #include "core/storage.h"
  15. #include "core/display.h"
  16. #include "modes/ModeRunner.h"
  17. #include "modes/BootMode.h"
  18. #include "modes/MainMenuMode.h"
  19. static struct tm* tm_info;
  20. static char tmp_buff[128];
  21. static time_t time_now, time_last = 0;
  22. static const char *file_fonts[3] = {"/spiffs/fonts/DotMatrix_M.fon", "/spiffs/fonts/Ubuntu.fon", "/spiffs/fonts/Grotesk24x48.fon"};
  23. static const char tag[] = "[LilyBook]";
  24. esp_err_t ret;
  25. extern "C" void app_main()
  26. {
  27. printf("\n LilyBook v%s\n\n", APP_VERSION);
  28. storage_init();
  29. buttons_init();
  30. display_init();
  31. spi_init();
  32. delay(500);
  33. display_connect();
  34. printf("==== START ====\r\n\n");
  35. getModeRunner()->init();
  36. getModeRunner()->startMainMode(new BootMode());
  37. while (1) {
  38. getModeRunner()->loop();
  39. }
  40. }