Repo for ESP32 Weather Station Development
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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