Repo for ESP32 Weather Station Development
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

29 rindas
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_ */