blob: 7aadfa75986c6054822532a2b5f57f195ad8b809 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* 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
*/
/**
* The arduino GOS implementation is similar to the bare metal raw32 gos implementation.
* It uses cooperative multi-tasking. Be careful
* when writing device drivers not to disturb the assumptions this creates by performing
* call-backs to uGFX code unless you define the INTERRUPTS_OFF() and INTERRUPTS_ON() macros.
* It still requires some C runtime library support...
* enough startup to initialise the stack, interrupts, static data etc and call main().
* setjmp() and longjmp() - for threading
* memcpy() - for heap and threading
* malloc(), realloc and free() - if GOS_RAW_HEAP_SIZE == 0
*
* You must also define the following routines in your own code so that timing functions will work...
* gTicks gfxSystemTicks(void);
* gTicks gfxMillisecondsToTicks(gDelay ms);
*/
#ifndef _GOS_ARDUINO_H
#define _GOS_ARDUINO_H
#if GFX_USE_OS_ARDUINO
#include <Arduino.h>
/*===========================================================================*/
/* Type definitions */
/*===========================================================================*/
void gfxHalt(const char *msg);
void gfxExit(void);
/*===========================================================================*/
/* Use the generic thread handling and heap handling */
/*===========================================================================*/
#define GOS_NEED_X_THREADS GFXON
#define GOS_NEED_X_HEAP GFXON
#include "gos_x_threads.h"
#include "gos_x_heap.h"
#endif /* GFX_USE_OS_ARDUINO */
#endif /* _GOS_ARDUINO_H */
|