Merge pull request #447 from DrDoof/feat/ntp

ntp: keep the time from an NTP server
This commit is contained in:
d00f authored and GitHub committed 2026-10-11 23:20:06 +02:00
commit 84d9408151
11 files changed
+618 -8

No files matched your search

+3 -5
View File
@@ -22,6 +22,7 @@
#include "dhcp.h"
#include "syslog.h"
#include "dns.h"
#include "ntp.h"
#include "uip/uip.h"
#include "version.h"
@@ -1869,6 +1870,8 @@ void cmd_parser(void) __banked
parse_syslog();
} else if (cmd_compare(0, "dns")) {
dns_parse();
} else if (cmd_compare(0, "ntp") || cmd_compare(0, "time")) {
ntp_parse();
} else if (cmd_compare(0, "ip")) {
if (cmd_compare(1, "dhcp")) {
dhcp_start();
@@ -2019,11 +2022,6 @@ void cmd_parser(void) __banked
parse_storm();
} else if (cmd_compare(0, "version")) {
print_sw_version();
} else if (cmd_compare(0, "time")) {
print_string(" Tick counter: "); print_long(ticks); print_string(" Sec Counter: ");
reg_read_m(RTL837X_REG_SEC_COUNTER);
print_sfr_data();
write_char('\n');
} else if (cmd_compare(0, "history")) {
__xdata uint16_t p = (cmd_history_ptr + 1) & CMD_HISTORY_MASK;
__xdata uint8_t found_begin = 0;