aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/makefile4
-rw-r--r--client/serial_win32.c19
-rw-r--r--client/time_windows.c15
3 files changed, 33 insertions, 5 deletions
diff --git a/client/makefile b/client/makefile
index e48eaeb..a23ce4f 100644
--- a/client/makefile
+++ b/client/makefile
@@ -13,13 +13,15 @@ SOURCES := $(wildcard *.c)
HEADERS := $(wildcard *.h)
include ../shared/makefile
+CFLAGS += $(if $(WIN32),-I/mingw64/include/ncursesw,)
+
OBJECTS := $(patsubst %.c,%.o, $(SOURCES))
.o:
$(CC) -c $(CFLAGS) $<
$(EXECNAME): $(OBJECTS)
- $(CC) $(LDFLAGS) $(OBJECTS) -o $(EXECNAME)
+ $(CC) $(OBJECTS) -o $(EXECNAME) $(LDFLAGS)
clean::
$(RM) $(EXECNAME) *.o
diff --git a/client/serial_win32.c b/client/serial_win32.c
index 9406a34..edc9db1 100644
--- a/client/serial_win32.c
+++ b/client/serial_win32.c
@@ -2,9 +2,20 @@
#include "serial.h"
-bool w2_serial_read(uint8_t *target, uint8_t bytes);
-bool w2_serial_write(uint8_t *target, uint8_t bytes);
-void w2_serial_open();
-void w2_serial_close();
+int w2_serial_read() {
+ return 0x00;
+}
+
+bool w2_serial_write(char *data, uint8_t length) {
+ return true;
+}
+
+bool w2_serial_open(const char *port_name) {
+ return true;
+}
+
+void w2_serial_close() {
+ return;
+}
#endif
diff --git a/client/time_windows.c b/client/time_windows.c
new file mode 100644
index 0000000..f9082d6
--- /dev/null
+++ b/client/time_windows.c
@@ -0,0 +1,15 @@
+#ifdef W2_HOST_WIN32
+
+#include "time.h"
+
+unsigned long w2_get_time() {
+ return 0;
+}
+
+void w2_timer_start(w2_e_client_timers label) { g_w2_client_timers[label] = w2_get_time(); }
+
+unsigned long w2_timer_end(w2_e_client_timers label) {
+ return w2_get_time() - g_w2_client_timers[label];
+}
+
+#endif