9 #ifndef __ewf_platform__h__included__
10 #define __ewf_platform__h__included__
18 #if defined(EWF_PLATFORM_BARE_METAL) && !defined(EWF_PLATFORM_THREADX) && !defined(EWF_PLATFORM_FREERTOS) && !defined(EWF_PLATFORM_WIN32) && !defined(EWF_PLATFORM_PTHREAD)
19 #undef EWF_PLATFORM_HAS_THREADING
20 #elif !defined(EWF_PLATFORM_BARE_METAL) && defined(EWF_PLATFORM_THREADX) && !defined(EWF_PLATFORM_FREERTOS) && !defined(EWF_PLATFORM_WIN32) && !defined(EWF_PLATFORM_PTHREAD)
21 #define EWF_PLATFORM_HAS_THREADING
22 #elif !defined(EWF_PLATFORM_BARE_METAL) && !defined(EWF_PLATFORM_THREADX) && defined(EWF_PLATFORM_FREERTOS) && !defined(EWF_PLATFORM_WIN32) && !defined(EWF_PLATFORM_PTHREAD)
23 #define EWF_PLATFORM_HAS_THREADING
24 #elif !defined(EWF_PLATFORM_BARE_METAL) && !defined(EWF_PLATFORM_THREADX) && !defined(EWF_PLATFORM_FREERTOS) && defined(EWF_PLATFORM_WIN32) && !defined(EWF_PLATFORM_PTHREAD)
25 #define EWF_PLATFORM_HAS_THREADING
26 #elif !defined(EWF_PLATFORM_BARE_METAL) && !defined(EWF_PLATFORM_THREADX) && !defined(EWF_PLATFORM_FREERTOS) && !defined(EWF_PLATFORM_WIN32) && defined(EWF_PLATFORM_PTHREAD)
27 #define EWF_PLATFORM_HAS_THREADING
29 #error One and only one valid platform should be defined (check the file ewf.config.h and/or your build settings)
49 #ifdef EWF_PLATFORM_HAS_THREADING
60 enum ewf_platform_thread_priority;
75 typedef ewf_result(*ewf_platform_thread_function)(
void *);
82 ewf_result ewf_platform_thread_create(ewf_platform_thread * thread_ptr);
88 ewf_result ewf_platform_thread_destroy(ewf_platform_thread * thread_ptr);
95 ewf_result ewf_platform_thread_start(ewf_platform_thread * thread_ptr);
101 ewf_result ewf_platform_thread_stop(ewf_platform_thread * thread_ptr);
109 #ifdef EWF_PLATFORM_HAS_THREADING
132 ewf_result ewf_platform_mutex_create(ewf_platform_mutex * mutex_ptr);
138 ewf_result ewf_platform_mutex_destroy(ewf_platform_mutex * mutex_ptr);
145 ewf_result ewf_platform_mutex_get(ewf_platform_mutex * mutex_ptr);
151 ewf_result ewf_platform_mutex_put(ewf_platform_mutex * mutex_ptr);
215 #if defined(EWF_PLATFORM_BARE_METAL)
217 #elif defined(EWF_PLATFORM_THREADX)
219 #elif defined(EWF_PLATFORM_FREERTOS)
221 #elif defined(EWF_PLATFORM_WIN32)
223 #elif defined(EWF_PLATFORM_PTHREAD)
226 #error No valid platform defined!
The Embedded Wireless Framework.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.