diff options
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r-- | firmware/export/system.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index 5ac92e015d..7a04422b06 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -125,7 +125,7 @@ int get_cpu_boost_counter(void); | |||
125 | 125 | ||
126 | 126 | ||
127 | /* newer? SDL includes endian.h, So we ignore it */ | 127 | /* newer? SDL includes endian.h, So we ignore it */ |
128 | #if defined(SIMULATOR) || defined(__PCTOOL__) | 128 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) || defined(__PCTOOL__) |
129 | #undef letoh16 | 129 | #undef letoh16 |
130 | #undef letoh32 | 130 | #undef letoh32 |
131 | #undef htole16 | 131 | #undef htole16 |
@@ -234,8 +234,11 @@ enum { | |||
234 | 234 | ||
235 | #if !defined(SIMULATOR) && !defined(__PCTOOL__) | 235 | #if !defined(SIMULATOR) && !defined(__PCTOOL__) |
236 | #include "system-target.h" | 236 | #include "system-target.h" |
237 | #elif defined(HAVE_SDL) /* SIMULATOR */ | 237 | #elif defined(HAVE_SDL) /* SDL build */ |
238 | #include "system-sdl.h" | 238 | #include "system-sdl.h" |
239 | #endif | ||
240 | |||
241 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
239 | static inline uint16_t swap16(uint16_t value) | 242 | static inline uint16_t swap16(uint16_t value) |
240 | /* | 243 | /* |
241 | result[15..8] = value[ 7..0]; | 244 | result[15..8] = value[ 7..0]; |
@@ -268,7 +271,7 @@ static inline uint32_t swap_odd_even32(uint32_t value) | |||
268 | return (t >> 8) | ((t ^ value) << 8); | 271 | return (t >> 8) | ((t ^ value) << 8); |
269 | } | 272 | } |
270 | 273 | ||
271 | #endif /* !SIMULATOR */ | 274 | #endif /* PLATFORM_HOSTED */ |
272 | 275 | ||
273 | #ifndef BIT_N | 276 | #ifndef BIT_N |
274 | #define BIT_N(n) (1U << (n)) | 277 | #define BIT_N(n) (1U << (n)) |