version 2.8
gos_raw32.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 /**
9  * The raw32 GOS implementation supports any 32 bit processor with or without an
10  * underlying operating system. It uses cooperative multi-tasking. Be careful
11  * when writing device drivers not to disturb the assumptions this creates by performing
12  * call-backs to uGFX code unless you define the INTERRUPTS_OFF() and INTERRUPTS_ON() macros.
13  * It still requires some C runtime library support...
14  * enough startup to initialise the stack, interrupts, static data etc and call main().
15  * setjmp() and longjmp() - for threading
16  * memcpy() - for heap and threading
17  * malloc(), realloc and free() - if GOS_RAW_HEAP_SIZE == 0
18  *
19  * You must also define the following routines in your own code so that timing functions will work...
20  * systemticks_t gfxSystemTicks(void);
21  * systemticks_t gfxMillisecondsToTicks(delaytime_t ms);
22  */
23 #ifndef _GOS_RAW32_H
24 #define _GOS_RAW32_H
25 
26 #if GFX_USE_OS_RAW32
27 
28 /*===========================================================================*/
29 /* Type definitions */
30 /*===========================================================================*/
31 
32 typedef unsigned char bool_t;
33 
34 #if __STDC_VERSION__ >= 199901L
35  #include <stdint.h>
36 #elif defined(__GNUC__) || defined(__GNUG__)
37  typedef __INT8_TYPE__ int8_t;
38  typedef __UINT8_TYPE__ uint8_t;
39  typedef __INT16_TYPE__ int16_t;
40  typedef __UINT16_TYPE__ uint16_t;
41  typedef __INT32_TYPE__ int32_t;
42  typedef __UINT32_TYPE__ uint32_t;
43 #else
44  typedef signed char int8_t;
45  typedef unsigned char uint8_t;
46  typedef signed short int16_t;
47  typedef unsigned short uint16_t;
48  typedef signed int int32_t;
49  typedef unsigned int uint32_t;
50 #endif
51 
52 #if defined(__STDC__)
53  #include <stddef.h>
54 #else
55  typedef uint32_t size_t;
56 #endif
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62  void gfxHalt(const char *msg);
63  void gfxExit(void);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 /*===========================================================================*/
70 /* Use the generic thread handling and heap handling */
71 /*===========================================================================*/
72 
73 #define GOS_NEED_X_THREADS TRUE
74 #define GOS_NEED_X_HEAP TRUE
75 
76 #include "gos_x_threads.h"
77 #include "gos_x_heap.h"
78 
79 #endif /* GFX_USE_OS_RAW32 */
80 #endif /* _GOS_RAW32_H */
void gfxExit(void)
Exit the GFX application.
void gfxHalt(const char *msg)
Halt the GFX application due to an error.