version 2.8
gos_nios.h
1 /*
2  * This file is subject to the terms of the GFX License. If a copy of
3  * the license was not distributed with this file, you can obtain one at:
4  *
5  * http://ugfx.org/license.html
6  */
7 
8 #ifndef _GOS_NIOS_H
9 #define _GOS_NIOS_H
10 
11 #if GFX_USE_OS_NIOS
12 
13 #include <stdint.h>
14 #include <stddef.h>
15 #include <stdbool.h>
16 #include <sys/alt_alarm.h>
17 
18 typedef alt_u32 systemticks_t;
19 typedef alt_u32 delaytime_t;
20 typedef unsigned char bool_t;
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 void gfxHalt(const char* msg);
27 void gfxExit(void);
28 systemticks_t gfxSystemTicks(void);
29 systemticks_t gfxMillisecondsToTicks(delaytime_t ms);
30 
31 #ifdef __cplusplus
32 }
33 #endif
34 
35 
36 // Use the generic thread handling and heap handling
37 #define GOS_NEED_X_THREADS TRUE
38 #define GOS_NEED_X_HEAP TRUE
39 
40 #include "gos_x_threads.h"
41 #include "gos_x_heap.h"
42 
43 #endif /* GFX_USE_OS_NIOS */
44 #endif /* _GOS_NIOS_H */
systemticks_t gfxSystemTicks(void)
Get the current operating system tick time.
systemticks_t gfxMillisecondsToTicks(delaytime_t ms)
Convert a given number of millseconds to a number of operating system ticks.
void gfxExit(void)
Exit the GFX application.
void gfxHalt(const char *msg)
Halt the GFX application due to an error.