Fixing ChibiOS/RT 3.x port

This commit is contained in:
Joel Bodenmann 2015-06-19 19:55:40 +02:00
parent 90d811dc7d
commit 3e021b9da3

View file

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