From 33a037b81c5d974d1cf419ecc87e91a74b8c9406 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sat, 10 May 2014 18:26:44 +0200 Subject: freertos port cleanup --- src/gos/freertos.c | 8 ++++++++ src/gos/freertos.h | 9 ++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gos/freertos.c b/src/gos/freertos.c index a61914c0..f2c03eec 100644 --- a/src/gos/freertos.c +++ b/src/gos/freertos.c @@ -72,6 +72,14 @@ portTickType MS2ST(portTickType ms) return (ms / portTICK_PERIOD_MS); } +void gfxMutexInit(xSemaphoreHandle *s) +{ + *s = xSemaphoreCreateMutex(); + #if GFX_FREERTOS_USE_TRACE + vTraceSetMutexName(*s,"uGFXMutex"); // for FreeRTOS+Trace debug + #endif +} + void gfxSemInit(gfxSem* psem, semcount_t val, semcount_t limit) { if (val > limit) diff --git a/src/gos/freertos.h b/src/gos/freertos.h index db1c427b..ccda4cbd 100644 --- a/src/gos/freertos.h +++ b/src/gos/freertos.h @@ -78,13 +78,8 @@ extern "C" { #define gfxMillisecondsToTicks(ms) MS2ST(ms) #define gfxSystemLock() {} #define gfxSystemUnlock() {} -static inline void gfxMutexInit(xSemaphoreHandle *s) -{ - *s = xSemaphoreCreateMutex(); - #if GFX_FREERTOS_USE_TRACE - vTraceSetMutexName(*s,"uGFXMutex"); // for FreeRTOS+Trace debug - #endif -} + +void gfxMutexInit(xSemaphoreHandle* s); #define gfxMutexDestroy(pmutex) vSemaphoreDelete(*pmutex) #define gfxMutexEnter(pmutex) xSemaphoreTake(*pmutex,portMAX_DELAY) #define gfxMutexExit(pmutex) xSemaphoreGive(*pmutex) -- cgit v1.2.3