new release
This commit is contained in:
32
components/time_service/include/time_service_events.h
Normal file
32
components/time_service/include/time_service_events.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
#include "esp_event.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ESP_EVENT_DECLARE_BASE(TIME_SERVICE_EVENTS);
|
||||
|
||||
typedef enum {
|
||||
TIME_SERVICE_EVENT_INIT = 0,
|
||||
TIME_SERVICE_EVENT_SYNC_STARTED,
|
||||
TIME_SERVICE_EVENT_SYNC_OK,
|
||||
TIME_SERVICE_EVENT_SYNC_TIMEOUT,
|
||||
TIME_SERVICE_EVENT_NETWORK_LOST,
|
||||
} time_service_event_id_t;
|
||||
|
||||
typedef struct {
|
||||
bool timezone_configured;
|
||||
bool sntp_initialized;
|
||||
bool sync_in_progress;
|
||||
bool synced;
|
||||
bool valid_time;
|
||||
time_t now;
|
||||
} time_service_state_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user