aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos_nios.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-11-27 20:39:23 +0100
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-11-27 20:39:23 +0100
commiteaf0b19fb8428b9e2e47798294d6ba83a56d186e (patch)
treed5e17609f052e189347e9f503147196f354f8534 /src/gos/gos_nios.h
parent870901880b30a7f81b2d95a815e89542746d62ab (diff)
downloaduGFX-eaf0b19fb8428b9e2e47798294d6ba83a56d186e.tar.gz
uGFX-eaf0b19fb8428b9e2e47798294d6ba83a56d186e.tar.bz2
uGFX-eaf0b19fb8428b9e2e47798294d6ba83a56d186e.zip
Adding support for NIOS-II platform
Diffstat (limited to 'src/gos/gos_nios.h')
-rw-r--r--src/gos/gos_nios.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/gos/gos_nios.h b/src/gos/gos_nios.h
new file mode 100644
index 00000000..4aadc45d
--- /dev/null
+++ b/src/gos/gos_nios.h
@@ -0,0 +1,44 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://ugfx.org/license.html
+ */
+
+#ifndef _GOS_NIOS_H
+#define _GOS_NIOS_H
+
+#if GFX_USE_OS_NIOS
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <sys/alt_alarm.h>
+
+typedef alt_u32 systemticks_t;
+typedef alt_u32 delaytime_t;
+typedef unsigned char bool_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void gfxHalt(const char* msg);
+void gfxExit(void);
+systemticks_t gfxSystemTicks(void);
+systemticks_t gfxMillisecondsToTicks(delaytime_t ms);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+// Use the generic thread handling and heap handling
+#define GOS_NEED_X_THREADS TRUE
+#define GOS_NEED_X_HEAP TRUE
+
+#include "gos_x_threads.h"
+#include "gos_x_heap.h"
+
+#endif /* GFX_USE_OS_NIOS */
+#endif /* _GOS_NIOS_H */