Repo for ESP32 Weather Station Development
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

clock.h 462B

12345678910111213141516171819202122232425262728
  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_ */