36#ifndef EVE_PLATFORM__H
37#define EVE_PLATFORM__H
44#if defined(BT8XXEMU_PLATFORM)
47#if defined(FT4222_PLATFORM)
50#if defined(MPSSE_PLATFORM)
53#if defined(FT9XX_PLATFORM)
56#if defined(RP2040_PLATFORM)
66#if defined(ENABLE_ILI9488_HVGA_PORTRAIT) || defined(ENABLE_KD2401_HVGA_PORTRAIT)
77#ifdef EVE_DEBUG_BREAK_SIGABRT
80#define eve_debug_break() \
89#define eve_debug_break() __debugbreak()
91#define eve_debug_break() __builtin_trap()
93#define eve_debug_break() eve_noop()
96#define eve_debug_break() eve_noop()
100#if defined(__GNUC__) || defined(__clang__)
101#define eve_deprecated(msg) __attribute__((deprecated(msg)))
102#elif defined(_MSC_VER)
103#define eve_deprecated(msg) __declspec(deprecated(msg))
104#elif (__cplusplus >= 201402L)
105#define eve_deprecated(msg) [[deprecated(msg)]]
107#define eve_deprecated(msg)
111#define eve_printf(fmt, ...) printf(fmt, ##__VA_ARGS__)
115#define eve_sprintf(str, fmt, ...) sprintf(str, fmt, ##__VA_ARGS__)
118#if defined(_MSC_VER) && !defined(__clang__)
119#define eve_assume(cond) __assume(cond)
121#define eve_assume(cond) eve_noop()
125#define eve_printf_debug_once(fmt, ...) \
128 static bool eve_printf_debug_once_flag = false; \
129 if (!eve_printf_debug_once_flag) \
131 eve_printf(fmt, ##__VA_ARGS__); \
132 eve_printf_debug_once_flag = true; \
135#define eve_printf_debug(fmt, ...) eve_printf(fmt, ##__VA_ARGS__)
136#define eve_assert(cond) \
141 const char *str = #cond; \
142 const char *sf = __FILE__; \
143 eve_printf("EVE Assert Failed: %s (in file '%s' on line '%i')\n", str ? str : "<NULL>", sf ? sf : "<NULL>", __LINE__); \
148#define eve_assert_ex(cond, ex) \
153 const char *str = #cond; \
154 const char *sf = __FILE__; \
155 eve_printf("EVE Assert Failed: %s (%s) (in file '%s' on line '%i')\n", ex ? ex : "<NULL>", str ? str : "<NULL>", sf ? sf : "<NULL>", __LINE__); \
160#define eve_assert_do(cond) eve_assert(cond)
161#define eve_trace(str) \
164 const char *sc = __FILE__; \
165 eve_printf("EVE Trace: %s (in file '%s' on line '%i')\n", (str) ? (str) : "<NULL>", sf ? sf : "<NULL>", __LINE__); \
168#define eve_printf_debug_once(fmt, ...) eve_noop()
169#define eve_printf_debug(fmt, ...) eve_noop()
170#define eve_assert(cond) eve_assume(cond)
171#define eve_assert_ex(cond, ex) eve_assume(cond)
172#define eve_assert_do(cond) \
175 bool r__assert = (cond); \
176 r__assert = r__assert; \
177 eve_assume(r__assert); \
179#define eve_trace(cond) eve_noop()
184#define max(a, b) (((a) > (b)) ? (a) : (b))
187#define min(a, b) (((a) < (b)) ? (a) : (b))
193#define eve_scope() if (true)
EVE's command read/write.
EVE's co-processor commmands.
EVE's co-processor command.
This file processes the input definitions.
Defines EVE hardware values.
Defines EVE hardware values.
Eve_Hal framework APIs for loading file.
EVE HAL framework utilities.