29 Zeilen
		
	
	
		
			462 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			29 Zeilen
		
	
	
		
			462 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * clock.h
 | |
|  *
 | |
|  *  Created on: Apr 23, 2020
 | |
|  *      Author: chris
 | |
|  */
 | |
| 
 | |
| #ifndef COMPONENTS_CLOCK_CLOCK_H_
 | |
| #define COMPONENTS_CLOCK_CLOCK_H_
 | |
| 
 | |
| #include <time.h>
 | |
| #include <sys/time.h>
 | |
| #include <esp_system.h>
 | |
| #include <esp_log.h>
 | |
| #include <string.h>
 | |
| #include <esp_sntp.h>
 | |
| #include "esp_event.h"
 | |
| 
 | |
| typedef struct {
 | |
| 	char date_str[64];
 | |
| 	char time_str[64];
 | |
| } time_str_t;
 | |
| 
 | |
| esp_err_t init_clock();
 | |
| 
 | |
| void get_time(time_str_t* res);
 | |
| 
 | |
| #endif /* COMPONENTS_CLOCK_CLOCK_H_ */
 |