Update to latest Zephyr and their Docker repo

This commit is contained in:
Sergio R. Caprile committed 2022-10-04 17:24:13 -03:00
1 parent 0b3f6d6aab
commit 1ef0aa14c0
11 files changed
+8885 -14

No files matched your search

+5 -2
View File
@@ -2,12 +2,12 @@
#if MG_ARCH == MG_ARCH_ZEPHYR
#include <zephyr.h>
#include <zephyr/kernel.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <net/socket.h>
#include <zephyr/net/socket.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
@@ -18,6 +18,9 @@
#include <time.h>
#define MG_PUTCHAR(x) printk("%c", x)
#ifndef strdup
#define strdup(s) ((char *) mg_strdup(mg_str(s)).ptr)
#endif
#define strerror(x) zsock_gai_strerror(x)
#define FD_CLOEXEC 0
#define F_SETFD 0
+3
View File
@@ -102,6 +102,8 @@ uint64_t mg_millis(void) {
return xTaskGetTickCount() * portTICK_PERIOD_MS;
#elif MG_ARCH == MG_ARCH_AZURERTOS
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
#elif MG_ARCH == MG_ARCH_ZEPHYR
return (uint64_t) k_uptime_get();
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
// Apple CLOCK_MONOTONIC_RAW is equivalent to CLOCK_BOOTTIME on linux
// Apple CLOCK_UPTIME_RAW is equivalent to CLOCK_MONOTONIC_RAW on linux
@@ -128,3 +130,4 @@ uint64_t mg_millis(void) {
#endif
}
#endif