MeterLogger
|
Go to the source code of this file.
Functions | |
ICACHE_FLASH_ATTR static void | sntp_check_timer_func (void *arg) |
ICACHE_FLASH_ATTR static void | ntp_offline_second_counter_timer_func (void *arg) |
ICACHE_FLASH_ATTR void | init_unix_time (void) |
ICACHE_FLASH_ATTR uint32_t | get_unix_time (void) |
ICACHE_FLASH_ATTR uint32_t | get_uptime (void) |
Variables | |
static os_timer_t | sntp_check_timer |
uint32_t | init_time = 0 |
uint32_t | current_unix_time |
uint32_t | ntp_offline_second_counter = 0 |
uint64_t | boot_time |
static os_timer_t | ntp_offline_second_counter_timer |
ICACHE_FLASH_ATTR uint32_t get_unix_time | ( | void | ) |
Definition at line 55 of file unix_time.c.
References current_unix_time, and sntp_get_current_timestamp().
Referenced by en61107_received_task(), en61107_request_send(), kmp_received_task(), kmp_request_send(), and minute_timer_func().
ICACHE_FLASH_ATTR uint32_t get_uptime | ( | void | ) |
Definition at line 61 of file unix_time.c.
References current_unix_time, init_time, ntp_offline_second_counter, and sntp_get_current_timestamp().
Referenced by add_watchdog(), reset_watchdog(), and watchdog_timer_func().
ICACHE_FLASH_ATTR void init_unix_time | ( | void | ) |
Definition at line 37 of file unix_time.c.
References ntp_offline_second_counter, ntp_offline_second_counter_timer, ntp_offline_second_counter_timer_func(), NULL, os_timer_arm, os_timer_disarm, os_timer_func_t, os_timer_setfn, sntp_check_timer, sntp_check_timer_func(), sntp_init(), sntp_set_timezone(), and sntp_setservername().
|
static |
Definition at line 33 of file unix_time.c.
References ntp_offline_second_counter.
Referenced by init_unix_time().
|
static |
Definition at line 16 of file unix_time.c.
References current_unix_time, init_time, ntp_offline_second_counter_timer, os_timer_arm, os_timer_disarm, sntp_check_timer, and sntp_get_current_timestamp().
Referenced by init_unix_time().
uint64_t boot_time |
Definition at line 12 of file unix_time.c.
uint32_t current_unix_time |
Definition at line 9 of file unix_time.c.
Referenced by en61107_received_task(), get_unix_time(), get_uptime(), kmp_received_task(), and sntp_check_timer_func().
uint32_t init_time = 0 |
Definition at line 8 of file unix_time.c.
Referenced by get_uptime(), and sntp_check_timer_func().
uint32_t ntp_offline_second_counter = 0 |
Definition at line 10 of file unix_time.c.
Referenced by get_uptime(), init_unix_time(), and ntp_offline_second_counter_timer_func().
|
static |
Definition at line 14 of file unix_time.c.
Referenced by init_unix_time(), and sntp_check_timer_func().
|
static |
Definition at line 6 of file unix_time.c.
Referenced by init_unix_time(), and sntp_check_timer_func().