10 #if GFX_USE_OS_RAWRTOS
14 #include "raw_config.h"
16 #if CONFIG_RAW_MUTEX != 1
17 #error "GOS: CONFIG_RAW_MUTEX must be defined in raw_config.h"
20 #if CONFIG_RAW_SEMAPHORE != 1
21 #error "GOS: CONFIG_RAW_SEMAPHORE must be defined in raw_config.h"
28 #error "GOS: Operating System initialization for RawRTOS is not yet implemented in uGFX. Please set GFX_OS_NO_INIT to GFXON in your gfxconf.h"
30 #if !GFX_OS_INIT_NO_WARNING
31 #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
32 #warning "GOS: Operating System initialization has been turned off. Make sure you call raw_os_start() before gfxInit() in your application!"
33 #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
34 COMPILER_WARNING(
"GOS: Operating System initialization has been turned off. Make sure you call raw_os_start() before gfxInit() in your application!")
39 void _gosPostInit(
void)
50 gTicks ticks = ms*RAW_TICKS_PER_SECOND/1000;
57 gTicks ticks = (us/1000)*RAW_TICKS_PER_SECOND/1000;
64 gTicks ticks = ms*RAW_TICKS_PER_SECOND/1000;
66 if(raw_semaphore_get((psem), ticks)==RAW_SUCCESS)
73 if(raw_semaphore_get((psem), RAW_NO_WAIT)==RAW_SUCCESS)
83 taskobj =
gfxAlloc(
sizeof(RAW_TASK_OBJ));
84 ret = raw_task_create(taskobj, (RAW_U8 *)
"uGFX_TASK", param,
86 stacksz/
sizeof(PORT_STACK) , fn, 1);
88 if (ret != RAW_SUCCESS) {
void * gThread
A thread handle.
#define GFX_THREAD_FUNCTION(fnName, param)
Declare a thread function.
gBool gfxSemWait(gSem *psem, gDelay ms)
Wait on a semaphore.
void gfxSleepMicroseconds(gDelay us)
Put the current thread to sleep for the specified period in microseconds.
void * gfxAlloc(gMemSize sz)
Allocate memory.
gThread gfxThreadCreate(void *stackarea, gMemSize stacksz, gThreadpriority prio, GFX_THREAD_FUNCTION((*fn), p), void *param)
Start a new thread.
gBool gfxSemWaitI(gSem *psem)
Test if a wait on a semaphore can be satisfied immediately.
void gfxSleepMilliseconds(gDelay ms)
Put the current thread to sleep for the specified period in milliseconds.