summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 4442eb96d7..47dd858d81 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -104,6 +104,10 @@ int get_cpu_boost_counter(void);
104/* return number of elements in array a */ 104/* return number of elements in array a */
105#define ARRAYLEN(a) (sizeof(a)/sizeof((a)[0])) 105#define ARRAYLEN(a) (sizeof(a)/sizeof((a)[0]))
106 106
107/* is the given pointer "p" inside the said bounds of array "a"? */
108#define PTR_IN_ARRAY(a, p, numelem) \
109 ((uintptr_t)(p) - (uintptr_t)(a) < (uintptr_t)(numelem)*sizeof ((a)[0]))
110
107/* return p incremented by specified number of bytes */ 111/* return p incremented by specified number of bytes */
108#define SKIPBYTES(p, count) ((typeof (p))((char *)(p) + (count))) 112#define SKIPBYTES(p, count) ((typeof (p))((char *)(p) + (count)))
109 113
@@ -188,9 +192,13 @@ enum {
188#include "system-target.h" 192#include "system-target.h"
189#elif defined(HAVE_SDL) /* SDL build */ 193#elif defined(HAVE_SDL) /* SDL build */
190#include "system-sdl.h" 194#include "system-sdl.h"
195#ifdef SIMULATOR
196#include "system-sim.h"
197#endif
191#elif defined(__PCTOOL__) 198#elif defined(__PCTOOL__)
192#include "system-sdl.h" 199#include "system-hosted.h"
193#endif 200#endif
201
194#include "bitswap.h" 202#include "bitswap.h"
195#include "rbendian.h" 203#include "rbendian.h"
196 204