Repo for ESP32 Weather Station Development
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

29 linhas
462B

  1. /*
  2. * clock.h
  3. *
  4. * Created on: Apr 23, 2020
  5. * Author: chris
  6. */
  7. #ifndef COMPONENTS_CLOCK_CLOCK_H_
  8. #define COMPONENTS_CLOCK_CLOCK_H_
  9. #include <time.h>
  10. #include <sys/time.h>
  11. #include <esp_system.h>
  12. #include <esp_log.h>
  13. #include <string.h>
  14. #include <esp_sntp.h>
  15. #include "esp_event.h"
  16. typedef struct {
  17. char date_str[64];
  18. char time_str[64];
  19. } time_str_t;
  20. esp_err_t init_clock();
  21. void get_time(time_str_t* res);
  22. #endif /* COMPONENTS_CLOCK_CLOCK_H_ */