aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-05-10 18:26:44 +0200
committerJoel Bodenmann <joel@unormal.org>2014-05-10 18:26:44 +0200
commit33a037b81c5d974d1cf419ecc87e91a74b8c9406 (patch)
treeb71323acec3ad5bbfec3e5cc06cea7289c66465c /src
parentcb825aa823f2b7ae687cdc4753a77baf6f24cb91 (diff)
downloaduGFX-33a037b81c5d974d1cf419ecc87e91a74b8c9406.tar.gz
uGFX-33a037b81c5d974d1cf419ecc87e91a74b8c9406.tar.bz2
uGFX-33a037b81c5d974d1cf419ecc87e91a74b8c9406.zip
freertos port cleanup
Diffstat (limited to 'src')
-rw-r--r--src/gos/freertos.c8
-rw-r--r--src/gos/freertos.h9
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)