aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos_chibios.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 14:30:31 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 14:30:31 +1000
commit215f31ee3dd27f461540384cdba04b58b481fadc (patch)
tree1a100121d47819202187914dc4a321cfb7030351 /src/gos/gos_chibios.h
parente23ae94e91369501df310bc3afd4ab711d263cab (diff)
downloaduGFX-215f31ee3dd27f461540384cdba04b58b481fadc.tar.gz
uGFX-215f31ee3dd27f461540384cdba04b58b481fadc.tar.bz2
uGFX-215f31ee3dd27f461540384cdba04b58b481fadc.zip
Added type gDelay to replace V2.x delaytime_t
Added type gTicks to replace V2.x systemticks_t Added type gThreadreturn to replace V2.x threadreturn_t Added type gThreadpriority to replace V2.x threadpriority_t
Diffstat (limited to 'src/gos/gos_chibios.h')
-rw-r--r--src/gos/gos_chibios.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gos/gos_chibios.h b/src/gos/gos_chibios.h
index e1c5839f..77680a9c 100644
--- a/src/gos/gos_chibios.h
+++ b/src/gos/gos_chibios.h
@@ -31,28 +31,28 @@
*/
#if CH_KERNEL_MAJOR <= 4
- typedef systime_t delaytime_t;
+ typedef systime_t gDelay;
#else
- typedef sysinterval_t delaytime_t;
+ typedef sysinterval_t gDelay;
#endif
-typedef systime_t systemticks_t;
-typedef cnt_t semcount_t;
-typedef msg_t threadreturn_t;
-typedef tprio_t threadpriority_t;
+typedef systime_t gTicks;
+typedef cnt_t gSemcount;
+typedef msg_t gThreadreturn;
+typedef tprio_t gThreadpriority;
-#define MAX_SEMAPHORE_COUNT ((semcount_t)(((unsigned long)((semcount_t)(-1))) >> 1))
+#define MAX_SEMAPHORE_COUNT ((gSemcount)(((unsigned long)((gSemcount)(-1))) >> 1))
#define LOW_PRIORITY LOWPRIO
#define NORMAL_PRIORITY NORMALPRIO
#define HIGH_PRIORITY HIGHPRIO
#define DECLARE_THREAD_STACK(name, sz) WORKING_AREA(name, sz)
-#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
+#define DECLARE_THREAD_FUNCTION(fnName, param) gThreadreturn fnName(void *param)
#define THREAD_RETURN(retval) return retval
#if CH_KERNEL_MAJOR <= 2
typedef struct {
Semaphore sem;
- semcount_t limit;
+ gSemcount limit;
} gfxSem;
typedef Mutex gfxMutex;
@@ -63,7 +63,7 @@ typedef tprio_t threadpriority_t;
typedef struct {
semaphore_t sem;
- semcount_t limit;
+ gSemcount limit;
} gfxSem;
typedef mutex_t gfxMutex;
@@ -104,15 +104,15 @@ typedef tprio_t threadpriority_t;
#define gfxMutexDestroy(pmutex) (void)pmutex
#define gfxMutexEnter(pmutex) chMtxLock(pmutex)
void *gfxRealloc(void *ptr, size_t oldsz, size_t newsz);
-void gfxSleepMilliseconds(delaytime_t ms);
-void gfxSleepMicroseconds(delaytime_t ms);
-void gfxSemInit(gfxSem *psem, semcount_t val, semcount_t limit);
+void gfxSleepMilliseconds(gDelay ms);
+void gfxSleepMicroseconds(gDelay ms);
+void gfxSemInit(gfxSem *psem, gSemcount val, gSemcount limit);
void gfxSemDestroy(gfxSem *psem);
-gBool gfxSemWait(gfxSem *psem, delaytime_t ms);
+gBool gfxSemWait(gfxSem *psem, gDelay ms);
gBool gfxSemWaitI(gfxSem *psem);
void gfxSemSignal(gfxSem *psem);
void gfxSemSignalI(gfxSem *psem);
-gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param);
+gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, gThreadpriority prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param);
#define gfxThreadWait(thread) chThdWait(thread)
#define gfxThreadMe() chThdSelf()
#define gfxThreadClose(thread) (void)thread