diff --git a/cube/User/Src/networkAbstractionLayer_lan.c b/cube/User/Src/networkAbstractionLayer_lan.c index e30aca2..d82ddd6 100644 --- a/cube/User/Src/networkAbstractionLayer_lan.c +++ b/cube/User/Src/networkAbstractionLayer_lan.c @@ -14,13 +14,11 @@ static t_configBlock *config; static uint8_t sntpBuffer[MAX_SNTP_BUF_SIZE]; -const uint64_t UNIX_NTP_EPOCH_DIFF = 2208988800; +static const uint64_t UNIX_NTP_EPOCH_DIFF = 2208988800; extern const uint8_t SNTP_SOCK; +static uint64_t seconds; - -uint64_t networkSntpQuery() { - uint64_t seconds = 0; - +void networkSntpEngine(void *handle) { if (isNetworkAvailable()) { coloredMsg(LOG_BLUE, "wizsq, about to call SNTP"); @@ -48,10 +46,12 @@ uint64_t networkSntpQuery() { coloredMsg(LOG_BLUE, "wizsq, error when querying ntp server name"); } } - - return seconds; } +uint64_t networkSntpQuery() { + networkSntpEngine(NULL); + return seconds; +} extern uint8_t SINK_SOCK;