Fixing ChibiOS/RT 3.x port

ugfx_release_2.6
Joel Bodenmann 2015-06-19 19:55:40 +02:00
parent 90d811dc7d
commit 3e021b9da3
1 changed files with 2 additions and 1 deletions

View File

@ -93,14 +93,15 @@ extern "C" {
#define gfxMutexInit(pmutex) chMtxInit(pmutex)
#define gfxMutexExit(pmutex) chMtxUnlock()
#define gfxExit() chSysHalt()
#define gfxHalt(msg) { chDbgPanic(msg); chSysHalt(); }
#elif CH_KERNEL_MAJOR == 3
#define gfxSystemTicks() chVTGetSystemTimeX()
#define gfxMutexInit(pmutex) chMtxObjectInit(pmutex)
#define gfxMutexExit(pmutex) chMtxUnlock(pmutex)
#define gfxExit() osalSysHalt("gfx_exit")
#define gfxHalt(msg) { chSysHalt(msg); }
#endif
#define gfxHalt(msg) { chDbgPanic(msg); chSysHalt(); }
#define gfxAlloc(sz) chHeapAlloc(0, sz)
#define gfxFree(ptr) chHeapFree(ptr)
#define gfxYield() chThdYield()