Fixed issue in sntp, same as master

This commit is contained in:
Rutger Huijgen 2020-04-20 16:54:18 +02:00
parent e7a95326d3
commit 3e2b2830e5

View file

@ -68,7 +68,7 @@ void sntp_initialize(const struct timezone *tz) {
cal = 1; cal = 1;
tim_ref = TIMER_COUNT; tim_ref = TIMER_COUNT;
sntp_sem = xSemaphoreCreateMutex(); sntp_sem = xSemaphoreCreateMutex();
assert(sntp_sem == NULL); assert(sntp_sem != NULL);
sntp_init(); sntp_init();
} }
@ -97,7 +97,7 @@ int _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tzp) {
if (tzp || !tp) return EINVAL; if (tzp || !tp) return EINVAL;
if (sntp_base == 0) { if (sntp_base == 0) {
printf("Time not valid yet"); printf("Time not valid yet\n");
return EINVAL; return EINVAL;
} }